shreshthmohan / next-blog

next-blog-mu-three.vercel.app
2 stars 0 forks source link

Semantic HTML #90

Open shreshthmohan opened 1 year ago

shreshthmohan commented 1 year ago


Only one <main> tag and every page should have it.

Only one h1 per page Don't skip heading levels. An h3 should come immediately after an h1

Use <div> only when you need it organize content or say to style it with CSS.

Typically have one primary <header> (There can be multiple of these) A header will typically contain

vs
Usually Use the `id` attribute to link different elements. `class` for styling data attribute, role attribute, aria attributes (won't be needed much if you write good semantic html) https://www.youtube.com/watch?v=HJ0-fUJ-2F0 https://www.youtube.com/watch?v=NexL5_Vdoq8