M
M
Mark2019-01-08 17:06:13
HTML
Mark, 2019-01-08 17:06:13

Why is the validator throwing an error?

I'm taking a course on htmlacademy, I'm trying to send the project for protection, but it doesn't pass the automatic validator, and it gives errors that don't exist.
PS mentors no longer help.
1. Writes that the encoding is not specified, although it is specified both on the page and in the atom in which I am writing. Everywhere utf-8.
It also shows that this tag is not closed. I tried to write it like this, but it still writes that it is not closed and another additional error for this character.
Also writes Bad element name “meta-charset="utf-8"”: Code point “U+003D” is not allowed

<!DOCTYPE html>
<html>
 <head>
 <meta-charset="utf-8">
  <title>Гостиницы</title>
  <link href="css/normalize.css" rel="stylesheet">
  <link rel="stylesheet" href="./css/index-css.css" type="text/css"/>
  <link href="https://fonts.googleapis.com/css?family=PT+Sans:400,700&amp;subset=cyrillic" rel="stylesheet">
 </head>
 <body>

2.Produces an error in several places "Unmappable byte sequence: "81". ". I can’t understand what this means, even the translator does not take the first word at all.
3. Element “head” is missing a required instance of child element “title”. I can't figure out what's wrong with the code above.
4. Element “title” not allowed as child of element “meta-charset="utf-8"” in this context.
The title element is not allowed as a child of a meta-charset.
It is also not clear how to fix it in connection with the questions above.
5. Stray end tag “head”. The translator translated this as "crazy closing of the head tag. How to understand this? Code above.
6.Start tag “body” seen but an element of the same type was already open. "The start body tag is visible, but an element of the same type is already open." But I have one on the page and it is closed!
7. End tag for “body” seen, but there were unclosed elements. He talks about unclosed elements, walked about each - there are no unclosed ones!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Beliyadm, 2019-01-08
@Markus1

In this form, the W3C validator did not give a single error
PS do not forget to close tags, even for styles and scripts, this is a good practice

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Гостиницы</title>
  <link href="css/normalize.css" rel="stylesheet" />
  <link rel="stylesheet" href="./css/index-css.css" type="text/css" />
  <link href="https://fonts.googleapis.com/css?family=PT+Sans:400,700&amp;subset=cyrillic" rel="stylesheet" />
 </head>
 <body>

M
Mark, 2019-01-09
@Markus1

The issue has already been resolved, but yes, it was to specify the full encoding and close this tag was the solution, as written above.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question