← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 842 · 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 one answers page requests? (a) a web server (b) a web browser (c) a code editor
  2. 2.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  3. 3.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  4. 4.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
  7. 7.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  8. 8.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  10. 10.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <table> (c) <h1> (d) <ul>
  11. 11.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>Cricket is fun.</h4>
    <h3>The red kite</h3>
    <p>I love mangoes.</p>
  12. 12.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) map.png (b) A red kite (c) kite.png (d) cake.jpg
  13. 13.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing<br>Rivers flow<br>Stars shine</p>
  15. 15.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
  16. 16.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) Welcome! (c) Thanks for visiting. (d) index.html
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 6 (d) 3
  18. 18.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  20. 20.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  21. 21.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  23. 23.True or false: <ol> shows bullet points. (a) False (b) True
  24. 24.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) href (c) Play games (d) about.html
  25. 25.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  26. 26.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in a new tab (b) in the same tab
  27. 27.True or false: <title> has a closing tag. (a) True (b) False
  28. 28.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Our school trip</p> -->
  31. 31.True or false: <li> is one item of a list. (a) True (b) False
  32. 32.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  35. 35.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
  36. 36.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.📝 What does <p> make? (a) a link (b) a picture (c) a paragraph (d) a table
  38. 38.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  39. 39.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  40. 40.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">

Answer key

  1. a web server
  2. 3
  3. False
  4. </em>
  5. 2
  6. 1
  7. <ul>
  8. src
  9. 300
  10. <meta charset="utf-8">
  11. 3
  12. kite.png
  13. <h1>
  14. 4
  15. height
  16. My Hobbies
  17. 1
  18. an empty tag
  19. <ol>
  20. <!--
  21. Yes
  22. 100
  23. False
  24. Play games
  25. <ul>
  26. in the same tab
  27. True
  28. has a closing tag
  29. in the body
  30. 1
  31. True
  32. False
  33. 2
  34. 2
  35. HyperText
  36. in the head
  37. a paragraph
  38. to leave notes
  39. 4
  40. <a href="about.html">

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