← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 188 · 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.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  2. 2.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  3. 3.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  4. 4.Which of these is an empty tag? (a) <li> (b) <p> (c) <meta> (d) <h1>
  5. 5.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  6. 6.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  7. 7.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  8. 8.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) is where we type code (d) answers page requests
  9. 9.Which of these is an empty tag? (a) <ul> (b) <input> (c) <p> (d) <h1>
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <small>Cricket is fun.
    line 2: <h3>I love mangoes.</h3>
    line 3: <u>Rain today</u>
    (a) line 1 (b) line 2 (c) line 3
  11. 11.🔗 Where does this link open?
    <a href="art.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  13. 13.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <h2>Cricket is fun.</h2>
  14. 14.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  15. 15.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) Hello, world! (c) Rain today
  16. 16.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  17. 17.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Fun facts</h2>
    <p>My pets</p>
  18. 18.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  19. 19.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>The red kite</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
    <h4>The red kite</h4>
  20. 20.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  21. 21.Which of these is a closing tag? (a) <li> (b) </title> (c) <p> (d) <title>
  22. 22.True or false: a web server answers page requests. (a) True (b) False
  23. 23.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  24. 24.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) dog.jpg (b) moon.png (c) A happy dog (d) bus.jpg
  25. 25.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ul>
  27. 27.True or false: a code editor sends pages over the net. (a) False (b) True
  28. 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  29. 29.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  30. 30.Which of these has a closing tag? (a) <img> (b) <input> (c) <meta> (d) <p>
  31. 31.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg
  32. 32.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  33. 33.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  34. 34.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) A red kite (b) map.png (c) kite.png (d) cake.jpg
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  36. 36.True or false: <style> goes in the head. (a) False (b) True
  37. 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high</p>
  40. 40.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>

Answer key

  1. <!--
  2. a code editor
  3. <ol>
  4. <meta>
  5. <a>
  6. to leave notes
  7. Yes
  8. has an address bar
  9. <input>
  10. line 1
  11. in the same tab
  12. 1
  13. 1
  14. has a closing tag
  15. Rain today
  16. an opening tag
  17. 2
  18. Yes
  19. 3
  20. the body
  21. </title>
  22. True
  23. numbers
  24. dog.jpg
  25. <ul>
  26. 5
  27. False
  28. element
  29. href
  30. <p>
  31. cake.jpg
  32. <ul>
  33. 6
  34. kite.png
  35. 1
  36. True
  37. opens it in a new tab
  38. 1
  39. 4
  40. 3

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