Is HTML elements are same as tags or not ? Last Updated : 02 Feb, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report HTML elements and tags are a lot different. Let's see what HTML elements and Tags actually are and their differences. The below image tells about HTML Elements and HTML Tags. HTML Tags: The starting and ending point parts of an HTML document are HTML Tags, which start with < (less than) and end with >(greater than) angle bracket, and whatever is written inside the angle brackets are known as tags. Both opening and closing tags must be there in order to function. There are also some self enclosing tags which require only one tag such as <hr>, <img>, <br> etc. The ending slash over here is optional. Syntax: <tagname> ... </tagname> Example: This example shows how a paragraph tag is used (consist of both start and end) and <hr> tag (self-closing tag). HTML <!DOCTYPE html> <html> <head> <title>HTML Tags</title> <style> .container { height: 180px; width: 300px; background-color: green; color: whitesmoke; text-align: center; font-family: 'Courier New', Courier, monospace; margin: auto; } p { font-size: 18px; } </style> </head> <body> <div class="container"> <h2>HTML Tags</h2> <p> Paragraph Tags - <p> </p></p> <hr> <p>The above line is due to <hr> tag</p> </div> </body> </html> Output: HTML Elements: Elements in HTML enclose the content in between the tags. It consists of an expression or a structure. Its architecture consists of a start tag, content followed by an ending tag. Syntax: <b> This is the content. </b> Example: This example shows the use of HTML Elements in the code. HTML <!DOCTYPE html> <html> <head> <title>HTML Elements</title> <style> .container { height: 200px; width: 350px; background-color: green; color: whitesmoke; text-align: center; font-family: 'Courier New', Courier, monospace; margin: auto; } p { font-size: 18px; } </style> </head> <body> <div class="container"> <h2>Gfg - HTML ELements</h2> <p>Everything within tags is HTML Element</p> <p>Visit <a href="https://www.geeksforgeeks.org/" target="_none">GeeksforGeeks</a> wesbite. </p> </div> </body> </html> Output: Let's see the difference between HTML elements and tags in deeper: HTML Tags HTML Elements HTML Element is held using HTML TagsContent is held using HTML elements.Starts with < and ends with >Everything within a HTML Tag is HTML element.They are keywords where every specific single tag has some unique meaning.They specify the general content. Comment More infoAdvertise with us Next Article Tags vs Elements vs Attributes in HTML S siddharth01 Follow Improve Article Tags : HTML HTML-Tags HTML-Questions Similar Reads Tags vs Elements vs Attributes in HTML In HTML, tags represent the structural components of a document, such as <h1> for headings. Elements are formed by tags and encompass both the opening and closing tags along with the content. Attributes provide additional information or properties to elements, enhancing their functionality or 2 min read What are empty elements in HTML ? An empty element is a component that doesn't have any embedded elements or text elements. Empty tags contain only the opening tag but they perform some action in the webpage. For example, <br> tag is an empty tag. In this article, we will see the empty tags in HTML & we will also focus on 3 min read Elements that are used in head section of HTML page The <head> element is like a container for metadata i.e. data about data and it also lies between the <html> tag and the <body> tag. Metadata is the data about the HTML document and is not displayed on the webpage. It defines the document title, style, script, and other meta inform 3 min read What is significance of declaring attribute in HTML elements ? In this article, we will know HTML Attributes' significance while declaring and their implementation through the examples. All HTML elements have attributes that will provide additional information about that particular element. It takes 2 parameters, ie, a name & a value which define the proper 2 min read Describe the void elements in HTML Most of the HTML elements are surrounded by start and end tags to specify the starting and end of the element. There is a special group of elements that only have start tags and does not contain any content within it, these elements are called void elements. Void elements doesn't have ending tags an 3 min read Is container tag same as the empty tag in HTML? If not, why ? In this article, we will see the container tag & empty tag in HTML, along with knowing how they're different from each other. The Container tag is not the same as the empty tag & these are two different categories of tags used in HTML. Container tag: This tag contains 3 parts, namely, the op 5 min read Like