← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 211 · 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 text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) The red kite (b) I love mangoes. (c) Fun facts
  2. 2.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
    <h2>The red kite</h2>
  3. 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  4. 4.Which of these is true of a web server? (a) turns HTML into a page (b) is where we type code (c) stores a website’s files (d) opens web pages for us
  5. 5.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
  6. 6.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) shows line numbers
  7. 7.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  9. 9.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>My pets</p>
    <h2>Good morning!</h2>
  10. 10.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>
  11. 11.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  12. 12.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  13. 13.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  14. 14.True or false: <style> goes in the head. (a) False (b) True
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <small>Fun facts</small>
    line 2: <p>My pets
    line 3: <i>The red kite</i>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) width (d) alt
  17. 17.Which of these goes in the body? (a) <img> (b) <style> (c) <meta charset="utf-8"> (d) <title>
  18. 18.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
  19. 19.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <small>The red kite
    <u>Cricket is fun.</u>
    (a) </h1> (b) </u> (c) </p> (d) </small>
  20. 20.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text with links (d) text in colour
  21. 21.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) maths.html (c) news.html (d) art.html
  22. 22.🔍 One closing tag is missing. Which one?
    <h2>My best friend
    <h1>Good morning!</h1>
    <h3>Our school trip</h3>
    (a) </h1> (b) </h2> (c) </u> (d) </h3>
  23. 23.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
  24. 24.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
  26. 26.True or false: a code editor stores a website’s files. (a) True (b) False
  27. 27.True or false: HTML on its own cannot make tables. (a) False (b) True
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
  29. 29.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h1> or <h2>? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
  30. 30.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  31. 31.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) Cricket is fun. (b) I love mangoes. (c) My best friend (d) My pets
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h4>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
  33. 33.🏷️ Which is the closing tag for <i>? (a) <i> (b) </i> (c) <\i> (d) <i/>
  34. 34.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  35. 35.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  37. 37.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  38. 38.True or false: <meta> has a closing tag. (a) False (b) True
  39. 39.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
  40. 40.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) index.html (c) Easy snacks (d) Riya’s Recipes

Answer key

  1. The red kite
  2. 2
  3. <li>
  4. stores a website’s files
  5. True
  6. shows line numbers
  7. to describe the image
  8. element
  9. 4
  10. <li>
  11. <ol>
  12. <!DOCTYPE html>
  13. <head>
  14. True
  15. line 2
  16. src
  17. <img>
  18. 1
  19. </small>
  20. text with links
  21. maths.html
  22. </h2>
  23. <ol>
  24. <h6>
  25. 1
  26. False
  27. False
  28. 1
  29. <h6>
  30. <!--
  31. My pets
  32. <h6>
  33. </i>
  34. False
  35. in a new tab
  36. 2
  37. <ul>
  38. False
  39. href
  40. Riya’s Recipes

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