← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 98 · 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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  2. 2.Which of these goes in the body? (a) <title> (b) <p> (c) <style> (d) <link rel="stylesheet">
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  5. 5.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  6. 6.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  7. 7.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) About us (c) Play games (d) href
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  9. 9.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
  10. 10.🔗 Where does this link open?
    <a href="maths.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) height (d) width
  12. 12.🔗 Where does this link open?
    <a href="about.html">About us</a>
    (a) in the same tab (b) in a new tab
  13. 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
  14. 14.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>Fun facts</h4>
    <p>My pets</p>
    <h2>My pets</h2>
    <p>Cricket is fun.</p>
  15. 15.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) School news (b) art.html (c) href (d) Art corner
  16. 16.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  17. 17.True or false: <title> goes in the body. (a) False (b) True
  18. 18.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  19. 19.True or false: a web server turns HTML into a page. (a) True (b) False
  20. 20.🔍 One closing tag is missing. Which one?
    <h3>The red kite
    <b>Good morning!</b>
    <small>Fun facts</small>
    (a) </u> (b) </small> (c) </b> (d) </h3>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Easy snacks (b) index.html (c) My Hobbies (d) Mars is red.
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  23. 23.Which of these is true of a code editor? (a) has an address bar (b) colours code to help us (c) stores a website’s files (d) answers page requests
  24. 24.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  25. 25.Which of these is true of a web server? (a) colours code to help us (b) turns HTML into a page (c) answers page requests (d) has an address bar
  26. 26.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) stores a website’s files (d) opens web pages for us
  27. 27.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <h4>Fun facts</h4>
  28. 28.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    (a) Our school trip (b) The red kite (c) Cricket is fun. (d) I love mangoes.
  29. 29.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  30. 30.💬 Does the browser show comments on the page? (a) Yes (b) No
  31. 31.True or false: <ul> lists steps in order. (a) True (b) False
  32. 32.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <!DOCTYPE html> (c) <body> (d) </head>
  33. 33.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  34. 34.📝 What does <p> make? (a) a picture (b) a paragraph (c) a table (d) a link
  35. 35.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.True or false: <style> goes in the head. (a) True (b) False
  37. 37.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
  38. 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  40. 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>

Answer key

  1. <ol>
  2. <p>
  3. 400
  4. 250
  5. <h6>
  6. <h1>
  7. Play games
  8. bullets
  9. a web browser
  10. in the same tab
  11. alt
  12. in the same tab
  13. Yes
  14. 3
  15. Art corner
  16. opens it in a new tab
  17. False
  18. 6
  19. False
  20. </h3>
  21. My Hobbies
  22. 2
  23. colours code to help us
  24. <h1>
  25. answers page requests
  26. opens web pages for us
  27. 2
  28. Cricket is fun.
  29. an opening tag
  30. No
  31. False
  32. <!DOCTYPE html>
  33. to leave notes
  34. a paragraph
  35. in the body
  36. True
  37. turns HTML into a page
  38. an opening tag
  39. starts a new line
  40. <!DOCTYPE html>

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