← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 462 · 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.🔠 Are headings shown in bold by default? (a) No (b) Yes
  2. 2.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  3. 3.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text with links (d) text in colour
  4. 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  5. 5.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) </body> (d) <!DOCTYPE html>
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>My best friend</p>
  7. 7.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  8. 8.True or false: <style> goes in the body. (a) False (b) True
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
  10. 10.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) href (c) Art corner (d) Maths fun
  11. 11.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  12. 12.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
  13. 13.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
  15. 15.True or false: in <img>, alt describes the picture. (a) False (b) True
  16. 16.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  17. 17.True or false: a web server opens web pages for us. (a) False (b) True
  18. 18.True or false: in <img>, src shows if the image fails. (a) True (b) False
  19. 19.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  20. 20.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) cake.jpg (c) A red kite (d) map.png
  21. 21.Which of these goes in the head? (a) <a> (b) <table> (c) <ul> (d) <title>
  22. 22.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) My best friend (c) Rain today (d) Cricket is fun.
  23. 23.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  24. 24.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  27. 27.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
  30. 30.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) About us (c) art.html (d) href
  32. 32.📋 What number does the browser show next to “Mango”?
    <ol start="5">
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  34. 34.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
  35. 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  36. 36.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  37. 37.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Rain today (b) Hello, world! (c) Cricket is fun. (d) The red kite
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <h3>Good morning!
    line 2: <h2>My best friend</h2>
    line 3: <strong>My pets</strong>
    (a) line 3 (b) line 2 (c) line 1
  40. 40.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /

Answer key

  1. Yes
  2. No
  3. text with links
  4. has a closing tag
  5. </html>
  6. 2
  7. -->
  8. False
  9. <h6>
  10. Maths fun
  11. opens it in a new tab
  12. </u>
  13. a closing tag
  14. 4
  15. True
  16. <ul>
  17. False
  18. False
  19. False
  20. kite.png
  21. <title>
  22. Rain today
  23. <img>
  24. a code editor
  25. bullets
  26. <ul>
  27. <a href="about.html">
  28. 4
  29. 1
  30. in the head
  31. About us
  32. 6
  33. Yes
  34. a code editor
  35. alt
  36. <!DOCTYPE html>
  37. Cricket is fun.
  38. <h1>
  39. line 1
  40. a slash /

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