Introduction
In HTML, the <main>
tag is used to represent the main or dominant content of the document. It is a newly introduced tag in HTML5 and is typically written within the <body>
tag. The content of the <main>
tag should be unique and directly related to the central topic of the document. It is a similar concept to a landmark, which quickly identifies and makes navigation easier in a large document.
In this lab, we will learn how to use the <main>
tag to create a main content container in HTML.
Note: You can practice coding in
index.html
and learn How to Write HTML in Visual Studio Code. Please click on 'Go Live' in the bottom right corner to run the web service on port 8080. Then, you can refresh the Web 8080 Tab to preview the web page.