Reputation: 53
So I made this simple HTML code so far and it's already giving errors with the Validator! I don't understand what's wrong, can someone help?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<html lang="en">
</html>
<title>Otsikko</title>
</head>
<body>
<h1> Otsikko </h1>
<h2> Otsikko </h2>
<p>Tekstiä</p>
<ul>
<li>Jotain</li>
<li>Jotain</li>
<li>Jotain</li>
</ul>
<ol>
<li>Jotain</li>
<li>Jotain</li>
<li>Jotain</li>
</ol>
<dl> <dt>Jotain</dt>
<dd>Jotain</dd> <dt>Jotain</dt>
</dl>
ä ö « ®
</body>
</html>
What's wrong with this HTML code?
Upvotes: 0
Views: 6384
Reputation: 1590
You should get rid of these at the end: ä ö « ®
Move </html>
to the end of the document (keep the opening tag where it is)
add a <head> </head>
around your title and charset.
The <dt>
tag should have a <dd>
tag follow it. (First one did, second didn't)
Although not an error, for language accents such as ä
you can use the HTML code such as ä
.
See: https://www.starr.net/is/type/htmlcodes.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Otsikko</title>
</head>
<h1> Otsikko </h1>
<h2> Otsikko </h2>
<p> Tekstiä </p>
<ul>
<li>Jotain</li>
<li>Jotain</li>
<li>Jotain</li>
</ul>
<ol>
<li>Jotain</li>
<li>Jotain</li>
<li>Jotain</li>
</ol>
<dl>
<dt>Jotain</dt>
<dd>Jotain</dd>
<dt>Jotain</dt>
<dd>Jotain</dd>
</dl>
</html>
W3 has a good online validator:
Upvotes: 0