DEV Community

Cover image for Which HTML element tag can be used to represent and show content to the user?
MELVIN GEORGE
MELVIN GEORGE

Posted on • Originally published at melvingeorge.me

Which HTML element tag can be used to represent and show content to the user?

Originally posted here!

The best HTML element to represent and show content that can be viewed by the user is the body HTML element tag

For example, the body HTML elements tag is used to add h1, p, article, nav, etc. HTML element tags that are seen by the user on the website.

The body HTML element tag can be written like this,

<!-- Usage of the 'body' HTML element tag -->

<!DOCTYPE html>
<html>
  <!-- 'body' HTML element tag  -->
  <body>
    <h1>Hello World</h1>
    <p>This is a paragrapgh tag inside the body tag</p>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

As you see from the above code we have used the h1 (heading level 1 tag) and p (paragraph tag) HTML tags inside the body HTML element tag that are used to show content when the user visits the website.

See the above code live in JSBin.

That's all 😃!

Feel free to share if you found this useful 😃.


Top comments (0)