HTML and CSS Reference
In-Depth Information
In the following example, the
<h1>
tag closes outside the
<section>
container:
<
section
>
<
h1
>
Smash this!
</
section
>
</
h1
>
Instead, it should look like this:
<
section
>
<
h1
>
Smash this!
</
h1
>
</
section
>
Here, the
<body>
tag closes outside the
<html>
container. h e
<h3>
container is correct.
<
html
>
<
body
>
Really interesting stuff
<
h3
>
Don't forget to vote!
</
h3
>
</
html
>
</
body
>
Instead, it should look like this:
<
html
>
<
body
>
Really interesting stuff
<
h3
>
Don't forget to vote!
</
h3
>
</
body
>
</
html
>
39
Here, the
<header>
tag closes before the
<nav>
tag does:
<
header
>
<
nav
>
<
a
href
=
”html5.org”
>
HTML5
</
a> |
<
a
href
=
”css3.org”
>
CSS3
</
a
>
> |
<
a
href
=
”php.net”
>
PHP
</
a
>
</
header
>
<
footer
>
<
a
href
=
”html5.org”
>
HTML5
</
a
>
|
<
a
href
=
”css3.org”
>
CSS3
</
a
>
> |
<
a
href
=
”php.net”
>
PHP
</
a
>
</
nav
>
</
footer
>
Instead, use two
<nav>
container sets — one for the header and one for the footer:
<
header
>
<
nav
>
<
a
href
=
”html5.org”
>
HTML5
</
a
>
|