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.
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.
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
The head tag <head> contains all the elements describing the document.
The title tag <title> specifies the HTML page title, which is shown in the browser’s title bar.
The body tag <body> is where you insert your web page’s content.
A paragraph tag <p> is used to define a paragraph on a web page.
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:
The HTML <em> tag is used to emphasize the particular text in a paragraph.
The <b> tag is used to make the text bold.
The <i> tag is used to make the text italic.
The <u> tag is used to set the text underline.
The <a> tag links one page to another page. The href attribute is used to define
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>
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.
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.
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.