← Web / Frontend Developer
Day 1 · HTML5, Accessibility, Browsers and HTTP
Web / Frontend Developer · Crash Course
Day 1

HTML5, Accessibility, Browsers and HTTP

⏱ About 90 minutes · 21 pages
By the end of today you will be able to
  • ✔ Write clean semantic HTML5 pages and explain why each tag was chosen
  • ✔ Build forms with the right input types, labels and built-in validation
  • ✔ Explain accessibility basics and how a browser turns HTML into pixels
  • ✔ Read HTTP requests, responses, status codes and headers with confidence
  1. What the web round checks on Day 1
  2. The skeleton of every HTML page
  3. Semantic HTML5: tags with meaning

What the web round checks on Day 1

Interviewers start with the basics because every bug in a React app finally lands in HTML, the browser or HTTP.

A frontend technical round for freshers usually opens with simple questions: "What is semantic HTML?", "What is the difference between GET and POST?", "What happens when you type a URL in the browser?". These sound easy, but many candidates give half answers. Today we build full, clear answers for each of them.

flowchart LR
  A[You type a URL] --> B[DNS finds the server IP]
  B --> C[HTTP request sent]
  C --> D[Server sends HTML]
  D --> E[Browser builds DOM]
  E --> F[CSS and JS load]
  F --> G[Page painted on screen]
✍️ Example 1 — Sorting jobs into the right layer
  1. "Make the heading red" is about looks, so it belongs to CSS.

  2. "Show a list of five products" is about content and structure, so it belongs to HTML.

  3. "Add the product to the cart when the button is clicked" is behaviour, so it belongs to JavaScript.

  4. Answer: CSS, HTML, JavaScript.

Web / Frontend Developer · Day 12 / 5

The skeleton of every HTML page

If your skeleton is wrong, the browser silently guesses, and guesses cause strange bugs on other browsers and phones.

Every HTML5 page follows the same basic shape. Learn it by heart, because you may be asked to write it on paper.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Ravi's Bookshop</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Welcome to Ravi's Bookshop</h1>
  <p>New arrivals every Monday.</p>
  <script src="app.js" defer></script>
</body>
</html>

What each line does

Part Job
<!DOCTYPE html> Tells the browser to use standards mode, not old "quirks" mode
<html lang="en"> Root element; lang helps screen readers and translators
<meta charset="UTF-8"> Lets ₹, Hindi and Tamil text show correctly
<meta name="viewport"> Makes the page fit phone screens instead of zooming out
<title> Text on the browser tab and in search results
<body> Everything the user actually sees
✍️ Example 2 — Fixing broken rupee symbols
  1. A page shows strange characters instead of ₹.

  2. The text is stored correctly, but the browser is reading it with the wrong character encoding.

  3. Add <meta charset="UTF-8"> as one of the first lines inside <head>.

  4. Answer: declare UTF-8 encoding early in the head.

🙋 Try it now

Where should the <title> element be placed?

Web / Frontend Developer · Day 13 / 5

Semantic HTML5: tags with meaning

Semantic tags help Google, screen readers and your teammates understand the page without reading your CSS.

A semantic element tells you what its content is. A <div> says nothing; it is just a box. A <nav> says "this is a set of navigation links". HTML5 added several such elements for page layout.

Element Meaning
<header> Intro area of a page or section (logo, title)
<nav> Main group of navigation links
<main> The main content; only one visible per page
<article> Self-contained content that makes sense alone (a blog post, a news item)
<section> A themed group of content, usually with its own heading
<aside> Side content related to the main content (tips, ads)
<footer> Closing area (copyright, contact links)
header nav main article section aside footer
✍️ Example 3 — Article or section?
  1. A cricket news site shows a match report with its own heading, author and date.

  2. Ask: would this report make sense if posted alone on another site? Yes.

  3. Answer: <article>.

✍️ Example 4 — Choosing a tag for a sidebar
  1. A recipe page has a box on the right with "Kitchen tips" related to the recipe.

  2. It is related to the main content but not part of the main flow.

  3. Answer: <aside>.

✍️ Example 5 — How many `<main>` elements?
  1. A developer puts <main> around both the content and the sidebar, and another <main> around the footer.

  2. A page should have only one visible <main>, holding the unique main content.

  3. Remove the second one; keep the sidebar in <aside> and the footer in <footer>.

  4. Answer: one visible <main> per page.

Web / Frontend Developer · Day 14 / 5
Free preview ends here

Keep going with the full course

Day 1 has 21 pages. You have read the first 3.

See what's inside →