← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 121 · 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 heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h1>
  2. 2.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
  3. 3.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite
    line 2: <em>I love mangoes.</em>
    line 3: <i>My pets</i>
    (a) line 3 (b) line 1 (c) line 2
  5. 5.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <small>My pets</small>
    line 3: <h2>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  8. 8.Which of these goes in the head? (a) <p> (b) <a> (c) <style> (d) <ul>
  9. 9.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) alt (d) width
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  11. 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  12. 12.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) colours code to help us (d) hosts websites online
  13. 13.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
  14. 14.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  15. 15.Which of these is true of a code editor? (a) opens web pages for us (b) hosts websites online (c) has an address bar (d) shows line numbers
  16. 16.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Orange</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  17. 17.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Contact us (b) news.html (c) href (d) Visit the site
  18. 18.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  19. 19.True or false: <ol> lists things in any order. (a) True (b) False
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Stars shine<br>Kites fly high</p>
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <u>Fun facts
    line 2: <em>I love mangoes.</em>
    line 3: <h2>My pets</h2>
    (a) line 2 (b) line 3 (c) line 1
  22. 22.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  23. 23.Which of these is true of a code editor? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) has an address bar
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    (a) My pets (b) Rain today (c) Our school trip
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  26. 26.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1/> (d) <h1>
  27. 27.True or false: a code editor sends pages over the net. (a) True (b) False
  28. 28.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) quiz.html (b) href (c) Art corner (d) Maths fun
  29. 29.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
  30. 30.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  31. 31.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  32. 32.True or false: <ul> has a closing tag. (a) False (b) True
  33. 33.🔗 Where does this link open?
    <a href="about.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  34. 34.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
  36. 36.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  39. 39.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>

Answer key

  1. <h1>
  2. <h1>
  3. 3
  4. line 1
  5. an opening tag
  6. 1
  7. line 3
  8. <style>
  9. alt
  10. bullets
  11. <a href="about.html">
  12. colours code to help us
  13. 5
  14. -->
  15. shows line numbers
  16. 9
  17. Contact us
  18. 6
  19. False
  20. 4
  21. line 1
  22. the body
  23. saves our .html files
  24. Our school trip
  25. A red kite
  26. </h1>
  27. False
  28. Maths fun
  29. <h1>
  30. in a new tab
  31. a slash /
  32. True
  33. in a new tab
  34. a web browser
  35. 1
  36. in the head
  37. starts a new line
  38. numbers
  39. an opening tag
  40. <ul>

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