DEV Community

Karthik
Karthik

Posted on

Basic HTML structure of a webpage

The doctype tag ( <!DOCTYPE html> ) informs the browser on which type of document is expected and this tag seems to be complicated in older versions of HTML whereas in the latest version ( HTML 5 ) , its simple as seen below. In simple terms , HTML is like skeleton of a webpage which displays plain text and CSS is like skin which includes formatting options like changing the color, alignment, style of fonts.

<!DOCTYPE html>
<html>
<head>
  <title>My First Page</title>
</head>
<body>
  <h1>Welcome to HTML!</h1>
  <p>This is a simple HTML page.</p>
</body>
</html>

Enter fullscreen mode Exit fullscreen mode

Below image gives a better understanding

This image displays the basic HTML structure of a webpage


Note:
Here we have discussed only the HTML part and CSS is not included.

Top comments (0)