Admittedly, I’m new to coding so I’m sure there may be many issues in my code. The errors that are showing up right now are all Element div is not closed.
If someone can please help me resolve this, it would be greatly appreciated, thank you. My code is listed below:
.instagramlogo {
position: absolute;
width: 50px;
left: 20px;
top: 20px;
cursor: pointer;
}
.linkedinlogo {
position: absolute;
width: 50px;
left: 100px;
top: 20px;
cursor: pointer;
}
<body>
<!-- banner, navigation bar, logos which hyperlink to my socials -->
<div class="banner">
<div class="navbar">
<a href="https://www.instagram.com/shegonnacode/"><img src="images/pngfind.com-instagram-png-22629.png" alt="Instagram logo" class="instagramlogo"></a>
<a href="https://www.linkedin.com/in/paula-m-175737200/"><img src="images/pngfind.com-linkedin-png-533561.png" alt="Linkedin logo" class="linkedinlogo"></a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="lists.html">Lists</a></li>
<li><a href="contacts.html">Contact</a></li>
</ul>
</div>
<!--About section begins-->
<section class="welcome">
<div class="content">
<h1>Welcome to Paula's Portfolio</h1>
<p>Thank you for visiting my portfolio. This is a visual depiction of my internal creativity<br>and I hope you enjoy your experience. The navigation bar on the upper right corner
<br>will direct you to your desired location. </p>
</div>
<div class="statement">
<p> Paula Munoz, aspiring software developer and first year student currently enrolled in George Brown <br>                                   College's Computer Programming
and Analysis program.</p>
</div>
<!--validation script-->
<script src=https://my.gblearn.com/js/loadscript.js></script>
</body>
As I stated, I am a noob with coding as I have tried to mess around with the arrangement of my divs and added+ and removed but my attempts have failed miserably. Any help would be appreciated, thank you!
Michael M.
7,2406 gold badges14 silver badges34 bronze badges
asked Nov 1, 2022 at 23:54
3
The W3C Validator (a great site to check for errors in HTML) shows three problems with your code:
- The
<div class="banner">
element is unclosed. This means that you never closed it with a corresponding</div>
tag. All HTML tags must have an ending tag. Sometimes you might mess up and forget one by accident, so it is good to use the W3C Validator to detect these errors and show you where you messed up. - The
<section class="welcome">
element is unclosed. Like the first error, you’re missing a closing</section>
tag. - You used
 
, but you should have used
. HTML escape codes are always in the format of&something;
, starting with an ampersand and ending with a semicolon.
I’ve fixed these errors in the code below:
.instagramlogo {
position: absolute;
width: 50px;
left: 20px;
top: 20px;
cursor: pointer;
}
.linkedinlogo {
position: absolute;
width: 50px;
left: 100px;
top: 20px;
cursor: pointer;
}
<body>
<!-- banner, navigation bar, logos which hyperlink to my socials -->
<div class="banner">
<div class="navbar">
<a href="https://www.instagram.com/shegonnacode/"><img src="images/pngfind.com-instagram-png-22629.png" alt="Instagram logo" class="instagramlogo"></a>
<a href="https://www.linkedin.com/in/paula-m-175737200/"><img src="images/pngfind.com-linkedin-png-533561.png" alt="Linkedin logo" class="linkedinlogo"></a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="lists.html">Lists</a></li>
<li><a href="contacts.html">Contact</a></li>
</ul>
</div>
</div>
<!--About section begins-->
<section class="welcome">
<div class="content">
<h1>Welcome to Paula's Portfolio</h1>
<p>Thank you for visiting my portfolio. This is a visual depiction of my internal creativity<br>and I hope you enjoy your experience. The navigation bar on the upper right corner
<br>will direct you to your desired location. </p>
</div>
<div class="statement">
<p> Paula Munoz, aspiring software developer and first year student currently enrolled in George Brown <br> College's
Computer Programming and Analysis program.</p>
</div>
</section>
<!--validation script-->
<script src=https://my.gblearn.com/js/loadscript.js></script>
</body>
answered Nov 2, 2022 at 0:06
Michael M.Michael M.
7,2406 gold badges14 silver badges34 bronze badges
1
Вот и наступило 30 сентября.
Как и обещал, делюсь с форумчанами статистикой по проверке валидности их сайтов. А так же самыми частыми ошибками и как их исправить.
За время этой акции, с 7 по 30 сентября было проверено 70 сайтов. Некоторые проверялись по 2 и 3 раза, так как имелись случаи возникновения глобальной ошибки и остальные не показывались. Глобальная ошибка возникает, если в <HEAD> производится вывод какой-либо информации, например, вставляется информер или счётчик.
Количественная статистика.
Это подсчёт всех найденных ошибок по их количеству.
№№
Значение ошибки
Количество
Пустой или с неправильным содержимым другой элемент.
Качественная статистика.
Это подсчёт всех встречающихся ошибок на сайтах, т.е., если ошибка встречается 10 раз, то считается, как 1.
№№
Значение ошибки
Повторов
Пустой или с неправильным содержимым другой элемент.
№№
Указание ошибки
Значение ошибки
Как исправить ошибку
№№
Указание ошибки
Значение ошибки
Вот такая статистика получилась в итоге.
По общему признанию, я новичок в программировании, поэтому я уверен, что в моем коде может быть много проблем. Ошибки, которые появляются прямо сейчас, все Element div is not closed.
. Если кто-то может помочь мне решить эту проблему, я был бы очень признателен, спасибо. Мой код указан ниже:
.instagramlogo {
position: absolute;
width: 50px;
left: 20px;
top: 20px;
cursor: pointer;
}
.linkedinlogo {
position: absolute;
width: 50px;
left: 100px;
top: 20px;
cursor: pointer;
}
<body>
<!-- banner, navigation bar, logos which hyperlink to my socials -->
<div class="banner">
<div class="navbar">
<a href="https://www.instagram.com/shegonnacode/"><img src="images/pngfind.com-instagram-png-22629.png" alt="Instagram logo" class="instagramlogo"></a>
<a href="https://www.linkedin.com/in/paula-m-175737200/"><img src="images/pngfind.com-linkedin-png-533561.png" alt="Linkedin logo" class="linkedinlogo"></a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="lists.html">Lists</a></li>
<li><a href="contacts.html">Contact</a></li>
</ul>
</div>
<!--About section begins-->
<section class="welcome">
<div class="content">
<h1>Welcome to Paula's Portfolio</h1>
<p>Thank you for visiting my portfolio. This is a visual depiction of my internal creativity<br>and I hope you enjoy your experience. The navigation bar on the upper right corner
<br>will direct you to your desired location. </p>
</div>
<div class="statement">
<p> Paula Munoz, aspiring software developer and first year student currently enrolled in George Brown <br>                                   College's Computer Programming
and Analysis program.</p>
</div>
<!--validation script-->
<script src=https://my.gblearn.com/js/loadscript.js></script>
</body>
Как я уже сказал, я новичок в кодировании, поскольку я пытался возиться с расположением моих div, добавлял + и удалял, но мои попытки с треском провалились. Любая помощь будет оценена, спасибо!
W3C Validator (отличный сайт для проверки ошибок в HTML) показывает три проблемы с вашим кодом:
- Элемент
<div class="banner">
не закрыт. Это означает, что вы никогда не закрывали его соответствующим тегом</div>
. Все теги HTML должны иметь закрывающий тег. Иногда вы можете случайно что-то напутать и забыть, поэтому хорошо использовать W3C Validator, чтобы обнаружить эти ошибки и показать вам, где вы ошиблись. - Элемент
<section class="welcome">
не закрыт. Как и в случае с первой ошибкой, вам не хватает закрывающего тега</section>
. - Вы использовали
 
, но вам следовало использовать
. Экранирующие коды HTML всегда имеют формат&something;
, начиная с амперсанда и заканчивая точкой с запятой.
Я исправил эти ошибки в коде ниже:
.instagramlogo {
position: absolute;
width: 50px;
left: 20px;
top: 20px;
cursor: pointer;
}
.linkedinlogo {
position: absolute;
width: 50px;
left: 100px;
top: 20px;
cursor: pointer;
}
<body>
<!-- banner, navigation bar, logos which hyperlink to my socials -->
<div class="banner">
<div class="navbar">
<a href="https://www.instagram.com/shegonnacode/"><img src="images/pngfind.com-instagram-png-22629.png" alt="Instagram logo" class="instagramlogo"></a>
<a href="https://www.linkedin.com/in/paula-m-175737200/"><img src="images/pngfind.com-linkedin-png-533561.png" alt="Linkedin logo" class="linkedinlogo"></a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="resume.html">Resume</a></li>
<li><a href="lists.html">Lists</a></li>
<li><a href="contacts.html">Contact</a></li>
</ul>
</div>
</div>
<!--About section begins-->
<section class="welcome">
<div class="content">
<h1>Welcome to Paula's Portfolio</h1>
<p>Thank you for visiting my portfolio. This is a visual depiction of my internal creativity<br>and I hope you enjoy your experience. The navigation bar on the upper right corner
<br>will direct you to your desired location. </p>
</div>
<div class="statement">
<p> Paula Munoz, aspiring software developer and first year student currently enrolled in George Brown <br> College's
Computer Programming and Analysis program.</p>
</div>
</section>
<!--validation script-->
<script src=https://my.gblearn.com/js/loadscript.js></script>
</body>
0
Michael M.
2 Ноя 2022 в 03:06
Adobe Support Community
-
Global community
- Language:
-
Deutsch
-
English
-
Español
-
Français
-
Português
-
日本語コミュニティ
- 한국 커뮤니티
-
-
Home
-
Dreamweaver
-
Discussions
-
- Unclosed Element Div
![correct answers](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E)
1 Correct answer
LEGEND
,
Feb 07, 2017
Feb 07, 2017
osgood_
•
LEGEND
,
Feb 07, 2017
Feb 07, 2017
The end of your page should look like below:
</div>
</div>
<!— end media-object-default —>
</div>
<!— end col-lg-6 col-md-6 —>
</div>
<!— end container —>
</body>
</html>
But you have this:
</div>
<!— end col-lg-6 col-md-6 —>
<!— end media-object-default —>
<!— end container —>
</body>
</html>
7
Replies
7
Что означают следующие сообщения об ошибках?
Я проверяю свой веб-сайт, но получаю странные сообщения о тегах. У меня есть вакансия div
вверху страницы, но я все равно получаю эти ошибки. Это ложные предупреждения?
# Error Line 195, Column 7: end tag for element "div" which is not open
</div><!-- wrapper -->
Валидатор обнаружил конечный тег для указанного выше элемента, но этот элемент в настоящее время не открыт. Это часто вызвано оставшимся конечным тегом элемента, который был удален во время редактирования, или неявно закрытым элементом (если у вас есть ошибка, связанная с недопустимым использованием элемента, это почти наверняка так). В последнем случае эта ошибка исчезнет, как только вы исправите исходную проблему.
Если эта ошибка произошла в разделе вашего документа, посвященном сценариям, вам, вероятно, следует прочитать этот раздел часто задаваемых вопросов.
# Error Line 195, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 16 and div
</div><!-- wrapper -->
# Error Line 208, Column 8: XML Parsing Error: Opening and ending tag mismatch: html line 2 and body
</body>