Tags in HTML

Types of tags in HTML



Headings


These tags are used for headings in the content of a webpage. These tags are mainly written inside the body tag. There are six heading tags ranging from <h1> to <h6>

<html> <head> <title>My First page</title> </head> <body> <h1>Hi, this is a heading</h1> <h2>Hi, this is a heading</h2> <h3>Hi, this is a heading</h3> <h4>Hi, this is a heading</h4> <h5>Hi, this is a heading</h5> <h6>Hi, this is a heading</h6> </body> </html>
Copy this code and paste it in your html file to see the changes.


Paragraphs and Horizontal lines


These tags are used for paragraph in a webpage. The paragraph tags start with <p> tag and ends with </p>. The <br> is used to break line and helps to enter text in the next line. The <hr> tag is used to enter a horizontal line.

<html> <head> <title>My First page</title> </head> <body> <h1>This is a heading</h1> <p> This is first paragraph<br> This is second paragraph<br> <hr> This is third paragraph<br> </p> </body> </html>
Copy this code and paste it in your html file to see the changes.



Image tag


These tags are used to insert image in our webpage. The image tag is <img src="source_of_image" >. Here the src should contain the location of the image file. The source of the image file may be local folder location or online link. We have also included an alt (alternative) attribute. In this attribute, you specify descriptive text for users who cannot see the image due to visual impairment or due to image unavailability.

<html> <head> <title>My First page</title> </head> <body> <h1>This is a heading</h1> <hr> <img src="https://exadataanalytics.com/static/exadata/assets/logos/logos/html.png" alt="my test image"> </body> </html>
Copy this code and paste it in your html file to see the changes.



Lists


A lot of the web's content is lists, and HTML has special elements for these. Marking up lists always consist of at least 2 elements. The most common list types are ordered and unordered lists:

  • 1. Unordered lists: These are lists where the order of the items doesn't matter. They are represented by <ul> tag.

  • 2. Ordered lists: These are lists where the order of the items matters. They are represented by <ol> tag.
<html> <head> <title>My First page</title> </head> <body> <h1>This is a heading</h1> <ul> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> </ul> </body> </html>
Copy this code and paste it in your html file to see the changes.



Links


Links are very important — they are what makes the web a web! To add a link, we need to use a simple element — <a> — "a" being the short form for "anchor".

<html> <head> <title>My First page</title> </head> <body> <h1>This is a heading</h1> <a href="https://www.exadataanalytics.com/">Click here to go to home page</a> </body> </html>
Copy this code and paste it in your html file to see the changes.



There are a lot of tags in HTML which is out of the scope of this chapter. If you are interested in learning more, you can click here to explore different tags in HTML




ABOUT US

Exadata Analytics is committed to Innovations and Product Development. It was carefully formed by a group of Experienced Engineers and passionate team. We are emerging Technology R&D Organization, which primarily focuses on Web Development, Software Development, Industrial Product Designing, DIY Laboratory Trends, 3D printers, CNC Router, and other related emerging Technologies.

CONTACT

116 Bharathi St, Pondicherry 605009



+91-9486080924



info@exadataanalytics.com

SOCIAL