Basic HTML Document Example
The following is an example of an HTML document -
HTML is a markup language and uses various tags to format the content. These tag angles are enclosed within braces <tag name>. Except for a few tags, most tags have their respective completion tags. For example, <html> has its own closing tag </html> and <body> tag has its own closing tag </body> tag etc.
1:- Doctype Element
The full name of the DOCTYPE element is the document type definition. This tag provides information about these two things: Web document type and HTML version.
The document type indicates to the computer that it is an HTML document. And from HTML version we get information about HTML version which version of HTML is used in this HTML document.
The HTML version and the document type declaration are used by the browser to correctly and fully understand the HTML page. So Doctype Declaration should give time to the Wee HTML Page.
2:- html Element
Opening <html> Tag is written immediately after Doctype Declaration. The HTML Element is the Root Element of the HTML Page. Other HTML tags are written between the Opening HTML Tag <html> and the Closing HTML Tag </html>.
3:- head Element
The Head Part of the HTML Document is defined by the Head Element. This Element has an important role in HTML Page.
The Head Element is used to give information about HTML Document ie Webpage to Browsers and Search Engines.
A Title element is written in the Head Element of HTML. Title of HTML document is written by Title Tag. The Document Title appears in the Browser Window and SERPs i.e. Search Engine Result Pages.
Apart from the title, additional information about a webpage is written by Meta Tag. This information includes Page Description, Keywords, Page Authorship Information, Author Name, Character Encoding, Browser Instruction etc. This information is collectively called Meta Data. Meta Data is not available to users. Because this information is not part of the actual content.
Some External Resources like JavaScript, External Style Sheets are also added to the Head Element itself. Link Tag is used to add External Page Resources to HTML Document.
4:-body Element
The part you see in this Lesson. They are all written within the Body Element. That is, the part of a webpage we see in the Browser Window. Everything is written in Body Tag.
Body Tag is the Main Container of an HTML Document. Page Headings, Paragraphs, Sub-headings are written within the Body Element. Graphics, Multimedia Files, or any other information you want to show the user. It is written inside this element.


Comments
Post a Comment
If you have any doubts, Please let me know