← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 850 · 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.🔍 Which is the odd one out? (a) is where we type code (b) hosts websites online (c) sends pages over the net (d) answers page requests
  2. 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  3. 3.True or false: <h1> goes in the head. (a) True (b) False
  4. 4.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
  5. 5.Which of these is true of a web server? (a) shows line numbers (b) answers page requests (c) colours code to help us (d) turns HTML into a page
  6. 6.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
  7. 7.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.
    <i>Good morning!</i>
    <h3>My pets</h3>
    (a) </h3> (b) </i> (c) </h2> (d) </p>
  8. 8.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  9. 9.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue</p>
  11. 11.True or false: in <img>, width names the picture file. (a) True (b) False
  12. 12.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
  13. 13.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
  14. 14.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Our school trip</h4>
    <p>My best friend</p>
    <h4>Fun facts</h4>
    <p>My best friend</p>
  15. 15.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) </html> (d) <!DOCTYPE html>
  16. 16.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <title> (d) <input>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) dog.jpg (b) width (c) A happy dog (d) The full moon
  18. 18.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  19. 19.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) width (b) dog.jpg (c) A happy dog (d) The full moon
  21. 21.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
  22. 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  23. 23.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  24. 24.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  26. 26.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  27. 27.🔗 Where does this link open?
    <a href="games.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  28. 28.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) My pets (b) My best friend (c) Rain today
  29. 29.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
  30. 30.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
  31. 31.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  32. 32.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  33. 33.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  34. 34.Which of these goes in the head? (a) <h1> (b) <table> (c) <title> (d) <ul>
  35. 35.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  36. 36.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>Hello, world!</h3>
    <h4>Hello, world!</h4>
    <h2>Hello, world!</h2>
  37. 37.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  39. 39.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
    (a) I love mangoes. (b) The red kite (c) Rain today

Answer key

  1. is where we type code
  2. Yes
  3. False
  4. 2
  5. answers page requests
  6. <h1>
  7. </h2>
  8. on the browser tab
  9. bus.jpg
  10. 2
  11. False
  12. 1
  13. <
  14. 3
  15. <!DOCTYPE html>
  16. <title>
  17. A happy dog
  18. in the head
  19. <h1>
  20. A happy dog
  21. <h6>
  22. opens it in a new tab
  23. <ol>
  24. <a>
  25. 2
  26. element
  27. in the same tab
  28. My pets
  29. Markup
  30. </h1>
  31. -->
  32. <ul>
  33. <h1>
  34. <title>
  35. a web server
  36. 4
  37. an opening tag
  38. 100
  39. False
  40. Rain today

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