← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 638 · 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: in <img>, src describes the picture. (a) True (b) False
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <p>My pets</p>
  3. 3.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  4. 4.🔗 Where does this link open?
    <a href="contact.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  5. 5.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
  6. 6.🔢 In a basic web page file, which comes first: “<body>” or “</body>”? (a) </body> (b) <body>
  7. 7.Which of these is true of a code editor? (a) sends pages over the net (b) saves our .html files (c) shows pages from the web (d) has an address bar
  8. 8.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) Contact us (b) About us (c) href (d) quiz.html
  9. 9.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  10. 10.True or false: in <img>, width describes the picture. (a) True (b) False
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine</p>
  12. 12.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
  13. 13.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) answers page requests (d) saves our .html files
  14. 14.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  15. 15.🔗 Where does this link open?
    <a href="games.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>My best friend</h3>
    <h3>I love mangoes.</h3>
    <h3>I love mangoes.</h3>
    <p>Hello, world!</p>
  17. 17.Which of these is a closing tag? (a) </b> (b) <b> (c) <title> (d) <h1>
  18. 18.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  19. 19.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Good morning!</h4>
    <p>Our school trip</p>
  20. 20.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  21. 21.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  22. 22.True or false: in <img>, width shows if the image fails. (a) True (b) False
  23. 23.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) src (c) alt (d) width
  24. 24.Which of these is an empty tag? (a) <title> (b) <h1> (c) <p> (d) <br>
  25. 25.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <html>
  26. 26.Which of these is an opening tag? (a) <title> (b) </h1> (c) </li> (d) </title>
  27. 27.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  28. 28.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  29. 29.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  30. 30.True or false: <ol> is an ordered list. (a) True (b) False
  31. 31.Which of these is true of a web server? (a) shows pages from the web (b) is where we type code (c) hosts websites online (d) opens web pages for us
  32. 32.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  34. 34.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) maths.html
  35. 35.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  36. 36.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) </h1> (c) <h1> (d) <h1/>
  37. 37.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
  38. 38.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) https://example.com (b) maths.html (c) Contact us (d) contact.html
  39. 39.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets

Answer key

  1. False
  2. 1
  3. Yes
  4. in the same tab
  5. <h6>
  6. <body>
  7. saves our .html files
  8. About us
  9. No
  10. False
  11. 2
  12. <h6>
  13. turns HTML into a page
  14. <!DOCTYPE html>
  15. in the same tab
  16. 4
  17. </b>
  18. 4
  19. 2
  20. in a new tab
  21. alt
  22. False
  23. height
  24. <br>
  25. <!DOCTYPE html>
  26. <title>
  27. True
  28. opens it in a new tab
  29. <h6>
  30. True
  31. hosts websites online
  32. in the head
  33. a code editor
  34. Art corner
  35. <h6>
  36. </h1>
  37. a web browser
  38. contact.html
  39. an opening tag
  40. bullets

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