Structure

The very basic structure of an HTML page consists of:

  • <!DOCTYPE html> DTD - Document Type Definition
  • <html> </html> Opening and closing html tags
  • <head> </head> Opening and closing head tags, nested within the above
  • <title> </title> Opening and closing title tags, nested within the above
  • <body> </body> Opening and closing body tags, following after the above closing </head> tag
  • followed by general html tags and content within the above <body> tags

 

Visual representation:

 

Code representation:

<!DOCTYPE html>
<html>
	<head>
		<title>Document Title</title>
	</head>
	<body>
		<h1>My first heading</h1>
		<img src="path/imageFileName.png">
		<p>Hello world!</p>
	</body>
</html>

Save & refresh browser:

 

Browser representation:

My first heading

Hello, World!

Leave a Reply