The Best Guide to HTML Tags

Anytime you go on the internet, you are interacting with HTML code and related tags. HTML is primarily used to develop web pages and web applications that run on web browsers like Chrome, Firefox, and Internet Explorer. HTML tags are keywords present on a web page that define how your web browser must format and display the contents. In this article, you will learn about the different HTML tags and how they are used to create a web page, as well as cover the following topics:

  • What is HTML?
  • What is an HTML tag?
  • Basic HTML tags
  • Formatting tag
  • Link tag
  • List tag
  • Image tag
  • The table tag

Full Stack Java Developer Course

The Gateway to Master Web DevelopmentExplore Course
Full Stack Java Developer Course

What Is HTML?

HTML, which stands for Hypertext Markup Language, is the language used to describe structured documents and the language used to create web pages on the internet.

You can use any text editor to write the HTML code, such as  Notepad (PC) or TextEdit (Mac). For our demonstration, we will use a sublime text editor, which you can download at https://www.sublimetext.com/3

Save the file with the .html extension, and open it using a web browser of your choice.

html_file

What Is an HTML Tag?

HTML tags are the keywords on a web page that define how your web browser must format and display your web page.

Almost all tags contain two parts, an opening, and a closing tag. For example, <html> is the opening tag and </html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash ( / ) character. 

There are a total of 100 HTML tags. We will divide them into categories and discuss the important ones in this article.

Basic HTML Tags

Head Tag

The head tag <head> contains all the elements describing the document. 

Title Tag

The title tag <title> specifies the HTML page title, which is shown in the browser’s title bar. 

Body Tag

The body tag <body> is where you insert your web page’s content. 

Paragraph Tag

A paragraph tag <p> is used to define a paragraph on a web page.

Heading Tag 

The HTML heading tag is used to define the heading of the HTML document. The <h1> tag defines the most important tag, and <h6> defines  the least.

Let’s practice using these tags and create a web page with them:

Title_and_heading_tag-html

Output_title_and_heading_tag

Formatting Tags

Emphasis tag

The HTML <em> tag is used to emphasize the particular text in a paragraph. 

Bold Tag

The <b> tag is used to make the text bold.

Italic Tag

The <i> tag is used to make the text italic.

Underline Tag

The <u> tag is used to set the text underline.

Bold_italic_underline

output_page

Link Tag

The <a> tag links one page to another page. The href attribute is used to define 

Anchor_tag-html_tags

Output_anchor_tag

Free Course: Programming Fundamentals

Learn the Basics of ProgrammingEnroll Now
Free Course: Programming Fundamentals

List Tag

The <li> tag is used if you want to enter the contents in the listed order. There are two types of lists.

  • Ordered list <ol>
  • Unordered list <ul>

list_tag-html_tags

list_output

Image Tag

The <img> tag  is used to embed an image in an HTML document. You need to specify the source of the image inside the tag.

Image_tag

Image_tag_output-html_tags.

The center tag will center your content.

The Table Tag

The <table> tag is used to create a table in the HTML document.

The table row (<tr>) tag is used to make the rows in the table, and the table data (<td>) tag is used to enter the data in the table.

The style (<style>) tag is used to add methods to the content by typing the code in the HTML file itself. 

Table_tag-html_tags.

table_tag_output

Get skilled in HTML5 and CSS3 with the Full Stack Java Developer Master's Program. Click to check out the program details! 

Next Steps

This article on HTML tags offered a brief insight into different types of HTML tags and their functionalities. To learn more about web development in its entirety, certification is highly recommended to jumpstart your coding career. Further, Simplilearn’s Full Stack Java Developer will help you master web development. The course covers a wide array of relevant topics, including front-end, middleware, and back-end Java web developer technologies. You will learn to build an end-to-end application, test and deploy code, store data using MongoDB, and much more.

If you have any questions or feedback regarding the HTML tags article, let us know in the comments section. Our experts will get back to you as soon as possible.

About the Author

Taha SufiyanTaha Sufiyan

Taha is a Research Analyst at Simplilearn. He is passionate about building great user interfaces and keeps himself updated on the world of Artificial Intelligence. Taha is also interested in gaming and photography.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.