← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 57 · 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 is an opening tag? (a) </body> (b) <body> (c) </p> (d) </b>
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h1>
  3. 3.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  4. 4.💬 Does the browser show comments on the page? (a) Yes (b) No
  5. 5.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <small>I love mangoes.
    <strong>Our school trip</strong>
    (a) </i> (b) </strong> (c) </small> (d) </p>
  6. 6.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
  7. 7.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  8. 8.Which of these is true of a web server? (a) shows pages from the web (b) colours code to help us (c) sends pages over the net (d) turns HTML into a page
  9. 9.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) src (d) height
  10. 10.🔢 In a basic web page file, which comes LAST? (a) <html> (b) </body> (c) </html> (d) <head>
  11. 11.🖼️ Which attribute of <img> describes the picture? (a) alt (b) src (c) width (d) height
  12. 12.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
  13. 13.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) href (d) https://example.com
  15. 15.True or false: <img> is an empty tag. (a) False (b) True
  16. 16.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  17. 17.True or false: a code editor is where we type code. (a) False (b) True
  18. 18.True or false: <ul> lists steps in order. (a) True (b) False
  19. 19.🔍 One closing tag is missing. Which one?
    <b>Hello, world!</b>
    <strong>Our school trip
    <h3>Fun facts</h3>
    (a) </small> (b) </b> (c) </h3> (d) </strong>
  20. 20.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Rivers flow<br>Roses are red<br>Stars shine</p>
  21. 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  22. 22.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  23. 23.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  24. 24.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) maths.html (b) https://example.com (c) contact.html (d) Play games
  28. 28.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) is where we type code (d) stores a website’s files
  29. 29.🔗 Which words do you click on?
    <a href="quiz.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) quiz.html
  30. 30.True or false: a web server sends pages over the net. (a) False (b) True
  31. 31.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  32. 32.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  34. 34.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Hello, world!</h2>
    <p>My pets</p>
    <h2>Our school trip</h2>
    <h3>My best friend</h3>
  35. 35.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) quiz.html (b) School news (c) art.html (d) news.html
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Welcome! (c) body (d) My Hobbies
  37. 37.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  38. 38.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) hosts websites online (d) shows pages from the web
  39. 39.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) turns HTML into a page (d) answers page requests
  40. 40.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes

Answer key

  1. <body>
  2. <h5>
  3. <h1>
  4. No
  5. </small>
  6. <h1>
  7. True
  8. sends pages over the net
  9. src
  10. </html>
  11. alt
  12. </head>
  13. <h5>
  14. Take the quiz
  15. True
  16. Yes
  17. True
  18. False
  19. </strong>
  20. 5
  21. <ol>
  22. False
  23. <!--
  24. in the body
  25. has a closing tag
  26. opens it in a new tab
  27. contact.html
  28. stores a website’s files
  29. Contact us
  30. True
  31. <li>
  32. a line across the page
  33. 5
  34. 4
  35. art.html
  36. Welcome!
  37. <!DOCTYPE html>
  38. shows pages from the web
  39. turns HTML into a page
  40. Yes

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