+ 1
we always take the body as the parents?.. i mean it's always as a reference?
5 Réponses
+ 1
hhhh thanks a lot really...u just made simple to fully understand well✌
+ 1
Why would <html> be the parent of <nav> and <header> but not <p>? These are all children of <body> if they aren't contained inside another element.
+ 1
Ah, i messed up a little there. i was a bit tired at the time lol. head and body are the only children of html. header, nav, section, aside and footer are all children of the body. article is a child of section. paragraphs, headers, tables etc existing within the body are not necessarily children of the body, as they'd usually be contained within the sub elements section, aside etc.
0
it works like a normal family. <html> is the parent of the head and body, as well as the new html5 tags like <nav> and <footer>, but not with elements such as paragraphs, headers and so on. the parents are always the elements the children are stored within.
eg. things like the title and links to stylesheets are contained within the <head>, so <head> would be the parent, and the title and link would be the children of the head. the title and links are considered as siblings as they're both the children of head.
elements such as <p> and <h1> are usually the children of <body>, but if they were contained in, say, a <div> tag, then the div would become the parent instead.
hope this is easy to understand lol
0
cool you all World transformers!!! bravo this platform