

This will usually be the first tag shown in the element. UTF-8 is the standard character encoding you should use in your web pages. Inside the tags, you will nest metadata which is data that describes the document to the machine.

The tags contain information that is processed by machines. It is also good to include it for accessibility reasons, because screen readers will know how to properly pronounce the text. The lang attribute inside the opening tag sets the language for the page. The tag is the top level element of the HTML file.

If you forget to include this line of code in your file, then some of the HTML 5 tags like, , and may not be supported by the browser. A doctype tells the browser what version of HTML the page is written in. The first line in your HTML code should be the doctype declaration. You should add this boilerplate to all of your HTML pages. What is an HTML 5 boilerplate?Īccording to Wikipedia, boilerplate code or just boilerplate are sections of code that are repeated in multiple places with little to no variation.Ī boilerplate in HTML is a template you will add at the start of your project. In this article, I will explain what an HTML 5 boilerplate is and how to create a basic template to use in your projects. When you are building a new website, it is important to have a good starting foundation.
