Semantic HTML
Using meaningful tags like <header>, <article> improves SEO and accessibility.
DOCTYPE
Tells browser HTML version and ensures standards mode.
div vs span
div is block-level, span is inline.
Lists
Ordered <ol>, Unordered <ul>, Description <dl>.
Void elements
No closing tag: <img>, <br>, <input>.
iframe
Embeds another page: <iframe src='url'></iframe>.
b vs strong
b = style, strong = importance.
i vs em
i = style, em = emphasis.
alt attribute
Describes image for accessibility and SEO.
localStorage vs sessionStorage
local persists, session clears on tab close.
Meta tags
Inside <head>, provide metadata.
Hyperlink new tab
<a target='_blank'>
GET vs POST
GET = URL params, POST = body.
canvas
Draw graphics via JS.
picture/video
Responsive images and media embedding.
data-*
Custom attributes.
async vs defer
async runs immediately, defer after HTML.
ARIA
Accessibility roles.
Favicon
Browser icon.
Form validation
required, pattern.
template
Reusable hidden HTML.