Coding practice
HTML Coding Questions
15 hands-on challenges with prompts and solution sketches for HTML interview rounds.
Challenge set
15 coding questions
1. Accessible Skip Link
htmlWrite markup for a skip-to-content link.
<a class="skip-link" href="#main">Skip to main content</a>
<main id="main">...</main> 2. Semantic Article Card
htmlMark up an article preview with heading, time, and excerpt.
<article>
<h2><a href="/post">Post title</a></h2>
<time datetime="2026-07-18">July 18, 2026</time>
<p>Short excerpt of the article.</p>
</article> 3. Form with Labels
htmlBuild a labeled login form with required fields.
<form action="/login" method="post">
<label for="email">Email</label>
<input id="email" name="email" type="email" required />
<label for="password">Password</label>
<input id="password" name="password" type="password" required />
<button type="submit">Sign in</button>
</form> 4. Image with Alt Text
htmlAdd a responsive image with meaningful alt text.
<img
src="/images/hero.webp"
alt="Developer reviewing interview questions on a laptop"
width="1200"
height="630"
loading="lazy"
/> 5. Navigation Landmark
htmlCreate a primary nav with aria-current.
<nav aria-label="Primary">
<ul>
<li><a href="/" aria-current="page">Home</a></li>
<li><a href="/tutorials/">Tutorials</a></li>
</ul>
</nav> 6. Details Disclosure
htmlUse details/summary for FAQ content.
<details>
<summary>What is semantic HTML?</summary>
<p>Semantic HTML uses meaningful elements to describe content structure.</p>
</details> 7. Table with Caption
htmlBuild an accessible data table.
<table>
<caption>Interview readiness by topic</caption>
<thead>
<tr><th scope="col">Topic</th><th scope="col">Questions</th></tr>
</thead>
<tbody>
<tr><th scope="row">HTML</th><td>50</td></tr>
</tbody>
</table> 8. Figure and Figcaption
htmlWrap media with figure and figcaption.
<figure>
<img src="/diagram.png" alt="DOM tree diagram" />
<figcaption>A simplified DOM tree for a blog page.</figcaption>
</figure> 9. Breadcrumb List
htmlMark up breadcrumbs with ordered list.
<nav aria-label="Breadcrumb">
<ol>
<li><a href="/">Home</a></li>
<li><a href="/interview-questions/">Interview Questions</a></li>
<li aria-current="page">HTML</li>
</ol>
</nav> 10. Dialog Markup
htmlCreate a native dialog with close button.
<dialog id="confirm">
<form method="dialog">
<p>Delete this item?</p>
<button value="cancel">Cancel</button>
<button value="confirm">Confirm</button>
</form>
</dialog> 11. Meter Progress
htmlShow interview prep progress with meter.
<label for="prep">Prep progress</label>
<meter id="prep" min="0" max="100" value="72">72%</meter> 12. Fieldset Group
htmlGroup related radio options with fieldset.
<fieldset>
<legend>Preferred difficulty</legend>
<label><input type="radio" name="level" value="junior" /> Junior</label>
<label><input type="radio" name="level" value="senior" /> Senior</label>
</fieldset> 13. Video with Captions
htmlEmbed video with track captions.
<video controls>
<source src="/intro.mp4" type="video/mp4" />
<track kind="captions" src="/intro.vtt" srclang="en" label="English" default />
</video> 14. Search Landmark
htmlCreate a search form with role and label.
<search>
<form role="search" action="/search">
<label for="q">Search</label>
<input id="q" name="q" type="search" />
<button type="submit">Go</button>
</form>
</search> 15. Error Message Association
htmlAssociate an input error with aria-describedby.
<label for="username">Username</label>
<input id="username" aria-invalid="true" aria-describedby="username-error" />
<p id="username-error">Username is required.</p>