← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 623 · 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 true of a web browser? (a) colours code to help us (b) stores a website’s files (c) is where we type code (d) has an address bar
  2. 2.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <p> (d) <h1>
  3. 3.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <h2>Hello, world!</h2>
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) body (c) My Hobbies (d) My drawings
  5. 5.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h6> (d) <h3>
  6. 6.Which of these goes in the head? (a) <h1> (b) <p> (c) <table> (d) <title>
  7. 7.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  8. 8.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  9. 9.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h3>
  10. 10.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  12. 12.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  13. 13.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Good morning!</p>
    <h2>Rain today</h2>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  14. 14.True or false: a code editor stores a website’s files. (a) True (b) False
  15. 15.🔠 How many heading levels does HTML have? (a) 4 (b) 6 (c) 3 (d) 10
  16. 16.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  17. 17.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    (a) Our school trip (b) My pets (c) Fun facts (d) Cricket is fun.
  19. 19.True or false: <ul> is an empty tag. (a) True (b) False
  20. 20.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  22. 22.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  23. 23.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  24. 24.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) I love mangoes. (b) My best friend (c) My pets (d) Our school trip
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Hello, world! (c) The red kite
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  27. 27.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  28. 28.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) Birthday cake (b) dog.jpg (c) moon.png (d) cake.jpg
  29. 29.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Rain today</h2>
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>My pets</p>
    <h2>Our school trip</h2>
  30. 30.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  31. 31.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🔍 One closing tag is missing. Which one?
    <b>Fun facts
    <i>I love mangoes.</i>
    <p>My best friend</p>
    (a) </em> (b) </p> (c) </b> (d) </i>
  33. 33.🔍 One closing tag is missing. Which one?
    <h2>Our school trip</h2>
    <p>Cricket is fun.
    <strong>My best friend</strong>
    (a) </strong> (b) </i> (c) </h2> (d) </p>
  34. 34.Which of these is an opening tag? (a) <body> (b) </li> (c) </body> (d) </title>
  35. 35.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) maths.html (b) https://example.com (c) art.html (d) Maths fun
  36. 36.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  38. 38.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  39. 39.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>Hello, world!</p>
    (a) Hello, world! (b) Rain today (c) Good morning! (d) Fun facts
  40. 40.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) art.html (b) Contact us (c) quiz.html (d) news.html

Answer key

  1. has an address bar
  2. <h1>
  3. 2
  4. My drawings
  5. <h6>
  6. <title>
  7. 200
  8. a web server
  9. <h1>
  10. <!DOCTYPE html>
  11. <h4>
  12. in a new tab
  13. 5
  14. False
  15. 6
  16. <h4>
  17. No
  18. My pets
  19. False
  20. in the body
  21. a web browser
  22. <a href="about.html">
  23. Yes
  24. Our school trip
  25. Hello, world!
  26. 6
  27. bullets
  28. cake.jpg
  29. 4
  30. </h1>
  31. a closing tag
  32. </b>
  33. </p>
  34. <body>
  35. https://example.com
  36. has a closing tag
  37. <h6>
  38. No
  39. Rain today
  40. art.html

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