← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 357 · 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 paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  2. 2.True or false: a web server saves our .html files. (a) True (b) False
  3. 3.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  5. 5.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
    <h3>My best friend</h3>
    <p>Good morning!</p>
  6. 6.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <\h1> (c) <h1> (d) <h1/>
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    (a) Hello, world! (b) The red kite (c) Good morning! (d) Rain today
  8. 8.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  9. 9.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <html>
  10. 10.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h4> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  12. 12.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Rain today</h2>
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
  13. 13.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  14. 14.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  15. 15.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
    <h2>Rain today</h2>
  16. 16.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>The red kite</p>
    <h4>Hello, world!</h4>
    <h2>Hello, world!</h2>
  17. 17.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>My pets</p>
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
  19. 19.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
  20. 20.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) is where we type code
  21. 21.Which of these is true of a web browser? (a) colours code to help us (b) answers page requests (c) shows pages from the web (d) hosts websites online
  22. 22.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <title> (d) <p>
  23. 23.True or false: <h1> goes in the body. (a) True (b) False
  24. 24.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  25. 25.🔍 One closing tag is missing. Which one?
    <h3>The red kite</h3>
    <b>Good morning!
    <i>Our school trip</i>
    (a) </h1> (b) </b> (c) </i> (d) </h3>
  26. 26.Which of these is a closing tag? (a) <title> (b) <b> (c) </h1> (d) <li>
  27. 27.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  28. 28.True or false: HTML on its own can show paragraphs. (a) False (b) True
  29. 29.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  30. 30.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
  31. 31.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>My best friend</p>
    <p>Rain today</p>
    <p>My best friend</p>
  32. 32.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Rivers flow<br>Kites fly high</p>
  34. 34.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Match report (b) Thanks for visiting. (c) body (d) Art Gallery
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Match report (c) index.html (d) Space Facts
  36. 36.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>My best friend</h3>
    <h3>I love mangoes.</h3>
    <h3>Cricket is fun.</h3>
  37. 37.Which of these is an opening tag? (a) </body> (b) <p> (c) </b> (d) </li>
  38. 38.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
  40. 40.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph

Answer key

  1. 1
  2. False
  3. in the body
  4. <ul>
  5. 2
  6. </h1>
  7. Hello, world!
  8. 2
  9. <!DOCTYPE html>
  10. <h6>
  11. <h6>
  12. 2
  13. <li>
  14. opens it in a new tab
  15. 2
  16. 3
  17. 2
  18. element
  19. <html>
  20. turns HTML into a page
  21. shows pages from the web
  22. <p>
  23. True
  24. a line across the page
  25. </b>
  26. </h1>
  27. <h1>
  28. True
  29. a closing tag
  30. a code editor
  31. 4
  32. -->
  33. 4
  34. Match report
  35. Space Facts
  36. 4
  37. <p>
  38. an empty tag
  39. an attribute
  40. a paragraph

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