๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Learn โ€บ HTML โ€บ Introduction_to_HTML โ€บ Debugging_HTML
Debugging HTML - Learn web development | MDN
July 26, 2024 - These are often harder to fix than syntax errors, as there isn't an error message to direct you to the source of the error. HTML itself doesn't suffer from syntax errors because browsers parse it permissively, meaning that the page still displays even if there are syntax errors in the source code.
๐ŸŒ
Medium
medium.com โ€บ @wewillcode โ€บ top-12-common-errors-that-you-encounter-while-using-html-f2909e3b1d48
TOP 12 COMMON ERRORS THAT YOU ENCOUNTER WHILE USING HTML | by Harsh Mehta | Medium
September 27, 2020 - TOP 12 COMMON ERRORS THAT YOU ENCOUNTER WHILE USING HTML 1. Missing or incorrect DOCTYPE The DOCTYPE tells Web browsers what version of HTML your page is using. Technically, it refers to a Document โ€ฆ
๐ŸŒ
W3Schools
w3schools.com โ€บ tags โ€บ ref_httpmessages.asp
W3Schools.com
When a browser requests a service ... an error code like "404 Not Found". It is common to name these errors HTML error messages. But these messages are something called HTTP status messages. In fact, the server always returns a message for every request. The most common message is 200 OK. Below is a list of HTTP status ...
๐ŸŒ
Codingtag
codingtag.com โ€บ some-common-html-errors-you-must-avoid
Some Common HTML Errors you must avoid | HTML Code Tips
This error is commonly seen in beginner HTML programmers and often leads to broken or not properly running codes. In HTML5, there are some of the tags which does not require to be closed as they are known as self-closing tags such as <br/>, <meta>, etc.
๐ŸŒ
IU Knowledge Base
kb.iu.edu โ€บ d โ€บ bfrc
Common HTML error codes
September 8, 2021 - Loading ยท Skip to page content
๐ŸŒ
Indiana University
servicenow.iu.edu โ€บ kb
Common HTML error codes - IUKB
Following is a list of the most common HTML error codes.
๐ŸŒ
CodeBasics
code-basics.com โ€บ frontend โ€บ html course โ€บ errors in html markup
Errors in HTML markup | HTML | CodeBasics
[HTML] โ€” Errors in HTML markup โ€” When marking up content on the page, there can often be problems, e.g., forgetting to close the tag, nesting elements that cannot be nested, or forgetting to specify the required tags...
๐ŸŒ
Nestify
nestify.io โ€บ blog โ€บ common-html-errors-to-avoid-how-to-check-them
Common HTML Errors to Avoid & How to Check Them
January 14, 2025 - This method is especially useful for catching errors that might be overlooked during manual review and ensures that your code meets web standards. Most modern browsers, including Google Chrome, Firefox, and Safari, come with built-in Developer Tools. To access them, right-click on your webpage, select โ€œInspectโ€ or โ€œInspect Element,โ€ and navigate to the โ€œConsoleโ€ tab. This section will display any HTML errors, warnings, or issues that the browser encounters when rendering the page. These errors are often related to issues with DOM structure, missing or improperly used HTML tags, and broken links.
Find elsewhere
Top answer
1 of 5
3

Your code is an absolute mess and doesn't follow the proper document structure for an HTML file, which should be:

Copy<!DOCTYPE html>
<html lang="en-us">
<head>
  <meta charset="utf-8">
  <title></title>
</head>
<body>


</body>
</html>

You had multiple <html> tags and tags in the wrong place with content that should not have been in them. For example, your <meta> tag was inside of your <style> element. Other issues I see: you have an <h1> and then jump to <h3>. Where's the <h2>?

So, your file would need to be re-worked to be like this (which does validate):

Copy<!DOCTYPE html>
    <html>
      <head>
         <meta charset="utf-8">
         <title>Ian Morgan Kettell</title>
         <style>
             table {
               border-style: solid;
             }
    
             td {
              border-style: solid; 
              border-color: #FF66FF;
              padding: 10px;
             }
         </style>
       </head>
       <body>
         <h1>Ian's Hobbies! </h1>
         <table>
           <tr>
            <td>Camping</td>
            <td>Hiking</td>
            <td>Cycling</td>
          </tr>
          <tr>
            <td>Fishing</td>
            <td>Kayaking</td>
            <td>Skiing</td>
          </tr>
        </table>
   
        <a href="movies.html">Learn about Ian's Favorite Actors and Movies!</a>
       <h2>My Favorite Movies</h2>
       <ul>
        <li>Promised Land</li>
        <li>Flight</li>
        <li>Taken</li>
       </ul>
      <p>
        The movies I chose were Promised Land starring Matt Damon, Flight
        starring Denzel Washington, and Taken starring Liam Neeson. Even though
        I have an endless list of favorite movies these are by far my top 3. I 
        like them because I like movies I can learn things from. For instance; 
        Promised Land is a film about oil companies fighting to buy land from 
        farmers to frack the land to find oil. It shows both sides of the 
        process of how they convince people and I found it extremely interesting.
     </p>
     <h2>My Favorite Actors</h2>
     <ul>
        <li>Matt Damon</li>
        <li>Denzel Washington</li>
        <li>Liam Neeson</li>
     </ul>
     <p>
        If I had to choose my favorite actors my top 3 would be Matt Damon, 
        Denzel Washington, and Liam Neeson. I think Denzel Washington is my 
        favorite actor of all time. He has been an actor since the year 1981 
        when he made his debut apperance in the comedy A Carbon Copy.He is best 
        known for Philadelphia Man, Man on Fire, The Book Of Eli, American 
        Gangster, and Flight.In recent years he has starred in action movies. 
        Some of my favorite movies he's in are Inside Man, Out of Time and The 
        Book Of Eli, these are all kind of action dramas.
     </p>
    </html>
Run code snippetEdit code snippet Hide Results Copy to answer Expand

2 of 5
1

It's very easy to validate online a HTML DOM structure:

You code has the following issues:

CopyContent Occurs After End Of Body (At line 39, column 1)
Discarding Unexpected <html> (At line 40, column 2)
<meta> Lacks "content" Attribute (At line 41, column 1)
Content Occurs After End Of Body (At line 41, column 1)
<meta> Isn't Allowed In <body> Elements (At line 41, column 1)
Content Occurs After End Of Body (At line 43, column 2)
<title> Isn't Allowed In <body> Elements (At line 43, column 2)
Content Occurs After End Of Body (At line 46, column 2)
Content Occurs After End Of Body (At line 49, column 1)
Content Occurs After End Of Body (At line 60, column 1)
Content Occurs After End Of Body (At line 66, column 1)
Content Occurs After End Of Body (At line 69, column 1)
Content Occurs After End Of Body (At line 80, column 1)
Discarding Unexpected </html> (At line 86, column -3)

You can use several online HTML validator to check this like W3C Markup Validation Service or other tools like this one.

So in your specific case, you have a closing html tag on line 39, that is the first error we can see and the classic

Content Occurs After End Of Body (At line 39, column 1)

and so on. As W3C validator points out, this first error is marked as FATAL, no way to parse the structure over:

CopyFatal Error: Cannot recover after last error. Any further errors will be ignored.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ invalid-html-syntax-examples-and-fixes
Common Causes of Invalid HTML Syntax โ€“ and How to Fix Them
April 18, 2023 - Remember, think of a line of code like a sandwich. When one slice of bread (or in this case, a closing tag) is missing, your masterpiece falls apart, leaving you angry, sad, and sometimes hungry. So sorry penguin! There you have it! Three common types of invalid syntax to look out for in your HTML file.
๐ŸŒ
Slushman
slushman.com โ€บ post โ€บ ten-common-html-mistakes
Ten Common HTML Mistakes
Make sure to learn and understand the proper usage of HTML tags to maintain a well-structured and semantically meaningful document. When including JavaScript code within your HTML document, always specify the type attribute for the <script> tag. For modern JavaScript, use the type="module" ...
๐ŸŒ
University of Texas at Austin
sites.utexas.edu โ€บ cofawebteam โ€บ best-practices โ€บ common-errors
Common HTML Errors โ€“ College of Fine Arts Web Instruction | College of Fine Arts | University of Texas At Austin
Following are some of the common errors made by content contributors when editing in a content management system. ... We encourage you to learn some HTML but be aware there is misinformation online and itโ€™s common to produce poor quality HTML code that may not work on all browsers or devices.
๐ŸŒ
Quora
quora.com โ€บ How-do-you-check-HTML-errors
How to check HTML errors - Quora
Answer (1 of 3): HTML errors are mostly breaking the syntax Example Improper closing tags or double/single quotes Most of the errors in HTML are highlighted by code editor itself.
๐ŸŒ
W3C
validator.w3.org โ€บ docs โ€บ errors.html
Error Explanations for The W3C Markup Validation Service
Check that you are using a proper ... This error may appear if you forget the last "--" to close one comment, and later open another. ... You have used an illegal character in your text. HTML uses the standard UNICODE Consortium character repertoire, and it leaves undefined (among others) 65 character codes (0 to 31 inclusive and 127 to 159 inclusive) that are sometimes used for typographical quote marks and similar in proprietary character sets. The validator has found one of these undefined ...
๐ŸŒ
Line25
line25.com โ€บ home โ€บ articles โ€บ 12 html mistakes not to make
12 HTML Mistakes Not to Make
April 18, 2025 - It is easy to write <html> instead of <html/> because both work the same way, slash or not. But not closing the opened tags may cause you a lot of burden of removing and fixing the errors, especially if the code is long enough. For instance, if we leave the <head> tag open to the <body> tag, the entire code turns useless.
๐ŸŒ
Abstracta
abstracta.us โ€บ home โ€บ development โ€บ top 3 bugs in html coding
Top 3 Bugs in HTML Coding and How to Fix Them Effectively | Abstracta
May 5, 2025 - This guide can serve as a quick reference and help maintain consistency across the codebase. When developers do not nest HTML elements correctly, they create improper nesting of tags. This can lead to rendering issues and affect the overall structure of the web page. Why Proper Nesting is Crucial for HTML? Properly nested elements are essential for: Rendering Problems: The browser may not display the content as intended and, instead, display an error message that disrupts the user experience or hinders functionality.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-are-error-messages-in-html
What are error messages in HTML?
Have you ever encountered a "404 not found" message in response to a query on the browsers? These situations occur when there is a problem with the server-side code, and it sends back a message to the client indicating the presence of the problem. Letโ€™s dig into these HTML error messages ...
๐ŸŒ
Quora
quora.com โ€บ How-can-I-find-HTML-errors-on-a-website
How to find HTML errors on a website - Quora
The way that browsers parse HTML is a lot more permissive than how programming languages are run, which is both a good and a bad thing. So what do we mean by permissive? Well, generally when you do something wrong in code, there are two main types of error that you'll come across:
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ would someone please explain what these error messages are telling me for this simple html page?
r/learnprogramming on Reddit: Would someone please explain what these error messages are telling me for this simple HTML page?
July 30, 2024 -

I went over the codes numerous times. I tried adding in and then removing the extra slash in the link tags.

What's up with this error message? Isn't my close tag correct?

<!-- Your code here -->

<!DOCTYPE html>

<html lang="en">

<head>

<title>My Site Title</title>

<link rel="stylesheet" type="text/css" href="style.css" />

</head>

<body>

</body>

</html>

Error message:

  1. index.html

valid html

has a valid HTML structure:

AssertionError: invalid HTML:

Expected omitted end tag <link> instead of self-closing element <link/>

Trailing whitespace

: expected false to be true

  • expected - actual

-false

+true

at Context.<anonymous> (test/indexTest.js:103:73)

at process.processImmediate (node:internal/timers:483:21)

๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_errors.asp
JavaScript Error Statements
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Editor JS Exercises JS Quiz JS Website JS Syllabus JS Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... In JavaScript, the try statement is used to handle errors (also called exceptions) that may occur during code execution - without stopping the entire program.