w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



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

Valid Syntax 1
1
2
3
4
5
6
7
8
9
10
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>... <⁄title>
<⁄head>
<body>

<⁄body>
<⁄html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<html>
<head>
<title>... <⁄title>
<noscript>
<meta http-equiv="refresh">
<⁄noscript>
<⁄head>
<body>

<⁄body>
<⁄html>
Valid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
<!doctype html>
<html>
<head>
<title>... <⁄title>
<⁄head>
<body itemscop itemtype="url">

<meta itemprop="name">

<⁄body>
<⁄html>

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