w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



p ... ⁄p syntax

Syntax p

Examples p syntax

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

<p>...</p>

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

<p>...</p>
<p>...

</body>
</html>
Valid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<p>...
<p>...
<blockquote>...<blockquote>

</body>
</html>
Invalid Syntax 4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<a>
<p>...

</a>

</body>
</html>

Video demonstration p element, syntax

HTML5 p element, syntax Tutorial

min video details
00:04 video tutorial: p element, syntax
00:09 adding p element in page
00:13 p element has:

- a start tag: <p>
- and an end tag: <⁄p>
00:17 the start tag: <p> is required
00:19 the end tag: <⁄p> is optional IF:
- there's no more content inside the parent element and this parent element is not the a element (in our case the parent element is the body element → ok)
00:27 the end tag: <⁄p> is optional IF:
- the p element is followed by another p element or one of the next elements: address, article, aside... see the full list above
p intro p browser display p parents - children