← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 650 · 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.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 1 (c) 3 (d) 6
  2. 2.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Rain today</p>
    <p>My pets</p>
    <p>The red kite</p>
    <p>Good morning!</p>
  3. 3.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
  4. 4.Which of these is true of a code editor? (a) is where we type code (b) answers page requests (c) turns HTML into a page (d) opens web pages for us
  5. 5.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  6. 6.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) Play games (b) href (c) About us (d) games.html
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
  8. 8.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
    <p>Rain today</p>
  9. 9.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
  10. 10.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <ol> (d) <p>
  11. 11.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  12. 12.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in the same tab (b) in a new tab
  13. 13.Which of these is true of a web browser? (a) colours code to help us (b) turns HTML into a page (c) sends pages over the net (d) shows line numbers
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <small>I love mangoes.
    line 3: <h2>Cricket is fun.</h2>
    (a) line 3 (b) line 1 (c) line 2
  15. 15.🔍 Which is the odd one out? (a) saves our .html files (b) hosts websites online (c) stores a website’s files (d) sends pages over the net
  16. 16.📝 What do we need to write HTML? (a) a printer (b) a microphone (c) a paintbrush (d) a plain text editor
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) An old fort (b) width (c) Our school bus (d) bus.jpg
  19. 19.📋 What number does the browser show next to “Banana”?
    <ol start="4">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  20. 20.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) maths.html (b) https://example.com (c) School news (d) contact.html
  21. 21.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h5>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  23. 23.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  24. 24.True or false: <li> has a closing tag. (a) True (b) False
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h5> (d) <h3>
  26. 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) maths.html (b) Contact us (c) https://example.com (d) contact.html
  28. 28.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Hello, world! (c) Our school trip (d) Fun facts
  29. 29.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h4> (b) <h6> (c) <h2> (d) <h5>
  30. 30.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    (a) Our school trip (b) My best friend (c) Hello, world! (d) Fun facts
  32. 32.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
  33. 33.Which of these goes in the head? (a) <h1> (b) <meta charset="utf-8"> (c) <table> (d) <img>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Sky is blue</p>
  36. 36.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <small>Fun facts
    <u>Hello, world!</u>
    (a) </small> (b) </u> (c) </em> (d) </b>
  37. 37.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  38. 38.True or false: <li> is an empty tag. (a) False (b) True
  39. 39.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
  40. 40.True or false: <p> goes in the head. (a) True (b) False

Answer key

  1. 1
  2. 5
  3. Markup
  4. is where we type code
  5. in the head
  6. Play games
  7. <h2>
  8. 2
  9. an attribute
  10. <li>
  11. <h1>
  12. in the same tab
  13. turns HTML into a page
  14. line 2
  15. saves our .html files
  16. a plain text editor
  17. 1
  18. Our school bus
  19. 5
  20. contact.html
  21. in the head
  22. <h1>
  23. an opening tag
  24. True
  25. <h6>
  26. <h6>
  27. contact.html
  28. My pets
  29. <h6>
  30. <h4>
  31. My best friend
  32. on the browser tab
  33. <meta charset="utf-8">
  34. Birthday cake
  35. 3
  36. </small>
  37. <ol>
  38. False
  39. </i>
  40. False

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