The basic layout or structure of an HTML document is as given below:
- It is not an HTML tag. It can be called a declaration which must be given as the first line of the document.
- <!DOCTYPE> declaration tells the browser that which version of html we are going to use. It is case- insensitive. All cases are acceptable:
1. <!DOCTYPE html>
2. <!DOCTYPE HTML>
3. <!doctype html>
4. <!Doctype Html>
HTML 4.01 Transitional//EN”
XHTML 1.0 Transitional//EN”
- eitworld.com use <!DOCTYPE html> in all the examples, which declares that we are going to use HTML5.
- The entire HTML document must be enclosed in <html> tag.
- This is the first tag of HTML document which indicates that the content written in it should be treated as HTML code. Therefore this is the only compulsory tag for an html document as it starts the coding.
- These tags are described in Head and Body Part.
- This tag encloses the Body Part of the document. This part contains all the tags and the contents that will be displayed in the web page in a desired manner.
- This is the widest part of HTML which you are going to study the most in this tutorial.
These tags are discussed in detail in next chapter.