← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 993 · 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 of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <h1>
  2. 2.True or false: in <img>, alt names the picture file. (a) True (b) False
  3. 3.Which of these is true of a web browser? (a) has an address bar (b) answers page requests (c) stores a website’s files (d) hosts websites online
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) I like to read. (c) Riya’s Recipes (d) All about me
  5. 5.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <p>My pets</p>
  6. 6.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  7. 7.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
  8. 8.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) We won by 5 runs. (c) My Hobbies (d) Match report
  10. 10.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  11. 11.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) turns HTML into a page (d) is where we type code
  12. 12.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  13. 13.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h2>
  14. 14.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  15. 15.True or false: <table> goes in the head. (a) True (b) False
  16. 16.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.True or false: a web server hosts websites online. (a) False (b) True
  18. 18.🔗 Where does this link open?
    <a href="maths.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high</p>
  20. 20.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  22. 22.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) Visit the site (d) maths.html
  23. 23.Which of these has a closing tag? (a) <b> (b) <input> (c) <hr> (d) <br>
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) Play games (b) href (c) maths.html (d) About us
  25. 25.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) about.html (d) quiz.html
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) width (b) An old fort (c) A tiger asleep (d) fort.jpg
  27. 27.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  28. 28.True or false: <img> goes in the body. (a) False (b) True
  29. 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
  30. 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  31. 31.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) games.html (b) Contact us (c) About us (d) href
  32. 32.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
  33. 33.Which of these is true of a code editor? (a) shows pages from the web (b) turns HTML into a page (c) opens web pages for us (d) is where we type code
  34. 34.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) index.html (c) Cricket Club (d) My drawings
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Try this poha. (d) Art Gallery
  36. 36.Which of these is true of a web browser? (a) stores a website’s files (b) sends pages over the net (c) answers page requests (d) opens web pages for us
  37. 37.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  39. 39.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>

Answer key

  1. <h1>
  2. False
  3. has an address bar
  4. All about me
  5. 1
  6. a web server
  7. 2
  8. <a>
  9. My Hobbies
  10. a web server
  11. turns HTML into a page
  12. <a href="about.html">
  13. <h2>
  14. starts a new line
  15. False
  16. has a closing tag
  17. True
  18. in the same tab
  19. 5
  20. in the head
  21. No
  22. contact.html
  23. <b>
  24. Play games
  25. quiz.html
  26. An old fort
  27. <h6>
  28. True
  29. <h1>
  30. <h1>
  31. About us
  32. <h2>
  33. is where we type code
  34. Cricket Club
  35. Art Gallery
  36. opens web pages for us
  37. <h6>
  38. 2
  39. an opening tag
  40. <ul>

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