HTML Structure and Element

Q11 — <head> vs <body>?

<head> contains metadata like title, meta tags, scripts, CSS links.

<body> contains all visible content displayed in the browser.

Q12 — Purpose of <title>?

Defines page title — visible in browser tab & search engine results. Important for SEO.

Q13 — <link> vs <a>?

<link> loads external resources (CSS, icons, fonts).

<a> creates clickable links for navigation.

<link rel="stylesheet" href="style.css">
<a href="about.html">About Us</a>

Q14 — <section>, <article>, <aside>, <nav>?

<nav> — navigation links

<article> — self-contained content (blog, post)

<section> — thematic content grouping

<aside> — side content like ads, sidebars

Q15 — <ol>, <ul>, <dl>?

<ol> — ordered (numbered) list

<ul> — unordered (bullets) list

<dl> — definition list with terms & descriptions

<dl>
  <dt>HTML</dt>
  <dd>HyperText Markup Language</dd>
</dl>

Q16 — <figure> vs <img>?

<img> displays an image.

<figure> wraps an image with caption.

<figure>
  <img src="photo.jpg" alt="Example">
  <figcaption>Sample Image</figcaption>
</figure>

Q17 — <iframe> vs <embed>?

<iframe> embeds another HTML page.

<embed> embeds files like PDFs, media.

Q18 — <table>, <thead>, <tbody>, <tfoot>?

Used for structured tabular data with header, body & footer sections.

Q19 — <form> vs <input>?

<form> — container for user input fields/sending data.

<input> — field to capture user data.

Q20 — <label> vs <legend>?

<label> — describes an input field & improves accessibility.

<legend> — title for a group of inputs inside <fieldset>.

⬅ Home