HTML Document Structure

Valid values for id attribute

Here you will see how the basic html document structure looks like. The page includes a doctype declaration with a html, head, title and body element.

Doctype tells the browser what version oh html is using in the document.
For latest version html5 it is written as <!DOCTYPE html>

Read Also: HTML Forms

The other elements are:
html: Everything is wrtten between html tags.
head and title: In head tag we can put any javascript, css, meta words etc. Between title tag we used to show page title.
body: Here text, images, form, tables are used.

Let’s see a simple document structure:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<title>Untitled Document</title>

Leave a Reply

Your email address will not be published. Required fields are marked *