← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 576 · 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 pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="150">
  2. 2.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  3. 3.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) All about me (c) index.html (d) Cricket Club
  4. 4.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) opens it in a new tab (d) makes it bold
  5. 5.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) </strong> (d) <strong/>
  6. 6.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <h2>Our school trip</h2>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h5> (c) <h2> (d) <h3>
  8. 8.🔗 Where does this link open?
    <a href="news.html">School news</a>
    (a) in a new tab (b) in the same tab
  9. 9.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <h2>Cricket is fun.</h2>
  10. 10.True or false: <h1> is an empty tag. (a) True (b) False
  11. 11.💬 Does the browser show comments on the page? (a) Yes (b) No
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="350">
  13. 13.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
  14. 14.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) Play games (b) news.html (c) quiz.html (d) art.html
  15. 15.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h3> or <h5>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
  19. 19.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) about.html
  20. 20.🖼️ Which attribute of <img> tells which image to load? (a) src (b) height (c) width (d) alt
  21. 21.True or false: <h1> has a closing tag. (a) False (b) True
  22. 22.🔗 Where does this link open?
    <a href="https://example.com">Play games</a>
    (a) in the same tab (b) in a new tab
  23. 23.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  24. 24.True or false: HTML on its own can make headings. (a) False (b) True
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) width (b) Our school bus (c) moon.png (d) The full moon
  26. 26.🏷️ Which is the closing tag for <p>? (a) </p> (b) <\p> (c) <p> (d) <p/>
  27. 27.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
  28. 28.Which of these goes in the head? (a) <h1> (b) <style> (c) <table> (d) <ul>
  29. 29.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Rain today</p>
    <p>Fun facts</p>
  30. 30.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  32. 32.🔍 Which is the odd one out? (a) hosts websites online (b) opens web pages for us (c) sends pages over the net (d) answers page requests
  33. 33.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  34. 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  35. 35.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  36. 36.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) colours code to help us
  38. 38.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  39. 39.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!
    line 2: <h1>Cricket is fun.</h1>
    line 3: <i>Hello, world!</i>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. 150
  2. <ol>
  3. Cricket Club
  4. opens it in a new tab
  5. </strong>
  6. 4
  7. <h1>
  8. in the same tab
  9. 1
  10. False
  11. No
  12. 350
  13. 2
  14. art.html
  15. No
  16. <h6>
  17. a closing tag
  18. 5
  19. School news
  20. src
  21. True
  22. in the same tab
  23. a code editor
  24. True
  25. The full moon
  26. </p>
  27. a web browser
  28. <style>
  29. 1
  30. an opening tag
  31. 6
  32. opens web pages for us
  33. in the body
  34. src
  35. a closing tag
  36. has a closing tag
  37. colours code to help us
  38. 6
  39. 1
  40. line 1

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