I have the following html5 code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="Style.css" rel="stylesheet" type="text/css">
<title>Catalogo Dischi</title>
<p class="title"> Catalogo Dischi </p>
<a id="index">
<p class="subtitle">Indice</p>
</a>
<p class="text">
<a href="#classic">Musica Classica</a>
<br/>
<a href="#jazz">Musica Jazz</a>
<br/>
<a href="#country">Musica Country</a>
</p>
</head>
The code is inside the html tag. I don't understand the reason of this error, I close all tags except for meta and link, which can't be closed, what's the problem?
you need to understand -- the <head>
element defines attributes that are used by the browser, but are not directly visible in the page. The <title>
attribute defines the title shown on your browser tab.
After you close the <head>
tag, you should open the <body>
tag, in which all the content to be shown in the page should go.
Also see http://reference.sitepoint.com/html/page-structure for a basic introduction to these elements.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="Style.css" rel="stylesheet" type="text/css">
<title>Catalogo Dischi</title>
</head>
<body>
<p class="title"> Catalogo Dischi </p>
<a id="index">
<p class="subtitle">Indice</p>
</a>
<p class="text">
<a href="#classic">Musica Classica</a>
<br/>
<a href="#jazz">Musica Jazz</a>
<br/>
<a href="#country">Musica Country</a>
</p>
</body>
You need to close the head
tag after your title and wrap your content in body
tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With