← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 1 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <img> (d) <a>
  3. 3.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  4. 4.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
  5. 5.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <p>Rain today</p>
  6. 6.Which of these is a closing tag? (a) <p> (b) <h1> (c) </h1> (d) <li>
  7. 7.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  8. 8.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  9. 9.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) <!DOCTYPE html> (d) </head>
  10. 10.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  11. 11.True or false: <li> is one item of a list. (a) True (b) False
  12. 12.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  13. 13.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
  14. 14.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <h2>Hello, world!</h2>
    <p>The red kite</p>
  15. 15.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) an attribute (d) a comment
  16. 16.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
  17. 17.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  19. 19.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>I love mangoes.</p>
    <p>Rain today</p>
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  21. 21.True or false: a web server has an address bar. (a) False (b) True
  22. 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  23. 23.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Laptop (d) Link
  24. 24.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Good morning!</h3>
    <h4>My best friend</h4>
  25. 25.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  26. 26.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  27. 27.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
  28. 28.True or false: a code editor saves our .html files. (a) True (b) False
  29. 29.Which of these is true of a web server? (a) is where we type code (b) opens web pages for us (c) stores a website’s files (d) saves our .html files
  30. 30.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  31. 31.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) maths.html (b) https://example.com (c) Maths fun (d) art.html
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Good morning! (c) Fun facts
  33. 33.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
  34. 34.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h3>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  37. 37.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) shows line numbers (d) turns HTML into a page
  38. 38.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h1>? (a) <h3> (b) <h6> (c) <h1> (d) <h2>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  40. 40.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>

Answer key

  1. No
  2. <link rel="stylesheet">
  3. alt
  4. <h3>
  5. 1
  6. </h1>
  7. in a new tab
  8. 4
  9. </html>
  10. a web server
  11. True
  12. False
  13. </u>
  14. 3
  15. an attribute
  16. Markup
  17. numbers
  18. <ol>
  19. 1
  20. 2
  21. False
  22. src
  23. Language
  24. 3
  25. <!DOCTYPE html>
  26. No
  27. the body
  28. True
  29. stores a website’s files
  30. in the body
  31. https://example.com
  32. Good morning!
  33. saves our .html files
  34. a closing tag
  35. in the body
  36. <h1>
  37. turns HTML into a page
  38. <h1>
  39. 3
  40. <h4>

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