w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



!Doctype declaration, syntax

Syntax Doctype

Valid Syntaxes: 1, 2, 3, 4

  • doctype declaration is required
  • doctype declaration is case-insensitive


Syntax Doctype Examples

Valid Syntax 1
1
2
3
4
5
6
7
8
9
<!DOCTYPE html>
<html>
<head>

<⁄head>
<body>

<⁄body>
<⁄html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
<!DOCTYPE HTML>
<html>
<head>

<⁄head>
<body>

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

<⁄head>
<body>

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

<⁄head>
<body>

<⁄body>
<⁄html>

Video demonstration !DOCTYPE declaration, syntax

DOCTYPE declaration syntax, Tutorial

min video details
00:05 video tutorial: doctype declaration, syntax
00:08 doctype declaration is case-insensitive
→ any of the below represents a valid syntax:
00:12 1st valid syntax: <!doctype html>
00:18 2nd valid syntax: <!DOCTYPE HTML>
00:22 3rd valid syntax: <!DOCTYPE html>
00:27 4th valid syntax: <!doctype HTML>