HTML defines three tags that are used to defined the page's overall structure and provide some simple header information. These three tags - <html>, <head>, and <body> - make up the basic skeleton of every web page.
They also provide simple information about the page (such as its title or its author) before loading the entire thing. HTML tags are hidden keywords within a webpage that define how your web browser must format and display the content.
👉Types of HTML Tags
1. Container tag (Paired tag):
Container tags are the tags in html which have both opening and a closing tag.
Example:
- <html> HTML documents </html>
- <title> any title name </title>
- <body> Content here </body>
- < p> any paragraph </p>
- <div> container of HTML element </div>
2. Empty tag(Unpaired tag):
Empty tags have no ending tag.
Example:
- <br> - for break
- <img> - for embed an image in a web page
- <hr> - for thematic break
- <input> - for create both input fields and interactive controls for web-based forms
NOTES:
1. The <html> tag indicates that the file is in the HTML language. The <head> tag specifies that the lines within the beginning and ending points of the tag are the prologue to the rest of the file. The <body> tag encloses the remainder of your HTML page (text, pictures, and so on).
2. The <title> tag is used to indicate the title of a web page in a browser's title bar and bookmarks. It is also used by search engines. This tag always goes inside the <head> tags.
3. The <p> tag is intended specifically to hold paragraphs of text.
4. The <div> tag is the general-purpose tag for containing content on a page.