What are the type of tag in html?
Answers
Answer:
HTML tag: It is the root of the html document which is used to specify that the document is html. Head tag: Head tag is used to contain all the head element in the html file. It contains the title, style, meta, … etc tag.Title tag: It is used to define the title of html document.
Answer:
HTML uses various tags to create the structure of the web page. Every tag is written inside angular brackets <>. Almost every tag also has a corresponding closing tag. Tags are also known as elements.
Tags are of two types-
Container Tags/Elements
Empty Tags/Elements
The tags are discussed below:
<!DOCTYPE html>
This tag is used to tell the web browser that the following text document is a HTML document. There's no need to mention the HTML version.
<html>
This tag comprises of the complete HTML document and everything in a HTML document needs to be written inside these angular brackets.
<head>
This tag is used for document's header.
<title>
This tag is used to mention the title of the document and is placed inside <head> tag.
<body> This tag consists of body of HTML document. It includes other HTML tags like <h1> and <p>.
<h1>
This tag represents the main heading of the document. A document can have multiple headings and can be denotes as <h2>, <h3>,...,etc.
<p>
This is a container element and is used to represent the paragraph of the HTML document.