← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 992 · 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.True or false: a web browser shows pages from the web. (a) False (b) True
  2. 2.Which of these goes in the head? (a) <h1> (b) <a> (c) <meta charset="utf-8"> (d) <p>
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
  5. 5.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  6. 6.🔍 One closing tag is missing. Which one?
    <h1>Rain today</h1>
    <h3>My best friend</h3>
    <strong>Fun facts
    (a) </strong> (b) </h3> (c) </h1> (d) </i>
  7. 7.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  8. 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
  9. 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
  11. 11.Which of these has a closing tag? (a) <hr> (b) <h1> (c) <br> (d) <img>
  12. 12.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) hosts websites online (d) stores a website’s files
  13. 13.🔠 Are headings shown in bold by default? (a) No (b) Yes
  14. 14.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) Play games (b) maths.html (c) art.html (d) news.html
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) contact.html (c) https://example.com (d) maths.html
  17. 17.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  18. 18.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  19. 19.Which of these has a closing tag? (a) <hr> (b) <img> (c) <input> (d) <title>
  20. 20.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) Play games (c) maths.html (d) art.html
  21. 21.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  22. 22.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    (a) Rain today (b) Our school trip (c) Good morning!
  23. 23.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.🔍 One closing tag is missing. Which one?
    <i>Rain today</i>
    <h1>Cricket is fun.
    <strong>Fun facts</strong>
    (a) </strong> (b) </h1> (c) </u> (d) </i>
  26. 26.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) href (b) news.html (c) Contact us (d) About us
  27. 27.True or false: <a> goes in the body. (a) False (b) True
  28. 28.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  29. 29.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
  30. 30.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound
  32. 32.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="300">
    (a) kite.png (b) A red kite (c) cake.jpg (d) map.png
  33. 33.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  34. 34.🔗 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
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <small>My pets
    line 2: <h2>Good morning!</h2>
    line 3: <h1>My best friend</h1>
    (a) line 2 (b) line 1 (c) line 3
  36. 36.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) art.html (b) Play games (c) Take the quiz (d) href
  37. 37.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  38. 38.💬 How does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  39. 39.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  40. 40.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No

Answer key

  1. True
  2. <meta charset="utf-8">
  3. An old fort
  4. 6
  5. href
  6. </strong>
  7. </h1>
  8. tags
  9. in the head
  10. <h1>
  11. <h1>
  12. opens web pages for us
  13. Yes
  14. in the head
  15. maths.html
  16. contact.html
  17. 2
  18. a code editor
  19. <title>
  20. https://example.com
  21. <h6>
  22. Rain today
  23. <a>
  24. bullets
  25. </h1>
  26. About us
  27. True
  28. a code editor
  29. <h6>
  30. in the body
  31. structure
  32. kite.png
  33. 3
  34. opens it in a new tab
  35. line 1
  36. Take the quiz
  37. <
  38. <!--
  39. 3
  40. Yes

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