← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 197 · 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.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a hash # (d) a dollar $
  2. 2.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  3. 3.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  4. 4.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  5. 5.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  6. 6.True or false: <hr> has a closing tag. (a) False (b) True
  7. 7.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
  8. 8.True or false: a web browser shows line numbers. (a) True (b) False
  9. 9.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h1> (d) <h3>
  10. 10.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  11. 11.True or false: <p> goes in the body. (a) False (b) True
  12. 12.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  13. 13.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) Maths fun (b) about.html (c) games.html (d) quiz.html
  14. 14.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  15. 15.Which of these is an empty tag? (a) <p> (b) <h1> (c) <br> (d) <b>
  16. 16.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Cricket is fun.</h3>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
  17. 17.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  18. 18.True or false: HTML on its own can make bullet lists. (a) False (b) True
  19. 19.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
    (a) Our school trip (b) Hello, world! (c) Good morning! (d) My best friend
  20. 20.Which of these is true of a web server? (a) sends pages over the net (b) shows line numbers (c) saves our .html files (d) opens web pages for us
  21. 21.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
  22. 22.True or false: in <img>, height tells which image to load. (a) True (b) False
  23. 23.True or false: HTML on its own can make a form. (a) False (b) True
  24. 24.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
  25. 25.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  26. 26.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h6>
  27. 27.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) height (d) src
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite</strong>
    line 2: <u>Our school trip
    line 3: <small>Hello, world!</small>
    (a) line 1 (b) line 2 (c) line 3
  30. 30.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </body> (c) </html> (d) <!DOCTYPE html>
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) contact.html (b) href (c) Maths fun (d) Visit the site
  32. 32.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) My Hobbies (c) Easy snacks (d) Thanks for visiting.
  34. 34.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high<br>Birds sing<br>Rivers flow</p>
  36. 36.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  38. 38.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  39. 39.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) saves our .html files (d) shows pages from the web
  40. 40.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt

Answer key

  1. a slash /
  2. True
  3. <h6>
  4. Yes
  5. False
  6. False
  7. 2
  8. False
  9. <h1>
  10. 3
  11. True
  12. <h1>
  13. quiz.html
  14. numbers
  15. <br>
  16. 3
  17. <h6>
  18. True
  19. My best friend
  20. sends pages over the net
  21. a code editor
  22. False
  23. True
  24. width
  25. <
  26. <h1>
  27. alt
  28. <h6>
  29. line 2
  30. <!DOCTYPE html>
  31. Visit the site
  32. <h1>
  33. Easy snacks
  34. 2
  35. 5
  36. 3
  37. Birthday cake
  38. -->
  39. saves our .html files
  40. href

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