← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 489 · 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 tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  3. 3.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) stores a website’s files (d) saves our .html files
  4. 4.True or false: <ul> is an ordered list. (a) False (b) True
  5. 5.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  6. 6.True or false: a web browser opens web pages for us. (a) False (b) True
  7. 7.True or false: <ul> is an empty tag. (a) False (b) True
  8. 8.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My pets</p>
    <p>Fun facts</p>
  9. 9.Which of these is an opening tag? (a) </title> (b) </li> (c) </p> (d) <body>
  10. 10.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) bus.jpg (b) fort.jpg (c) Our school bus (d) tiger.jpg
  11. 11.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  13. 13.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  14. 14.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  15. 15.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
  16. 16.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  17. 17.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) https://example.com (b) contact.html (c) maths.html (d) Contact us
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  19. 19.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  20. 20.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
  21. 21.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
  22. 22.Which of these is true of a web browser? (a) saves our .html files (b) answers page requests (c) is where we type code (d) has an address bar
  23. 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  24. 24.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
  25. 25.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  26. 26.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
  27. 27.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) The red kite (d) Hello, world!
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
  29. 29.Which of these is true of a code editor? (a) shows line numbers (b) answers page requests (c) turns HTML into a page (d) has an address bar
  30. 30.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  31. 31.True or false: <title> has a closing tag. (a) True (b) False
  32. 32.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    (a) Good morning! (b) Hello, world! (c) Our school trip
  33. 33.True or false: <br> has a closing tag. (a) True (b) False
  34. 34.True or false: HTML on its own can keep a high score. (a) False (b) True
  35. 35.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) games.html (c) contact.html (d) about.html
  36. 36.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  37. 37.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) body (c) We won by 5 runs. (d) Match report
  39. 39.🔍 One closing tag is missing. Which one?
    <strong>I love mangoes.</strong>
    <u>Hello, world!
    <h3>My best friend</h3>
    (a) </h3> (b) </strong> (c) </h1> (d) </u>
  40. 40.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) answers page requests (d) opens web pages for us

Answer key

  1. <img>
  2. <h5>
  3. stores a website’s files
  4. False
  5. a code editor
  6. True
  7. False
  8. 3
  9. <body>
  10. bus.jpg
  11. <li>
  12. <h1>
  13. element
  14. False
  15. <!DOCTYPE html>
  16. in the head
  17. contact.html
  18. 2
  19. a code editor
  20. 4
  21. to leave notes
  22. has an address bar
  23. <a href="about.html">
  24. <!DOCTYPE html>
  25. <ul>
  26. tags
  27. The red kite
  28. <h6>
  29. shows line numbers
  30. <h5>
  31. True
  32. Hello, world!
  33. False
  34. False
  35. games.html
  36. 6
  37. <!DOCTYPE html>
  38. Match report
  39. </u>
  40. answers page requests

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