← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 846 · 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 server? (a) opens web pages for us (b) shows line numbers (c) shows pages from the web (d) sends pages over the net
  2. 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  3. 3.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  4. 4.🔍 One closing tag is missing. Which one?
    <h3>My best friend
    <i>Cricket is fun.</i>
    <em>Good morning!</em>
    (a) </i> (b) </em> (c) </h3> (d) </b>
  5. 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) element (d) address
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <p>I love mangoes.</p>
    line 2: <small>My pets</small>
    line 3: <h2>Cricket is fun.
    (a) line 3 (b) line 2 (c) line 1
  7. 7.Which of these is true of a code editor? (a) answers page requests (b) hosts websites online (c) shows pages from the web (d) shows line numbers
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite</h1>
    line 2: <h3>Hello, world!</h3>
    line 3: <strong>Fun facts
    (a) line 3 (b) line 2 (c) line 1
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <small>My best friend</small>
    line 2: <h3>The red kite</h3>
    line 3: <p>Cricket is fun.
    (a) line 2 (b) line 3 (c) line 1
  10. 10.True or false: a web server sends pages over the net. (a) False (b) True
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  12. 12.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
  14. 14.📄 Can HTML on its own make a form? (a) No (b) Yes
  15. 15.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  16. 16.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <\h2> (c) </h2> (d) <h2/>
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) width (c) Birthday cake (d) A happy dog
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) Map of India (b) width (c) A red kite (d) kite.png
  19. 19.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  20. 20.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
  21. 21.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) an element name (d) a closing tag
  22. 22.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  23. 23.Which of these is true of a web browser? (a) colours code to help us (b) is where we type code (c) turns HTML into a page (d) shows line numbers
  24. 24.True or false: a web server shows pages from the web. (a) False (b) True
  25. 25.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My Hobbies (b) All about me (c) index.html (d) Here is my best one.
  26. 26.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>My pets</p>
  29. 29.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>The red kite</p>
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  31. 31.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  32. 32.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  34. 34.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
  35. 35.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) contact.html (b) Art corner (c) games.html (d) about.html
  36. 36.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
    </ul>
  38. 38.True or false: <a> goes in the head. (a) True (b) False
  39. 39.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) answers page requests
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>

Answer key

  1. sends pages over the net
  2. <ol>
  3. in a new tab
  4. </h3>
  5. element
  6. line 3
  7. shows line numbers
  8. line 3
  9. line 3
  10. True
  11. 400
  12. <!--
  13. 1
  14. Yes
  15. True
  16. </h2>
  17. Birthday cake
  18. A red kite
  19. <h1>
  20. 1
  21. an attribute
  22. the body
  23. turns HTML into a page
  24. False
  25. My Hobbies
  26. in the head
  27. a web browser
  28. 3
  29. 1
  30. 200
  31. True
  32. in the body
  33. an empty tag
  34. 2
  35. games.html
  36. <ul>
  37. 5
  38. False
  39. answers page requests
  40. <h1>

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