I must have read 20 - 30 CSS tutorials and you know what's not mentioned? How does one create a Parent element? Everything is mentioned about how to relate to a Parent but no-one tell us how to make a Parent element, other than "its usually the BODY". I guess I just somehow missed this point. Could someone clarify?
And you never will see
And you never will see anything tell you how to create a parent element!
A parent does not exist until it has some children therefore you cannot create a parent first, it comes into existence when you come to give it children.
This is just a term to denote relationships between nested elements or a hierarchy of elements. As are these; Child, Siblings, Parents, Ancestors, Antecedents.
I think you have just got a little confused here.
Body is a child of html, html is the top level all elements under it are children, these are all just terms to help identify a relationship.
When you create your first div after the body tag it's parent becomes 'body' likewise create a div within the first one and then the first one becomes a parent but it's also a child as well, as are we all
Thanks, Hugo. That was never pointed out to me. It seems this would be fairly important as what attributes you assign to the parent are also given to the children, if you don't signify their own. In every dicipline, when you are into it for awhile, say woodworking, you take for granted the understanding of certain aspects of it, and this caused some folks a problem. (I guess that's why the "_____ for Dummies" books are such a success.)
I'm sure I'll have some more questions later.