Structure of HTML
We have already learnt from unit 1 about the structure of HTML. HTML contains all tags inside <html></html> tag. As we learnt html is a paired tag. Inside HTML tag, we have head and body tag too. All HTML files are having ".html" at the end of the file name which helps browser to identify the type of file.
<!DOCTYPE>
HTML <!DOCTYPE> declaration is mentioned before the opening of the HTML tag. This helps the browser to detect document type and note that <!DOCTYPE> is not HTML tag but it is just declaration for browser. Doctype tag is not case sensitive.
Head Tag
<head></head> tag is the first and very important tag which contains some data which helps HTML page in rendering indirectly. Head tag contains source files css, js files link and title tag and other meta tags.
Body Tag
<body></body> is also paired tag and all content are covered between body tag. All HTML code placed inside body tag is directly rendered and css style sheet and javascript mentioned in head tags are used for formatting and manipulating the existing code in the body.