meta nested within elements
Classified as: metadata content, flow content if itemprop attribute present, phrasing content if itemprop attribute present
Parents, meta
Children, meta
Encoding declaration state
Encoding declaration state = the meta element having the "content-type" as value of the http-equiv attribute and a valid value of the content attribute (content attribute present also):
e.g. http-equiv in Encoding declaration state:
<meta http-equiv="content-type" content="text⁄html; charset=utf-8">
Examples: meta parents
1 2 3 4 5 6 7 8 9 10 | <!doctype html> <> <> < charset="UTF-8"> <>... <⁄> <⁄> <> <⁄> <⁄> |
1 2 3 4 5 6 7 8 9 10 11 12 | <!doctype html> <> <> <>... <⁄> <> < http-equiv="refresh"> <⁄> <⁄> <> <⁄> <⁄> |
1 2 3 4 5 6 7 8 9 10 11 | <!doctype html> <> <> <>... <⁄> <⁄> < itemscop itemtype="url"> < itemprop="name"> <⁄> <⁄> |
Syntax 1: Valid, meta element nested inside head element (charset attribute present)
Syntax 2: Valid, meta element nested inside noscript element inside head (http-equiv attribute is present but not in the Encoding declaration state)
Syntax 3: Valid, meta element nested inside body element (itemprop attribute present)
Video demonstration meta element, nested
HTML5 meta element, nested, Tutorial
min | video details |
---|---|
00:04 | nesting the meta element inside other HTML5 elements video demo |
00:12 | meta element can be nested inside head element IF: 1. charset attribute is present above the title tag because the character encoding set applies to the title of the page also |
00:24 | meta element can be nested inside head element IF: 2. name attribute is present |
00:29 | meta element can be nested inside head element IF: 3. http-equiv attribute is present |
00:35 | meta element can be nested inside head element IF: 4. itemprop attribute is present |
00:47 | meta element can be nested inside script element, child of the head element IF: 1. http-equiv attribute is present and its value is not "content-type" : e.g. in our case the value is "refresh" |
00:59 | meta element can be nested inside elements that expect phrasing content (e.g. body, p, .. see the list above this video) IF: 6. itemprop attribute is present |