HTML Tags, Elements & Attributes Explained

what is html tags

HTML Tags, Elements, and Attributes – Beginners ke liye Simplified Guide

Agar aap web development seekhne ka plan kar rahe hain, to sabse pehla step hota hai HTML (HyperText Markup Language) ko samajhna. HTML kisi bhi website ka base structure hota hai.

Is blog mein hum baat karenge –
  Tags kya hote hain,
–  Elements ka kya role hai,
aur Attributes kaise kaam karte hain.

Yeh concepts clear hone ke baad aap easily apni khud ki basic website banana shuru kar sakte hain.

What is HTML Tags ?

HTML Tags woh codes hote hain jo browser ko batate hain ki kisi content ko kaise dikhana hai. Inhe angle brackets me likha jata hai: < >.

Example:

<p>This is a paragraph.</p>

Yahaan <p> opening tag hai, aur </p> closing tag.

Common HTML Tags:

  • <h1> to <h6> – Headings
  • <p> – Paragraph
  • <a> – Link
  • <img> – Image
  • <div> – Container
  • <span> – Inline text wrapper

What is HTML Elements?

Element ek complete unit hoti hai jisme hota hai:

  1. Opening Tag
  2. Content
  3. Closing Tag

 Example:

<h1>Hello, World!</h1>

Yeh pura ek HTML Element hai.

Kuch elements self-closing hote hain jinka closing part nahi hota:

 Example:

<img src=”image.jpg” alt=”My Image” />

Yeh image element hai jo self-closing hai.

What is HTML Attributes?

Attributes kisi tag ke andar likhi jaati information hoti hain jo kisi element ko extra functionality deti hain. Yeh hamesha name=”value” format mein hoti hai.

Example:

<a href=”https://www.example.com”>Visit Example</a>

Yahaan:

  • href hai attribute
  • “https://…” hai uska value

Popular HTML Attributes:

  • href – Link ka URL
  • src – Image ya video ka source
  • alt – Image ke liye alternate text
  • title – Tooltip ke liye
  • class – CSS styling ke liye
  • id – Unique element identify karne ke liye

Difference Between Tags, Elements, and Attributes

 

Feature

Tag

Element

Attribute

Kya hai

Angle bracket me likha

Tag + Content + End Tag

Tag ke andar likhi info

Example

<p>

<p>Hello</p>

href=”url” in <a> tag

Purpose

Start/End define karta hai

Content define karta hai

Behavior define karta hai

Why is it important to learn all this?

Agar aap web designing, front-end development ya blogging start karna chahte hain to aapko HTML ka yeh base clear hona chahiye. CSS aur JavaScript sikhne ke liye bhi aapko ye basic structure pata hona chahiye.

Yeh concepts samajhne ke baad aap:

– Apni khud ki basic website create kar sakte hain

– HTML ko CSS se style kar sakte hain

– JavaScript ke through website me functionalities add kar sakte hain

Leave a Reply

Your email address will not be published. Required fields are marked *

You have been successfully Subscribed! Ops! Something went wrong, please try again.

About Us

Techy Notes पर पाएँ आसान हिंदी में computer notes in hindi और IT company interview questions, जिससे तैयारी हो असरदार और आसान हर छात्र के लिए।

Recent news

  • All Post
  • Career Guidance
  • Interview
  • Jobs
  • Notes
  • Taja Khabar
  • Technology

© 2024 Created By Himanshu Nigam