What is HTML? — HTML Technical Interview Questions & Answers

The markup language that structures every web page.

What is HTML?

  • The markup language that structures every web page.
  • HTML is the skeleton of a web page. Tags mark meaning: this is a heading, this is a paragraph, this is a link. The browser draws it. CSS paints it. JavaScript makes it interactive. HTML is not a programming language — it is markup.
  • Every page: <!DOCTYPE html> then <html> with <head> (title, css) and <body> (what you see). Save as index.html and open in the browser.
  • Trap: skipping DOCTYPE (quirks mode). Trap: using <div> for everything when <p>, <h1>, <button> exist.

Technical Interview Tip: Skeleton of the page. DOCTYPE + html/head/body.

Code Examples for What is HTML?

What is HTML? — working example

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>HTML basics</title>
  </head>
  <body>
    <!-- Comment: structure first, then content -->
    <h1 id="top" class="title">Hello HTML</h1>
    <p>Elements wrap content; attributes like <code>id</code> and <code>class</code> add meaning.</p>
    <img src="/images/team.jpg" alt="Team practicing interviews" width="320" />
  </body>
</html>

What is HTML? — hTML structures content with elements and attributes; start every page with doctype, html, head, and body.

How to Explain What is HTML? to an Interviewer

What is HTML?

Markup for page structure Not a programming language

Minimum skeleton?

<!DOCTYPE html> html, head, body