HTML
Semanti
c Tags
and
Block/I
nline
Tags
1) Semantic Tags kia hain?
Semantic tags woh HTML tags hain jo page ka ma'ana (meaning) bataatey hain — yani browser
aur search engines ko samajh aata hai ke iska maqsad kya hai. Yeh accessibility aur SEO behtar
kartey hain.
Example:
<header> - page ya section ka header
<nav> - navigation links
<main> - page ka main content
<article> - khud mukhtasar maqala ya article
<section> - content ka logical section
<aside> - side content (sidebar, related links)
<footer> - page ka footer
2) Semantic vs Non-semantic Tags
Non-semantic tags sirf layout ke liye hotey hain, un se koi meaning nahi milta. Jaise <div> aur
<span>.
3) Block-level Tags (Block tags)
Block tags nayi line se shuru hotey hain aur poora available width le letay hain.
Example:
<div>, <p>, <h1> ... <h6>, <header>, <footer>, <section>, <article>, <nav>, <aside>,
<main>, <form>, <ul>, <ol>, <li>, <table>, <blockquote>
4) Inline Tags (Inline tags)
Inline tags same line mein render hotey hain aur sirf jitna zaroori ho width letey hain.
Example:
<span>, <a>, <strong>, <em>, <img>, <input>, <label>, <button>, <time>, <code>