What are HTML Tags ? Last Updated : 05 Feb, 2024 Comments Improve Suggest changes Like Article Like Report HTML (HyperText Markup Language) is the standard markup language used to create the structure and layout of web pages. HTML documents consist of a series of elements, and these elements are defined using HTML tags. HTML tags are essential building blocks that define the structure and content of a webpage. In this article, we'll explore what HTML tags are, how they work, and provide detailed examples of common HTML tags. Understanding HTML TagsHTML tags are composed of an opening tag, content, and a closing tag. The opening tag marks the beginning of an element, and the closing tag marks the end. The content is the information or structure that falls between the opening and closing tags. Here's the basic structure of an HTML tag: <tagname> Content... </tagname>Let's delve into some commonly used HTML tags: Tag Name Description <html> Tag The <html> tag is the root element of an HTML document. It encapsulates the entire content of the page. <head> Tag The <head> tag contains meta-information about the HTML document, such as the title, links to stylesheets, and character set declaration. <body> Tag The <body> tag encloses the main content of the HTML document, including text, images, links, and other elements. Heading Tags <h1> to <h6> Heading tags are used to define headings in HTML, ranging from <h1> as the largest to <h6> as the smallest. Paragraph Tag <p> The <p> tag is used to define paragraphs of text. Anchor Tag <a> The <a> tag creates hyperlinks. The href attribute specifies the URL of the linked page. Image Tag <img> The <img> tag is used to embed images. The src attribute specifies the image file. List Tags <ul>, <ol>, <li> HTML supports both unordered lists (<ul>) and ordered lists (<ol>), with list items (<li>) defining each list item. bold Tag <b> The bold tag in HTML is used to specify the bold text without any extra importance. Example 1: This example displaying the uses of heading and paragraph element. HTML <!DOCTYPE html> <html> <head> <title>HTML Tags example</title> </head> <body> <h2>Welcome To GeeksforGeeks</h2> <p>A computer science portal for geeks.</p> </body> </html> Output: Example 2: This example describes the uses of <img> tag to display image on the screen. HTML <!DOCTYPE html> <html> <head> <title>HTML Tags Example</title> </head> <body> <img src="https://media.geeksforgeeks.org/wp-content/uploads/20210915115837/gfg3.png" alt="GFG image" /> </body> </html> Output: Comment More infoAdvertise with us Next Article What are HTML Tags ? V vkash8574 Follow Improve Article Tags : HTML HTML-Tags HTML-Questions Geeks Premier League 2023 Similar Reads What are logical tags in HTML ? Logical tags are used to tell the browser what kind of text is written inside the tags. They are different from physical tags because physical tags are used to decide the appearance of the text and do not provide any information about the text. Logical tags are used to indicate to the visually impai 5 min read What are physical tags in HTML? Physical Tags are used to indicate that how specific characters are to be formatted or indicated using HTML tags. Any physical style tag may contain any item allowed in text, including conventional text, images, line breaks, etc. Although each physical tag has a defined style, you can override that 5 min read What is HTML? HTML (HyperText Markup Language) is the standard markup language used to structure web pages. It is used to create various elements of a webpage/website such as nav-bar, paragraphs, images, video, Forms, and more, which are displayed in a web browser.HTML uses tags to create elements of a webpage.It 3 min read What is HTML DOM ? HTML DOM stands for the Document Object Model is a tree-like structure that offers dynamic interaction and manipulation of the content, structure, and style of an HTML document. It is an interface for web documents. Based on user activity The HTML DOM offers to create interactive web pages where ele 4 min read HTML abbr Tag The <abbr> tag in HTML is used to represent abbreviations and provides additional information about them through the title attribute, which displays a tooltip when hovered over. It helps improve accessibility and SEO by offering context for the abbreviated text.It makes text clearer by explain 3 min read HTML article Tag The HTML <article> tag defines a self-contained, independent piece of content like a blog post, news article, or comment. It is designed for content that can be independently distributed, shared, or reused, providing semantic meaning to the content.This tag is introduced in HTML5.HTML<!DOCT 3 min read HTML a Tag The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. This attribute determines where the user is directed upon clicking the link.HTML<a href="http 2 min read What are Self Closing Tags in HTML? Self-closing tags, also known as void elements, are HTML elements that do not require a separate closing tag. These tags are self-contained and are typically used for elements that do not have any content between an opening and closing tag. Self-closing tags help keep the HTML structure clean and co 3 min read HTML hr Tag The <hr> tag in HTML is used to create a horizontal rule or line that visually separates content.It is a self-closing tag and does not require an end tag. It supports both Global Attributes and Event Attributes.Syntax:Some Content.. <hr> Some Content..HTML<!DOCTYPE html> <html 2 min read HTML br Tag The <br> tag in HTML is used to create a line break in the text, causing the content that follows it to appear on a new line. Note: It is a self-closing tag, meaning it does not need a separate closing tag.HTML<!DOCTYPE html> <html> <body> <p>Dear Reader, <br>This 2 min read Like