1.
This tag is used to declare the document type and version of HTML being used. It’s written as at the beginning of an HTML document before the tag. This ensures that the browser knows which version of HTML is being used and can render the page correctly.
Example:
This is a Heading
This is a paragraph.
2.
This tag is used to enclose all the HTML code of a webpage. It’s written as at the beginning of the document and at the end of the document. It tells the browser that this is an HTML document and contains all the other tags that the browser needs to render a webpage.
Example:
This is a Heading
This is a paragraph.
3.
This tag is used to enclose all the metadata and other elements that aren’t visible on the webpage. It’s written as
after the tag and before the tag. The metadata includes things like the page title, description, and other important information about the webpage.Example:
This is a Heading
This is a paragraph.
4.
This tag is used to set the title of the webpage. It’s written inside the
tag and is displayed in the browser’s title bar and search engine results. It’s important to choose a descriptive title that accurately represents the content of the webpage.Example:
This is a Heading
This is a paragraph.
5.
This tag is used to enclose all the visible content of the webpage. It’s written as
after the tag and before the tag. All the text, images, and other elements that are visible on the webpage are enclosed within the tag.Example:
This is a Heading
This is a paragraph.
In conclusion, learning these 5 essential HTML tags is a great starting point for coding beginners. They set the foundation for writing HTML code and building a basic webpage. As you become more comfortable with these tags, you can start exploring more advanced HTML tags and concepts. Happy coding!