← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 5 · 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 heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  2. 2.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    (a) Hello, world! (b) Good morning! (c) My pets
  3. 3.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  5. 5.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) is where we type code (d) shows line numbers
  6. 6.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  7. 7.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  9. 9.True or false: in <img>, height sets how tall it is. (a) False (b) True
  10. 10.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  11. 11.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  12. 12.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <h3>Hello, world!</h3>
    <h2>Cricket is fun.</h2>
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Match report (d) Riya’s Recipes
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  15. 15.True or false: <b> has a closing tag. (a) False (b) True
  16. 16.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  17. 17.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  18. 18.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <h2>Hello, world!</h2>
  19. 19.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) news.html (b) quiz.html (c) Art corner (d) art.html
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  21. 21.🔗 Where does this link open?
    <a href="about.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  22. 22.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) sends pages over the net (d) opens web pages for us
  23. 23.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <p>My pets</p>
  25. 25.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to show pictures (d) to make links
  26. 26.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
  27. 27.True or false: in <img>, src names the picture file. (a) True (b) False
  28. 28.🔠 Are headings shown in bold by default? (a) No (b) Yes
  29. 29.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  30. 30.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) href (b) About us (c) art.html (d) Play games
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <h1>Cricket is fun.
    line 2: <b>My pets</b>
    line 3: <h3>Good morning!</h3>
    (a) line 1 (b) line 3 (c) line 2
  32. 32.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  33. 33.Which of these is an empty tag? (a) <h1> (b) <input> (c) <b> (d) <title>
  34. 34.Which of these is an opening tag? (a) </b> (b) <title> (c) </title> (d) </h1>
  35. 35.True or false: <p> has a closing tag. (a) False (b) True
  36. 36.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <h2>Fun facts</h2>
    <p>Our school trip</p>
  37. 37.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  38. 38.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
  39. 39.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My best friend</p>
    <h2>Good morning!</h2>
    <p>My pets</p>
  40. 40.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. <h1>
  2. My pets
  3. <!DOCTYPE html>
  4. <h1>
  5. opens web pages for us
  6. False
  7. in the body
  8. numbers
  9. True
  10. 1
  11. numbers
  12. 3
  13. Riya’s Recipes
  14. bullets
  15. True
  16. an empty tag
  17. Yes
  18. 1
  19. art.html
  20. bullets
  21. in the same tab
  22. sends pages over the net
  23. alt
  24. 4
  25. to leave notes
  26. element
  27. True
  28. Yes
  29. <h1>
  30. Play games
  31. line 1
  32. in a new tab
  33. <input>
  34. <title>
  35. True
  36. 3
  37. an attribute
  38. opens it in a new tab
  39. 3
  40. an empty tag

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