w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



title ... ⁄title, occurrences on page

Only 1 title element is allowed per HTML5 document.

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

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

<⁄body>
<⁄html>

Video demonstration title: occurrences on page

HTML5 title occurrences, Tutorial

min video details
00:03 open html demo file in Notepad++
00:06 the html page syntax is not valid
warning: 3 title elements are present in page: 2 inside head section and 1 inside body section
Note 1: only 1 title element is allowed per HTML page and goes inside head section
Note 2: title element is not allowed inside body section
00:17 removing the title tag from body section and 1 title tag from head →
the html page syntax is now valid
title intro title required title browser display title parents - children title ELEMENT vs title ATTRIBUTE title syntaxtitle lang attribute