← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 93 · 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.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
  2. 2.Which of these is an opening tag? (a) <body> (b) </body> (c) </li> (d) </b>
  3. 3.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  5. 5.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) The full moon (b) A happy dog (c) width (d) dog.jpg
  7. 7.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  8. 8.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>Cricket is fun.</h2>
    <p>The red kite</p>
    <h2>Fun facts</h2>
  9. 9.True or false: a web browser turns HTML into a page. (a) True (b) False
  10. 10.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  12. 12.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  14. 14.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  15. 15.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) art.html (b) School news (c) maths.html (d) https://example.com
  16. 16.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  17. 17.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <p>
  18. 18.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  19. 19.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
  21. 21.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  22. 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  23. 23.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  24. 24.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.Which of these has a closing tag? (a) <br> (b) <b> (c) <hr> (d) <meta>
  26. 26.True or false: a code editor stores a website’s files. (a) False (b) True
  27. 27.Which of these is true of a web browser? (a) stores a website’s files (b) saves our .html files (c) has an address bar (d) answers page requests
  28. 28.True or false: a code editor shows pages from the web. (a) False (b) True
  29. 29.🔍 Which is the odd one out? (a) colours code to help us (b) shows pages from the web (c) has an address bar (d) opens web pages for us
  30. 30.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  31. 31.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
  32. 32.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
  33. 33.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  34. 34.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) Our school trip (b) Fun facts (c) I love mangoes. (d) My best friend
  35. 35.True or false: <img> has a closing tag. (a) False (b) True
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
  37. 37.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
  38. 38.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Good morning! (b) Cricket is fun. (c) My pets
  39. 39.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) saves our .html files (d) answers page requests
  40. 40.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. a line across the page
  2. <body>
  3. an empty tag
  4. opens it in a new tab
  5. </u>
  6. A happy dog
  7. Yes
  8. 3
  9. True
  10. has a closing tag
  11. Yes
  12. in the head
  13. 6
  14. <ol>
  15. https://example.com
  16. <ul>
  17. <title>
  18. in a new tab
  19. an empty tag
  20. 2
  21. <h6>
  22. <ol>
  23. <!--
  24. a closing tag
  25. <b>
  26. False
  27. has an address bar
  28. False
  29. colours code to help us
  30. src
  31. an attribute
  32. Language
  33. element
  34. Our school trip
  35. False
  36. <h1>
  37. src
  38. Cricket is fun.
  39. saves our .html files
  40. in the body

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