← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 598 · 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 has a closing tag? (a) <br> (b) <meta> (c) <hr> (d) <ul>
  2. 2.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
  3. 3.True or false: <ol> is an unordered list. (a) False (b) True
  4. 4.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) quiz.html
  5. 5.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a web browser (d) a music player
  6. 6.Which of these goes in the head? (a) <img> (b) <style> (c) <ul> (d) <h1>
  7. 7.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) cake.jpg (b) map.png (c) A red kite (d) kite.png
  9. 9.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ul>
  11. 11.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) Cricket is fun. (b) Rain today (c) I love mangoes. (d) Hello, world!
  12. 12.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) shows pages from the web (d) shows line numbers
  13. 13.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) art.html (b) Play games (c) maths.html (d) https://example.com
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  15. 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  16. 16.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h2>My pets</h2>
    <p>My pets</p>
  17. 17.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
  18. 18.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    <p>My pets</p>
  20. 20.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) structure (d) speed
  21. 21.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <h2>My best friend</h2>
    <h2>Fun facts</h2>
    <p>Fun facts</p>
    <h2>My pets</h2>
  22. 22.True or false: <title> goes in the body. (a) False (b) True
  23. 23.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
  24. 24.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) Contact us (b) quiz.html (c) about.html (d) games.html
  25. 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  26. 26.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  27. 27.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  28. 28.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <b>My best friend</b>
    line 3: <strong>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) index.html (c) Class 7 Blog (d) Welcome!
  31. 31.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
  32. 32.True or false: in <img>, alt sets how tall it is. (a) True (b) False
  33. 33.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  34. 34.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) A red kite (c) map.png (d) cake.jpg
  35. 35.True or false: <meta> is an empty tag. (a) False (b) True
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h4>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  37. 37.Which of these is true of a web browser? (a) hosts websites online (b) colours code to help us (c) saves our .html files (d) has an address bar
  38. 38.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  39. 39.True or false: in <img>, width sets how wide it is. (a) False (b) True
  40. 40.📋 What number does the browser show next to “Orange”?
    <ol start="8">
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>

Answer key

  1. <ul>
  2. 3
  3. False
  4. Take the quiz
  5. a web browser
  6. <style>
  7. <ul>
  8. kite.png
  9. on the browser tab
  10. 3
  11. Hello, world!
  12. shows line numbers
  13. https://example.com
  14. 2
  15. in the head
  16. 2
  17. opens it in a new tab
  18. <body>
  19. 3
  20. structure
  21. 3
  22. False
  23. 3
  24. quiz.html
  25. has a closing tag
  26. 3
  27. href
  28. fort.jpg
  29. line 3
  30. Class 7 Blog
  31. 2
  32. False
  33. an opening tag
  34. kite.png
  35. True
  36. <h5>
  37. has an address bar
  38. a web browser
  39. True
  40. 9

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