HTML5 Document Structure

HTML5 Document Structure

General HTML 5 Document Structure is as below

<!DOCTYPE html> specifies that this document is HTML5 document and you can use all html5 tags here.

<html> is root tag of HTML document it contains two child tags <head> and <body>

<head> specifies that this portion contains heading information of the page we can use many other tags here like <title> which is used to specify the title of the page and many others.

<body> we put the contents which you would like to display on the browser.
Inside the body tag, we use many different HTML tags to proper formatting the data like p,heading tags, and image.

HTML logo png

Find HTML5 LOGO Here



In the above syntax start and end tags are optional.

if you don’t want to use an attribute with the root tab ie <html lang=” en”> then you can omit this

So syntax without root tag

Example of HTML5 Document Structure


In the XHTML syntax, we have to specify the xmlns to declare that it is an HTML namespace.

We can use lang or xml:lang attribute to specify the language

Syntax with xmlns



Read More

  1. HTML Image Tag