Skip to main content

Command Palette

Search for a command to run...

Understanding HTML Tags and Elements

Updated
β€’2 min readβ€’View as Markdown
Understanding HTML Tags and Elements
V
Vishal Gupta Android dev in progress. Building toward SaaS β€” one shipped product at a time. I care about reliability over hype. Still learning, but I build things that work.

Hello πŸ‘‹

Let’s understand the basics of HTML tags and elements step by step.

What is HTML

HTML (Hyper Text Markup Language ), it is a text-based language use it for structure and meaning of the content on the web. Browser parse these HTML and render them to visual web pages .

Why we use HTML

We use HTML to :

  • define structure (heading, paragraph)

  • Add meaning/semenic (<article>, <nav>, <header>)

  • create hyperlinks

  • embed video, audio, map

What an HTML tag is

HTML tag is keyword, which enclosed in brackets (< and >). This tag used for build sentenced and links .

<h1>THIS IS VISHAL GUPTA BLOG</h1>
<a></a>

Opening tag, closing tag, and content

Opening tag : Tags which which is <> in this format called opening tag. e.g: <p>, <h1>, <span> etc.

Closing tag : Tags which which is </> in this format called opening tag. e.g: </p>, </h1>, </span> etc.

Content: Opening tag and Closing between text called content . e.g: <p>This is paragraph</p> etc.

What an HTML element means

HTML element is a component of a web page that tell to browser hoe to represent that content and how it should be structured .

<h1>Welcome</h1>

Self-closing (void) elements

Self-closing tag which also known as void element these tag not require closing tag .

e.g: <br>, <hr> ..etc

Block-level vs inline elements

Block-level Elements : Which element that occupy full width and stack vertically .

Inline-level elemets: That elements that occupy necessary width and sit next to each other .

Commonly used HTML tags

These are commonly used HTML tags:

  • h1 – h6 β†’ Heading tags (from largest to smallest)

  • p β†’ Paragraph tag

  • span β†’ Inline container for text

  • br β†’ Line break

  • hr β†’ Horizontal line

  • div β†’ Block-level container

  • nav β†’ Navigation section

Final Note πŸ‘‹

HTML is the building block of the web.
Understanding tags and elements clearly makes learning CSS and JavaScript much easier.

See you in the next lesson β€” happy coding! πŸš€

More from this blog

V

Vishal Kumar Gupta

22 posts

Hello , This is Vishal here , i strat writing blog with my web-cohort 2026 journey . Yeah this is helpful for me to understand myself how can i capable to put my thought throgh the blog