w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



title nested within elements, elements nested within title

Classified as: -

Parents, title

Children, title

Examples: title parents, title children

Valid Syntax 1
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>
<head>
<title>...<⁄title>
<⁄head>
<body>

<⁄body>
<⁄html>
Invalid Syntax 2
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>
<head>

<⁄head>
<body>
<title>...<⁄title>
<⁄body>
<⁄html>
Valid Syntax 3
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>
<head>
<title>The title of your document.<⁄title>
<⁄head>
<body>

<⁄body>
<⁄html>

Syntax 1: Valid, the title element can be nested within the head element only
Syntax 2: Invalid, the title element can be nested within the head element only
Syntax 3: Valid, no HTML element can be nested within the title element, only text allowed

title intro title required title occurrences title browser display title ELEMENT vs title ATTRIBUTE title syntaxtitle lang attribute