0% found this document useful (0 votes)
2 views2 pages

Semantic and Inline Block Elements HTML

Semantic tags in HTML provide meaning to the content, improving accessibility and SEO, with examples including <header>, <nav>, and <footer>. In contrast, non-semantic tags like <div> and <span> serve only for layout purposes. Additionally, block-level tags start on a new line and take full width, while inline tags render on the same line and take only necessary width.

Uploaded by

hanitech118
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Semantic and Inline Block Elements HTML

Semantic tags in HTML provide meaning to the content, improving accessibility and SEO, with examples including <header>, <nav>, and <footer>. In contrast, non-semantic tags like <div> and <span> serve only for layout purposes. Additionally, block-level tags start on a new line and take full width, while inline tags render on the same line and take only necessary width.

Uploaded by

hanitech118
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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>

You might also like