Understanding HTML Tags and Elements
Building the skeleton of the web, one tag at a time 🧱💻

HTML which is Hyper Text Markup Language is basically the one who makes the skeleton of a website. Just like in a human body , we first have a skeleton , then skin and then the brain, similarly in the case of website we have HTML, CSS JavaScript. wherin HTML acts like the skeleton of the website, while CSS acts as the skin on top of that skeleton while JavaScript forms the brain of the website.
In its simplest form, HTML (HyperText Markup Language) is the standard language used to create the structure of a webpage. It isn't a programming language; instead, it is a markup language that uses "tags" to tell the browser how to display content.
HyperText: Refers to the "links" that connect webpages to one another.
Markup: Refers to the special symbols (tags) used to annotate text, images, and other content so the browser knows if something is a heading, a paragraph, or a list.
Language: Refers to the set of rules and syntax that must be followed, So that every browser interprets the code the same way.
Lets see some frequently used common tags and an Analogy to understand HTML
The Box Analogy
Think of an HTML tag as a label on a storage box. The opening tag (<tag>) is like opening the lid, the content inside is the item you’re storing, and the closing tag (</tag>) is like shutting the lid. The "box" (the element) tells the browser exactly what kind of content is inside so it knows how to handle it.
NOTE: Difference between a tag and an element:- A tag when contains the content(text, image, files etc) becomes an element.
Tags:
<h1>: The primary heading used to define the main title or most important topic of a webpage.<p>: The standard element used to distribute text into readable paragraphs.<div>: A generic block-level container used to group elements together for layout or styling purposes.<span>: An inline container used to mark up or style a specific part of a text without breaking the line.<ul>: Defines an unordered list where items are typically displayed with bullet points.<li>: Represents a single item within a list, whether that list is ordered or unordered.<a>: Creates a hyperlink that allows users to navigate to other pages, files, or locations on the same page.<img>: An empty, self-closing element used to embed an image by referencing its source file path.<section>: A semantic element used to wrap a standalone portion of a document that relates to a specific theme.<header>: Represents introductory content at the top of a page or section, often containing titles or navigation.<footer>: Contains concluding information at the bottom of a page or section, such as copyright and contact details.
Some HTML elements naturally start on a new line and take the full width of the page, such as headings, paragraphs, and divs. Others stay within the same line and only take as much space as needed, like span and links. This difference becomes very useful later when styling pages. This is block level vs inline elements. Block-level elements include h1 to h6, p, div, section, header, footer, ul, and li. Inline elements include span, a, img, strong, em, and br.
Not all HTML elements wrap content inside them. Some elements, like the image tag, only need a single tag because there is no content to place inside. These are called self-closing or void elements.
One good habit while learning HTML is to open any website, right click on it, and click on “Inspect”. What you see there is the HTML of that page. This helps in understanding how real websites are structured and makes HTML feel less abstract and more practical.
Hope this crisp blog helps you understand the HTML and its common Tags.




