← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 106 · 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 list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
    <p>My pets</p>
  3. 3.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <u>My best friend
    line 2: <b>Fun facts</b>
    line 3: <small>Good morning!</small>
    (a) line 1 (b) line 3 (c) line 2
  5. 5.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.Which of these goes in the head? (a) <a> (b) <table> (c) <h1> (d) <style>
  8. 8.True or false: <img> has a closing tag. (a) False (b) True
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) kite.png (c) map.png (d) cake.jpg
  10. 10.True or false: in <img>, width names the picture file. (a) True (b) False
  11. 11.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  12. 12.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  13. 13.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  14. 14.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
  15. 15.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h2>
  16. 16.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 3 (d) 10
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  18. 18.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) is where we type code (d) colours code to help us
  19. 19.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) games.html (c) news.html (d) Contact us
  20. 20.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  21. 21.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    (a) Rain today (b) Good morning! (c) Fun facts
  22. 22.🌐 Which one opens web pages for us? (a) a web browser (b) a web server (c) a code editor
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) The full moon (b) width (c) dog.jpg (d) A happy dog
  24. 24.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  25. 25.Which of these has a closing tag? (a) <input> (b) <meta> (c) <ul> (d) <br>
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  27. 27.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  28. 28.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  29. 29.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) height (d) src
  30. 30.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Good morning!</p>
    <p>Rain today</p>
  31. 31.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Fun facts (c) Good morning!
  32. 32.Which of these is an opening tag? (a) <p> (b) </b> (c) </h1> (d) </li>
  33. 33.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  34. 34.Which of these is a closing tag? (a) </body> (b) <b> (c) <title> (d) <body>
  35. 35.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) contact.html (b) https://example.com (c) Take the quiz (d) about.html
  36. 36.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a plain text editor (d) a paintbrush
  37. 37.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  38. 38.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>
  39. 39.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) shows pages from the web (d) is where we type code
  40. 40.💬 Does the browser show comments on the page? (a) Yes (b) No

Answer key

  1. <ul>
  2. 2
  3. has a closing tag
  4. line 1
  5. 2
  6. Yes
  7. <style>
  8. False
  9. kite.png
  10. False
  11. 3
  12. No
  13. <!DOCTYPE html>
  14. <h2>
  15. <h2>
  16. 1
  17. 300
  18. stores a website’s files
  19. news.html
  20. <!DOCTYPE html>
  21. Rain today
  22. a web browser
  23. A happy dog
  24. has a closing tag
  25. <ul>
  26. A tiger asleep
  27. <h1>
  28. -->
  29. src
  30. 3
  31. Rain today
  32. <p>
  33. on the browser tab
  34. </body>
  35. about.html
  36. a plain text editor
  37. 3
  38. <a href="about.html">
  39. shows pages from the web
  40. No

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