← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 637 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) Easy snacks (d) I like to read.
  2. 2.Which of these goes in the head? (a) <p> (b) <a> (c) <title> (d) <ul>
  3. 3.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Match report (c) index.html (d) Riya’s Recipes
  5. 5.True or false: <b> has a closing tag. (a) True (b) False
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h4> (d) <h6>
  7. 7.Which of these is true of a web server? (a) is where we type code (b) colours code to help us (c) sends pages over the net (d) shows pages from the web
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  9. 9.🔍 One closing tag is missing. Which one?
    <b>Cricket is fun.</b>
    <u>Good morning!
    <h1>The red kite</h1>
    (a) </em> (b) </b> (c) </h1> (d) </u>
  10. 10.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  12. 12.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  13. 13.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  14. 14.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h4>
  15. 15.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) Visit the site (c) contact.html (d) maths.html
  16. 16.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) fort.jpg (b) Our school bus (c) tiger.jpg (d) bus.jpg
  17. 17.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  18. 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  19. 19.True or false: in <img>, alt describes the picture. (a) False (b) True
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) I love mangoes. (b) My pets (c) Cricket is fun. (d) Our school trip
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) My pets (b) Hello, world! (c) My best friend (d) The red kite
  22. 22.🔍 One closing tag is missing. Which one?
    <b>Rain today</b>
    <strong>My pets
    <em>Our school trip</em>
    (a) </b> (b) </em> (c) </u> (d) </strong>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  24. 24.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.📄 Can HTML on its own make headings? (a) No (b) Yes
  26. 26.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) answers page requests (d) saves our .html files
  27. 27.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <p>Our school trip</p>
  28. 28.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  30. 30.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Rivers flow<br>Roses are red</p>
  31. 31.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <h1/> (d) <\h1>
  32. 32.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Hello, world! (c) Cricket is fun.
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) width (b) Birthday cake (c) Map of India (d) map.png
  35. 35.🔠 Are headings shown in bold by default? (a) No (b) Yes
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) maths.html (c) About us (d) href
  37. 37.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  38. 38.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  39. 39.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
  40. 40.Which of these goes in the body? (a) <title> (b) <style> (c) <ul> (d) <link rel="stylesheet">

Answer key

  1. Easy snacks
  2. <title>
  3. <h6>
  4. Riya’s Recipes
  5. True
  6. <h1>
  7. sends pages over the net
  8. 200
  9. </u>
  10. in the body
  11. a code editor
  12. -->
  13. <a>
  14. <h1>
  15. contact.html
  16. bus.jpg
  17. in the body
  18. 1
  19. True
  20. Cricket is fun.
  21. The red kite
  22. </strong>
  23. 1
  24. an empty tag
  25. Yes
  26. opens web pages for us
  27. 1
  28. an opening tag
  29. False
  30. 4
  31. </h1>
  32. Rain today
  33. 2
  34. Map of India
  35. Yes
  36. Play games
  37. <a href="about.html">
  38. href
  39. 2
  40. <ul>

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids