HTML5: How to specify the main content of a document?
Solution:
HTML Code:
Explanation:
- The HTML document begins with a declaration of its type and version (<!DOCTYPE html>).
- The <html> element encloses the entire HTML document.
- The <head> section contains metadata about the document, including the character encoding and the title.
- Inside the <body> section, the content of the document is defined.
- The <article> element represents an independent piece of content in a document.
- Inside the <article> element, there are multiple <h1> (heading) and <p> (paragraph) elements that provide information about different search engines.
- Each <h1> represents a top-level heading, and the corresponding <p> element provides information about the search engine mentioned in the heading.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.