← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 331 · 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.🔗 Where does this link open?
    <a href="games.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  2. 2.Which of these is a closing tag? (a) <p> (b) </li> (c) <li> (d) <body>
  3. 3.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="150">
  5. 5.True or false: <img> goes in the body. (a) False (b) True
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today</u>
    line 2: <h1>Hello, world!</h1>
    line 3: <strong>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  7. 7.Which of these goes in the body? (a) <title> (b) <style> (c) <ul> (d) <meta charset="utf-8">
  8. 8.🔍 One closing tag is missing. Which one?
    <small>Our school trip</small>
    <em>Fun facts
    <i>Hello, world!</i>
    (a) </small> (b) </b> (c) </i> (d) </em>
  9. 9.True or false: <ul> shows bullet points. (a) False (b) True
  10. 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
  11. 11.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <head> (d) <!DOCTYPE html>
  13. 13.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) maths.html (d) href
  14. 14.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <strong>Rain today</strong>
    <u>Cricket is fun.
    (a) </u> (b) </b> (c) </strong> (d) </h1>
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    <p>The red kite</p>
    (a) My pets (b) My best friend (c) Hello, world! (d) The red kite
  16. 16.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  17. 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  19. 19.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  20. 20.Which of these goes in the head? (a) <table> (b) <p> (c) <style> (d) <ul>
  21. 21.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  22. 22.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    (a) Hello, world! (b) Rain today (c) Our school trip
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Sky is blue</p>
  24. 24.Which of these has a closing tag? (a) <b> (b) <hr> (c) <img> (d) <br>
  25. 25.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  26. 26.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  28. 28.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
  29. 29.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  30. 30.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) A tiger asleep (b) An old fort (c) width (d) fort.jpg
  31. 31.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .mp3 (d) .png
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) My best friend (b) My pets (c) Hello, world! (d) Fun facts
  33. 33.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.True or false: <ul> goes inside ul or ol. (a) False (b) True
  35. 35.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  36. 36.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
  38. 38.True or false: HTML on its own can make a form. (a) True (b) False
  39. 39.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) quiz.html (b) art.html (c) Contact us (d) news.html
  40. 40.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">

Answer key

  1. in the same tab
  2. </li>
  3. <!DOCTYPE html>
  4. 150
  5. True
  6. line 3
  7. <ul>
  8. </em>
  9. True
  10. an attribute
  11. No
  12. <!DOCTYPE html>
  13. Take the quiz
  14. </u>
  15. Hello, world!
  16. a web server
  17. <ol>
  18. 200
  19. in a new tab
  20. <style>
  21. False
  22. Hello, world!
  23. 3
  24. <b>
  25. width
  26. an empty tag
  27. 2
  28. <h1>
  29. element
  30. An old fort
  31. .html
  32. My pets
  33. an empty tag
  34. False
  35. <h1>
  36. numbers
  37. 3
  38. True
  39. art.html
  40. 300

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