What is tag in HTML?
- In HTML tag define what will be the format of the content displayed on the web browser.
- Tags mainly have two parts one is opening tag and a closing tag.
- HTML tag starting tag is enclosed within <> and closing tag enclosed within </>
- Some HTML tags are self-closing tags or these tags are called empty tags. We don't need </> to close these tag.
Now, let's see different tags used in HTML
1). Heading
- Heading tag is used to create the heading on web pages.
- There are 6 headings available in HTML from h1 to h6.
- h1 is the largest and h6 is the smallest heading.
Output:
This is h1
This is h2
This is h3
This is h4
This is h5
This is h6
2). Navbar
This tag is used to create a navbar in HTML document.
3). Header
This tag is used to create page header.
4). Main
<main> tag in HTML is used to create the main content section of the webpage.
5). Div
<div> tag is used to create division on a webpage.
6). Section
<section> is used to create the particular section. It can contain more than one HTML tag.
7). Paragraph
<p> tag is used to create a paragraph.
8). Span
<span> is used to style the part of the text.
9). Anchor
<a> tag is used to create hyperlinks.
10). Footer
<footer> tag is used to create a footer for the webpage. And we can use more than one tag in the footer tag.
11). Mark
<mark> tag is used to highlight the background of the text.
This is our mark text And this is another text
12). Strike
<strike> is used to place horizontal lines on the text.
This is normal text
This is strike text
13). Button
<button> tag used to create a button on web page.
14). Small
<small> used to display small text. The text which is inside the <small> tag that text will be small as compared to normal text.
This is paragraph and This is small text
15). Pre
<pre> tag is used to create pre-formatted text. This will display the text on the web browser in which way we write on "index.html"
This is
my pre-formatted text
in HTML
16). Superscript
<sup> tag is used to create superscript text.
(a+b)2
17). Subscript
<sub> tag is used to create subscript text.
H2O
Code Described in the video