0 / 0 / 0 Регистрация: 20.05.2013 Сообщений: 44 |
|
1 |
|
02.08.2017, 09:11. Показов 11614. Ответов 6
Всем привет, все перерыл в интернете, но не нашел как устранить проблему в валидаторе? может кто подскажет что означает эта проблема, и как ее вообще решить?
__________________
0 |
112 / 108 / 42 Регистрация: 22.01.2017 Сообщений: 452 |
|
02.08.2017, 09:50 |
2 |
пропущен стартовый тег tr
0 |
0 / 0 / 0 Регистрация: 20.05.2013 Сообщений: 44 |
|
02.08.2017, 09:55 [ТС] |
3 |
в исходном коде ничего не пропущено и все сделано по html стандарту, вот что интересно есть table в него входит tr открывающий и соответственно после <td></td> закрывающий тег </tr>
0 |
112 / 108 / 42 Регистрация: 22.01.2017 Сообщений: 452 |
|
02.08.2017, 10:29 |
4 |
dimkaja357, покажите пациента.
0 |
dimkaja357 0 / 0 / 0 Регистрация: 20.05.2013 Сообщений: 44 |
||||
02.08.2017, 10:32 [ТС] |
5 |
|||
P.S после и перед tbody — теги table
0 |
Модератор 3824 / 2674 / 1521 Регистрация: 12.07.2015 Сообщений: 6,674 Записей в блоге: 4 |
|
02.08.2017, 10:55 |
6 |
Вы валидатору тоже php-код скармливаете? Выкладывайте HTML.
0 |
dimkaja357 0 / 0 / 0 Регистрация: 20.05.2013 Сообщений: 44 |
||||||||
02.08.2017, 14:19 [ТС] |
7 |
|||||||
вот из исходного кода отрывок этот, сама таблица слишком большая тут только фрагмент Добавлено через 3 часа 5 минут Stray (start или end) tag — означает что отмеченный валидатором тег без каких либо оснований был вставлен не к месту и не по правилам стандарта html. В моем случае ошибка была в том, что я не заметил в исходном коде отсутствие тегов table. На странице очень много таблиц, которые выводятся программно и я просто не туда куда нужно смотрел. Картина у меня была такая
0 |
«Блуждающий нижний колонтитул начального тега» в валидаторе html?
Я не могу понять, почему я получаю эту ошибку:
Блуждающий нижний колонтитул начального тега.
Это код (контент я вынул, это только теги)
<!doctype html>
<head>
<title>title</title>
<meta charset="UTF-8">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<img src="heading.jpg" width="840" alt="pic">
<!--<div id="container"></div> used ot set width of page -->
<nav>
<div id="columns">
<a href="index.html">Home</a>
<a href="products.html">Products</a>
<a href="gift_ideas.html">Gift Ideas</a>
</div>
<br>
<div id="link">
<a href="link1.html">link1</a>|<a href="link2.html">link2</a>|<a href="link3.html">link 3</a>
</div>
</nav>
<section>
<br>
<div id="homePage">
<h1>Welcome</h1>
<br>
<div id="cart">
<img src>
</div>
</div>
</section>
</body>
<footer>
<br>
<h2>Contact Us</h2>
Email: <a href="email@example.co.nz">email@example.co.nz</a>
<img src>
</footer>
Я уверен, что закрыл все теги, так в чем проблема с нижним колонтитулом?
2 ответы
Вам нужно переместить </body>
конечный тег в самом конце, потому что footer
элемент не должен стоять после body
элемент, но внутри него. Это следует из синтаксиса корневого элемента, html
элемент: он содержит head
элемент и body
элемент, не более того.
Валидатор говорит «Блуждающий нижний колонтитул начального тега», потому что начальный тег появляется в контексте, в котором никакие элементы не могут быть запущены — после </body>
тег, где только необязательный </html>
тег может появиться.
Создан 22 сен.
Отсутствующий <html>
добавлены теги, <footer>
принес внутрь <body>
ярлык. Хотя это и не имеет прямого отношения к вашему вопросу, также может показаться, что вы используете <br>
теги, чтобы сделать пространство между различными элементами. Я бы посоветовал вам прекратить это делать и использовать CSS для настройки margin
вместо этого свойства этих элементов.
Полный код ниже:
<!doctype html>
<html>
<head>
<title>title</title>
<meta charset="UTF-8">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<img src="heading.jpg" width="840" alt="pic">
<!--<div id="container"></div> used ot set width of page -->
<nav>
<div id="columns">
<a href="index.html">Home</a>
<a href="products.html">Products</a>
<a href="gift_ideas.html">Gift Ideas</a>
</div>
<br>
<div id="link">
<a href="link1.html">link1</a>|<a href="link2.html">link2</a>|<a href="link3.html">link 3</a>
</div>
</nav>
<section>
<br>
<div id="homePage">
<h1>Welcome</h1>
<br>
<div id="cart">
<img src>
</div>
</div>
</section>
<footer>
<br>
<h2>Contact Us</h2>
Email: <a href="email@example.co.nz">email@example.co.nz</a>
<img src>
</footer>
</body>
</html>
Создан 22 сен.
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
html
css
validation
or задайте свой вопрос.
A <head> start tag has been found in an unexpected place in the document structure. Check that the <head> section appears before the <body> section, and that is not duplicated.
The <head> section of an HTML document is the container of metadata about the document, and must appear before the <body> section. A common cause of this issue is duplicated <head> sections.
Here is an example of a minimal HTML document structure:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
A <script> start tag has been found in an unexpected place in the document structure. Check that the <script> section appears within the <head> or <body> sections.
Here’s an example of a script inserted in the head of the document:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script>
console.log("Hello from the head");
</script>
</head>
<body>
<p></p>
</body>
</html>
A <style> start tag has been found in an unexpected place in the document structure. Check that the <style> section appears within the <head> section.
Although in general it’s better to put your styles in external stylesheets and apply them using <link> elements, CSS styles can also be included inside a document using the <style> tag. In this case, it should be placed within the <head> section, like in this example:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<style>
p {
color: #26b72b;
}
</style>
</head>
<body>
<p>This text will be green.</p>
</body>
</html>
Instead of using the isolang attribute to define the language of the document, you can use lang with an ISO 639-1 two character code.
For example, for Portuguese:
<html lang="pt">
Still checking your large sites one page at a time?
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.
And end tag has been found that does not match the current open element. Check the context to fix the start and end tags.
An <a> tag can’t include other <a> tags inside. Most probable cause is an unclosed <a> tag, like in this example:
<a href="one.html">Page 1
<a href="two.html">Page 2</a>
Still checking your large sites one page at a time?
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.
HTML documents are expected to start with a first line containing the Document Type Declaration, that defines the HTML version used. Since HTML5, it’s just <!DOCTYPE html>, which must appear before the start <html> tag.
Here’s an example of a minimal HTML5 document:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
All HTML documents must start with a <!DOCTYPE> (Document Type Declaration), that informs browsers about the type and version of HTML used to build the document. In HTML5, this is simply <!DOCTYPE html> and must appear at the start of the document.
Here is an example of a minimal HTML document, including the Document Type Declaration at its start:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
An end tag for X has been found that does not correspond to a previous open tag. This usually happens when you close the same tag twice, for example:
<ul>
<li>item</li>
</ul>
</ul>
In HTML5, there’s no need to specify the version attribute — it is now obsolete. Here’s an example minimal HTML document to start with:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
</head>
<body>
<p></p>
</body>
</html>
25,000 HTML checks per month. Fully automated.
Save time using our automated web checker. Let our crawler check your web pages on the W3C Validator.