Frontend Developer - Intern
Must know semantic HTML5, modern CSS layouts, and JavaScript ES6+.
Eliminate generic div-soup, master screen reader landmarks, document outlines, article vs section architecture, and SEO indexing benefits.
Semantic HTML refers to writing markup using HTML tags that convey the meaning and role of the content to both human developers, web browser accessibility engines, and search crawlers, rather than simply defining visual presentation.
Think of reading a printed newspaper:
• If a newspaper was printed without headlines, mastheads, captions, or editorial columns (just raw unformatted blocks of text), finding the sports or business section would be impossible.
• Non-semantic HTML is like wrapping everything in generic <div> tags.
• Semantic HTML gives clear names: <header> is the masthead, <article> is the news story, and <footer> is the legal imprint!
HTML5 introduced dedicated landmark elements to replace meaningless <div id="header"> soup:
Site Identity & Navigation
<header>: Logo, search, title<nav>: Primary navigation links<article> too<header>
<nav>
<a href="/">Home</a>
</nav>
</header>
Central Primary Content
<main>: Only ONE per document<article>: Self-contained post/card<main>
<article>
<h2>Post</h2>
</article>
</main>
Auxiliary & Imprint
<aside>: Related links, sidebar<footer>: Copyright, author info<aside>
<a href="#">Related</a>
</aside>
<footer>
<small>© 2026</small>
</footer>
One of the most frequently asked frontend interview questions: "When should you choose <article>, <section>, or <div>?"
| Tag | When to Use | Heading Required? | Example Use Case |
|---|---|---|---|
<article> |
Self-contained, independently distributable or reusable content. | Yes (<h2>-<h6>) | Blog post, product card, forum comment, tweet. |
<section> |
A thematic grouping of related content within a document. | Yes (Mandatory) | "Chapter 1: Intro", "Features Grid", "Customer Reviews". |
<div> |
Pure visual styling wrapper or CSS Flex/Grid layout container. | No (No semantic) | Centering a button, flex row wrapper, modal backdrop. |
<article class="job-card">
<header>
<h3>Frontend Developer - Intern</h3>
<time datetime="2026-09-20">Posted: Sep 20, 2026</time>
</header>
<section>
<p>Must know semantic HTML5, modern CSS layouts, and JavaScript ES6+.</p>
</section>
<footer>
<span>Location: Remote (India)</span>
<button type="button">Apply Now</button>
</footer>
</article>
Must know semantic HTML5, modern CSS layouts, and JavaScript ES6+.
Why enterprises strictly enforce semantic HTML rules:
<main>, bypassing repetitive navigation menus.<main> and <article> compared to generic <div> tags.Test your knowledge with 5 semantic HTML5 placement interview questions:
<header>, pagination navigation, table of contents sidebars, or footer link menus can each use dedicated <nav> tags.<nav> is strictly for major navigation blocks (main site nav, breadcrumbs, search pagination). Incidental footer links (terms of service, privacy policy) can just be plain links inside <footer>.