← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 526 · 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.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  2. 2.📝 What do we need to write HTML? (a) a printer (b) a plain text editor (c) a paintbrush (d) a microphone
  3. 3.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  4. 4.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  6. 6.Which of these is an opening tag? (a) </title> (b) </b> (c) <p> (d) </p>
  7. 7.True or false: <ul> is one item of a list. (a) False (b) True
  8. 8.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  9. 9.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  10. 10.True or false: a web browser shows line numbers. (a) False (b) True
  11. 11.True or false: <li> is an unordered list. (a) True (b) False
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) <html>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite
  14. 14.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
  15. 15.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) href (d) quiz.html
  16. 16.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Mouse (d) Markup
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) Our school bus (b) moon.png (c) The full moon (d) width
  18. 18.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
  20. 20.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  21. 21.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h5>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  22. 22.🔍 Which is the odd one out? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) turns HTML into a page
  23. 23.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
  24. 24.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 10 (d) 3
  25. 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  27. 27.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <ul> (c) <p> (d) <table>
  28. 28.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>I love mangoes.</h3>
    <h4>Rain today</h4>
    <p>Our school trip</p>
  29. 29.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
  30. 30.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  31. 31.True or false: <ol> is one item of a list. (a) False (b) True
  32. 32.True or false: HTML on its own can count button clicks. (a) False (b) True
  33. 33.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
  34. 34.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  36. 36.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) Fun facts (b) Rain today (c) My pets (d) Hello, world!
  37. 37.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in a new tab (b) in the same tab
  38. 38.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  39. 39.True or false: in <img>, width sets how wide it is. (a) False (b) True
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Easy snacks (d) Space Facts

Answer key

  1. False
  2. a plain text editor
  3. -->
  4. in the head
  5. <h5>
  6. <p>
  7. False
  8. <h5>
  9. <h6>
  10. False
  11. False
  12. <!DOCTYPE html>
  13. A tiger asleep
  14. 1
  15. Contact us
  16. Markup
  17. The full moon
  18. in the head
  19. 2
  20. 3
  21. <h5>
  22. turns HTML into a page
  23. 3
  24. 6
  25. <a href="about.html">
  26. alt
  27. <link rel="stylesheet">
  28. 3
  29. src
  30. alt
  31. False
  32. False
  33. 2
  34. <!--
  35. <a>
  36. Fun facts
  37. in the same tab
  38. <ul>
  39. True
  40. Space Facts

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