← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 35 · 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.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
  2. 2.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) Take the quiz (b) href (c) Play games (d) art.html
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) All about me (b) body (c) Class 7 Blog (d) Thanks for visiting.
  5. 5.True or false: a code editor has an address bar. (a) True (b) False
  6. 6.True or false: <table> goes in the head. (a) True (b) False
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
  8. 8.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) is where we type code (d) opens web pages for us
  9. 9.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Rain today (c) I love mangoes.
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <body> (c) </head> (d) <!DOCTYPE html>
  13. 13.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
  14. 14.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My pets</h2>
    <h2>The red kite</h2>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  15. 15.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) art.html (b) news.html (c) maths.html (d) About us
  16. 16.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  17. 17.True or false: a web browser has an address bar. (a) False (b) True
  18. 18.True or false: <li> is an unordered list. (a) True (b) False
  19. 19.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  20. 20.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  21. 21.True or false: <p> is an empty tag. (a) True (b) False
  22. 22.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  23. 23.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
  24. 24.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Good morning! (c) Rain today
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Sky is blue<br>Birds sing<br>Rivers flow</p>
  26. 26.🔍 One closing tag is missing. Which one?
    <h2>My pets
    <b>Fun facts</b>
    <h3>The red kite</h3>
    (a) </p> (b) </h3> (c) </b> (d) </h2>
  27. 27.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>I love mangoes.</h2>
    <p>Our school trip</p>
  29. 29.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  32. 32.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
  34. 34.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) <!DOCTYPE html> (b) </head>
  35. 35.💬 Does the browser show comments on the page? (a) No (b) Yes
  36. 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <b>Cricket is fun.</b>
    line 2: <em>Good morning!
    line 3: <h1>The red kite</h1>
    (a) line 1 (b) line 2 (c) line 3
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
  39. 39.Which of these has a closing tag? (a) <input> (b) <li> (c) <br> (d) <meta>
  40. 40.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in the same tab (b) in a new tab

Answer key

  1. 1
  2. No
  3. Take the quiz
  4. All about me
  5. False
  6. False
  7. 1
  8. is where we type code
  9. in the body
  10. Fun facts
  11. width
  12. <!DOCTYPE html>
  13. <img>
  14. 3
  15. maths.html
  16. <h6>
  17. True
  18. False
  19. in a new tab
  20. element
  21. False
  22. a web browser
  23. <h1>
  24. I love mangoes.
  25. 5
  26. </h2>
  27. in the body
  28. 2
  29. in the head
  30. a closing tag
  31. 3
  32. <!--
  33. 1
  34. <!DOCTYPE html>
  35. No
  36. 6
  37. line 2
  38. 2
  39. <li>
  40. in the same tab

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