HTML 5 Document Structure

General HTML 5 Document Structure is as below

<!DOCTYPE html> specifies that this document is html 5 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 page we can use many other tags here like <title> which is used to specify the title of page and may other.

<body> we put the contents which you would like to display on browser.
Inside body tag we use many different html tags to proper formatting the data.

HTML logo png

Find HTML5 LOGO Here



In above syntax start and end tags are optional.

if you dont want to use any attribute with root tab ie <html lang=”en”> then you can omit this

So syntax with out root tag

Exampe of html document


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

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

Syntax with xmlns



Read More

  1. HTML Image Tag