← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 199 · 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 of these is an opening tag? (a) </b> (b) </h1> (c) </body> (d) <p>
  2. 2.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) bus.jpg (b) fort.jpg (c) The full moon (d) moon.png
  3. 3.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="50">
    (a) Map of India (b) width (c) kite.png (d) A red kite
  5. 5.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) stores a website’s files (d) colours code to help us
  6. 6.True or false: <li> is an empty tag. (a) False (b) True
  7. 7.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  8. 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
  10. 10.True or false: a code editor stores a website’s files. (a) True (b) False
  11. 11.True or false: in <img>, alt sets how wide it is. (a) False (b) True
  12. 12.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  13. 13.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  14. 14.True or false: HTML on its own can make a form. (a) False (b) True
  15. 15.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) about.html (c) Take the quiz (d) href
  16. 16.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  17. 17.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
  18. 18.📋 What number does the browser show next to “Jamun”?
    <ol start="6">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  19. 19.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  20. 20.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  21. 21.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Cricket is fun. (c) Our school trip
  22. 22.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h3>
  23. 23.True or false: a code editor answers page requests. (a) True (b) False
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
  25. 25.True or false: a web browser has an address bar. (a) False (b) True
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <p>Hello, world!</p>
    line 3: <b>Rain today
    (a) line 1 (b) line 2 (c) line 3
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Birds sing<br>Roses are red<br>Stars shine</p>
  28. 28.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  29. 29.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  30. 30.True or false: a web server turns HTML into a page. (a) True (b) False
  31. 31.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
  33. 33.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  34. 34.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  35. 35.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine</p>
  37. 37.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) alt (d) src
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>My pets</p>
    (a) Hello, world! (b) Fun facts (c) My pets (d) Good morning!
  40. 40.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>

Answer key

  1. <p>
  2. moon.png
  3. 4
  4. A red kite
  5. colours code to help us
  6. False
  7. to leave notes
  8. has a closing tag
  9. <h2>
  10. False
  11. False
  12. -->
  13. No
  14. True
  15. Take the quiz
  16. 3
  17. a web browser
  18. 8
  19. No
  20. a line across the page
  21. Hello, world!
  22. <h2>
  23. False
  24. <h3>
  25. True
  26. line 3
  27. 5
  28. <ol>
  29. in the same tab
  30. False
  31. Language
  32. <h5>
  33. <h3>
  34. 3
  35. opens it in a new tab
  36. 5
  37. height
  38. bullets
  39. Fun facts
  40. <h1>

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