Home >> Tutorials/FAQs >> CSS Tutorials >> Index

CSS Tutorials - HTML Elements Relations

By: FYICenter.com

(Continued from previous topic...)

How Many Ways Can Elements Relate to Each Other?

From a formatting point of view, HTML elements can relate to each other in the following ways:

  • Line up side by side - In-line elements coded next to each other are formatted side by side in a line box of a paragraph to form one line.
  • Nested as parent and child - Many block elements allows other block elements to be enclosed inside as child elements. Child elements will be formatted a single box to serve as the content box of their parent.

    in a line box of a paragraph to form one line.
  • Stack up vertically - Block elements coded next to each other are formatted as a vertical stack in a parent block element.
  • Float to edges - Elements specified with floating properties are formatted to the left edge or the right edge of the parent block element.

(Continued on next topic...)

  1. How Many Ways Can Elements Relate to Each Other?
  2. How In-line Elements Are Formatted Side by Side?
  3. How Nested Block Elements Are Formatted?
  4. How Two Block Elements Are Formatted as a Stack?
  5. How Floating Elements Are Formatted?
  6. Why Is the Top Margin Not Showing?
  7. How Are Vertical Margins between Two Block Elements Collapsed?
  8. How Are Parent Padding Spaces Collapsed with the Child Margins?
  9. How Is the Width of a Parent Element Related to Child Elements?
  10. How Is the Full Width of a Block Element Extended?
  11. How To Test Child Full Width Extension?
  12. How To Test Parent Content Width Extension?
  13. What Are White Spaces in HTML Documents?
  14. How White Spaces Are Formatted?
  15. What Happens to Multiple White Spaces in In-line Elements?

Selected Developer Jobs:

More...