← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 851 · 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.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) </head> (b) <!DOCTYPE html>
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Space Facts (b) Planets (c) We won by 5 runs. (d) body
  3. 3.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  4. 4.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) news.html (c) href (d) Art corner
  5. 5.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  6. 6.True or false: a code editor opens web pages for us. (a) True (b) False
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
    </ul>
  8. 8.True or false: a web browser shows pages from the web. (a) False (b) True
  9. 9.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  11. 11.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high<br>Stars shine</p>
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Birds sing</p>
  14. 14.True or false: <ul> shows bullet points. (a) True (b) False
  15. 15.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  16. 16.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
  18. 18.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) sends pages over the net (d) turns HTML into a page
  19. 19.True or false: HTML on its own cannot make a form. (a) True (b) False
  20. 20.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  21. 21.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  22. 22.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.Which of these is a closing tag? (a) <p> (b) <body> (c) <title> (d) </h1>
  24. 24.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  25. 25.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  27. 27.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  29. 29.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
  30. 30.True or false: in <img>, width is read by screen readers. (a) True (b) False
  31. 31.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <p>My best friend</p>
  32. 32.Which of these is true of a code editor? (a) hosts websites online (b) is where we type code (c) answers page requests (d) stores a website’s files
  33. 33.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <p>Our school trip</p>
  34. 34.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  35. 35.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  36. 36.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  37. 37.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) hosts websites online
  38. 38.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </b>
  39. 39.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
  40. 40.True or false: a web browser colours code to help us. (a) False (b) True

Answer key

  1. <!DOCTYPE html>
  2. Planets
  3. False
  4. Maths fun
  5. 4
  6. False
  7. 4
  8. True
  9. in the head
  10. False
  11. 1
  12. 5
  13. 3
  14. True
  15. Yes
  16. Yes
  17. <h6>
  18. sends pages over the net
  19. False
  20. True
  21. Yes
  22. an opening tag
  23. </h1>
  24. opens it in a new tab
  25. <img>
  26. 5
  27. </h2>
  28. 250
  29. <h5>
  30. False
  31. 1
  32. is where we type code
  33. 2
  34. <a>
  35. -->
  36. No
  37. shows line numbers
  38. </b>
  39. starts a new line
  40. False

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