← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 301 · 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.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) on the browser tab (d) nowhere
  2. 2.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) The red kite (b) Our school trip (c) Hello, world! (d) Good morning!
  3. 3.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  4. 4.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  5. 5.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) https://example.com (b) School news (c) about.html (d) contact.html
  6. 6.Which of these has a closing tag? (a) <br> (b) <input> (c) <img> (d) <b>
  7. 7.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) about.html (b) games.html (c) Maths fun (d) contact.html
  8. 8.True or false: in <img>, alt describes the picture. (a) False (b) True
  9. 9.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) href (c) School news (d) Take the quiz
  10. 10.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  11. 11.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine<br>Birds sing</p>
  14. 14.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  15. 15.Which of these is a closing tag? (a) <body> (b) </h1> (c) <li> (d) <h1>
  16. 16.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  17. 17.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  19. 19.💾 A web page file usually ends with which extension? (a) .html (b) .mp3 (c) .txt (d) .png
  20. 20.True or false: <h1> is an empty tag. (a) False (b) True
  21. 21.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  22. 22.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) width (b) An old fort (c) bus.jpg (d) Our school bus
  24. 24.True or false: HTML on its own can count button clicks. (a) False (b) True
  25. 25.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a microphone (d) a printer
  26. 26.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) opens web pages for us (d) stores a website’s files
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Planets (b) Mars is red. (c) index.html (d) My Hobbies
  28. 28.Which of these is an opening tag? (a) </title> (b) </h1> (c) </b> (d) <title>
  29. 29.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  30. 30.🔍 One closing tag is missing. Which one?
    <h2>The red kite</h2>
    <strong>Hello, world!</strong>
    <i>Fun facts
    (a) </strong> (b) </h2> (c) </p> (d) </i>
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) editor (d) attribute
  32. 32.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  33. 33.💬 Does the browser show comments on the page? (a) Yes (b) No
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <i>My best friend</i>
    line 2: <strong>The red kite
    line 3: <small>Our school trip</small>
    (a) line 2 (b) line 3 (c) line 1
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) The red kite (b) Cricket is fun. (c) Good morning!
  36. 36.Which of these goes in the head? (a) <a> (b) <ul> (c) <img> (d) <link rel="stylesheet">
  37. 37.🔍 One closing tag is missing. Which one?
    <u>My pets
    <strong>Fun facts</strong>
    <h1>The red kite</h1>
    (a) </strong> (b) </i> (c) </h1> (d) </u>
  38. 38.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <h4>Rain today</h4>
    <p>Our school trip</p>
  39. 39.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) maths.html (b) https://example.com (c) School news (d) art.html

Answer key

  1. on the browser tab
  2. Our school trip
  3. -->
  4. True
  5. about.html
  6. <b>
  7. games.html
  8. True
  9. School news
  10. <ul>
  11. <li>
  12. 1
  13. 4
  14. in the same tab
  15. </h1>
  16. <a href="about.html">
  17. an opening tag
  18. an opening tag
  19. .html
  20. False
  21. kite.png
  22. <h2>
  23. Our school bus
  24. False
  25. a plain text editor
  26. opens web pages for us
  27. My Hobbies
  28. <title>
  29. a web browser
  30. </i>
  31. element
  32. <li>
  33. No
  34. line 2
  35. The red kite
  36. <link rel="stylesheet">
  37. </u>
  38. 3
  39. <a>
  40. https://example.com

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