Well-Formed HTML

Well-Formed HTML#

This is a very basic HTML document. The HTML tags <HTML> identify this document as a html document. The body tags <body> enclose the content that will be visible on the page. You should see just the text “Hello World!” The browser has translated the HTML tags and returned only the text.

hello-world.html contains the minimum requirements for an HTML document. However, it is best practice to create a HTML document that is “well formed,” that is, that it follows all of the grammar, vocabulary, and syntax rules of html. We can check the well-formed-ness of this document in a validator like the W3C Markup Validation Service.

Head to the W3C validator and click on “Validate by Direct Input” and copy and paste the code above into the validator and click check. You should receive a few errors.

HTML is pretty forgiving, but other languages are not, so it’s best to practice following all of the rules from the start.