← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 249 · 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 one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  3. 3.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  4. 4.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
  5. 5.True or false: in <img>, src describes the picture. (a) False (b) True
  6. 6.Which of these is an empty tag? (a) <li> (b) <ul> (c) <p> (d) <br>
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
  9. 9.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  11. 11.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) news.html (b) maths.html (c) Art corner (d) art.html
  12. 12.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  13. 13.Which of these is an opening tag? (a) </b> (b) </body> (c) </li> (d) <b>
  14. 14.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  15. 15.True or false: <title> is an empty tag. (a) True (b) False
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ul>
  17. 17.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="300">
  19. 19.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  20. 20.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
  21. 21.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  22. 22.True or false: <p> has a closing tag. (a) False (b) True
  23. 23.Which of these is an opening tag? (a) </body> (b) <title> (c) </b> (d) </title>
  24. 24.Which of these goes in the body? (a) <title> (b) <ul> (c) <link rel="stylesheet"> (d) <style>
  25. 25.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  26. 26.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.True or false: a web browser turns HTML into a page. (a) False (b) True
  28. 28.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) colours code to help us
  29. 29.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Good morning!</h2>
    <p>My best friend</p>
  30. 30.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Class 7 Blog (c) Try this poha. (d) All about me
  32. 32.Which of these is an empty tag? (a) <ul> (b) <p> (c) <meta> (d) <h1>
  33. 33.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    (a) Rain today (b) Good morning! (c) My pets (d) Our school trip
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.
    line 2: <h3>Hello, world!</h3>
    line 3: <h1>Cricket is fun.</h1>
    (a) line 2 (b) line 3 (c) line 1
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  36. 36.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  37. 37.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Fun facts</h2>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Our school trip</p>
    <p>My best friend</p>
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  39. 39.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) href (b) About us (c) Play games (d) maths.html
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) Planets (c) Riya’s Recipes (d) I like to read.

Answer key

  1. a code editor
  2. 1
  3. 1
  4. 2
  5. False
  6. <br>
  7. element
  8. 1
  9. in the body
  10. <h6>
  11. maths.html
  12. 6
  13. <b>
  14. on the browser tab
  15. False
  16. 3
  17. the body
  18. 300
  19. <a href="about.html">
  20. 2
  21. <!--
  22. True
  23. <title>
  24. <ul>
  25. <ol>
  26. a closing tag
  27. True
  28. colours code to help us
  29. 2
  30. <h1>
  31. Class 7 Blog
  32. <meta>
  33. Our school trip
  34. line 1
  35. <a>
  36. an empty tag
  37. 5
  38. 50
  39. Play games
  40. Planets

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