Heading tags :
- There are six different heading tags from <h1> to <h6>.
- <h1> has the largest font size.
- <h6> has the smallest font size.
Example :
This will produce the following result −
<p> :
- This tag is used to display some text content on the web page.
- Plain text is placed inside this tag.
- If there are any empty lines and extra space in the text then <p> tag neglects them.
Example :
This will produce the following result −
<div> :
- This div tag is used to divide web page into blocks.
Example :
This will produce the following result −
<span> :
- This span tag is an inline element which will be very useful in styling some part of text or document with out ruining the format.
Example :
This will produce the following result −
<br/> :
- This is a self closing tag.
- It is used for line Break which means it provides an empty line.
Example :
This will produce the following result −
<hr/> :
- This is also a self closing tag.
- This tag draws a horizontal bar.
Example :
This will produce the following result −
<a href=""> :
- The anchor tag is used to link one to another page. Primarily used for including hyperlinks.
- It has one main attribute i.e. href attribute, which indicates the link’s destination.
- And another attribute is target attribute, which specifies where to open the linked document.
Example :
To open a link in another tab:
This will produce the following result −
<img/> :
- A tag to display images in the webpage.
- It’s main and most commonly used attributes are
- <src="url"> : It is used to specify the path of the image.
- <alt="text"> : It is used to display alternate text for an image, if the image for some reason cannot be displayed.
- width and height in pixels.
Example :
This will produce the following result −