← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 307 · 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.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  3. 3.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  4. 4.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h1>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) width (b) The full moon (c) dog.jpg (d) A happy dog
  6. 6.True or false: HTML on its own cannot make headings. (a) True (b) False
  7. 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  8. 8.True or false: <title> goes in the head. (a) False (b) True
  9. 9.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  10. 10.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) shows line numbers (d) shows pages from the web
  11. 11.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  12. 12.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  13. 13.True or false: HTML on its own cannot make tables. (a) True (b) False
  14. 14.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.Which of these goes in the head? (a) <style> (b) <h1> (c) <ul> (d) <img>
  16. 16.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h3>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  18. 18.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  20. 20.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h2> (c) <h1> (d) <h6>
  21. 21.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) https://example.com
  22. 22.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  23. 23.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) map.png (b) A tiger asleep (c) tiger.jpg (d) kite.png
  25. 25.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  26. 26.📄 Can HTML on its own make headings? (a) Yes (b) No
  27. 27.True or false: <ol> shows bullet points. (a) False (b) True
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) My Hobbies (c) All about me (d) body
  29. 29.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  30. 30.📝 What does <p> make? (a) a link (b) a picture (c) a table (d) a paragraph
  31. 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h5> or <h4>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) My pets (c) Fun facts (d) I love mangoes.
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) The red kite (b) Good morning! (c) Cricket is fun.
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  35. 35.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) opens web pages for us (d) shows line numbers
  36. 36.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  39. 39.Which of these is an empty tag? (a) <ul> (b) <li> (c) <input> (d) <p>
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>

Answer key

  1. in the body
  2. 300
  3. a closing tag
  4. <h1>
  5. A happy dog
  6. False
  7. has a closing tag
  8. True
  9. a code editor
  10. shows pages from the web
  11. No
  12. alt
  13. False
  14. in the head
  15. <style>
  16. on the browser tab
  17. <h5>
  18. a code editor
  19. numbers
  20. <h6>
  21. Maths fun
  22. an attribute
  23. an empty tag
  24. tiger.jpg
  25. 6
  26. Yes
  27. False
  28. All about me
  29. <!--
  30. a paragraph
  31. <h1>
  32. I love mangoes.
  33. Cricket is fun.
  34. 1
  35. opens web pages for us
  36. <h6>
  37. <h5>
  38. bullets
  39. <input>
  40. 2

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