← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 887 · 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 shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  3. 3.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    (a) My best friend (b) Hello, world! (c) Rain today (d) Fun facts
  4. 4.📋 What number does the browser show next to “Guava”?
    <ol start="8">
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  5. 5.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  6. 6.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  7. 7.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  8. 8.True or false: <style> goes in the body. (a) False (b) True
  9. 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  10. 10.True or false: <input> has a closing tag. (a) True (b) False
  11. 11.True or false: in <img>, width tells which image to load. (a) True (b) False
  12. 12.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <u>My best friend
    <em>The red kite</em>
    (a) </p> (b) </u> (c) </em> (d) </h3>
  13. 13.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h4>? (a) <h6> (b) <h2> (c) <h4> (d) <h1>
  14. 14.🧱 HTML gives a web page its ___. (a) speed (b) sound (c) colours (d) structure
  15. 15.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <p> (c) <title> (d) <link rel="stylesheet">
  16. 16.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) I love mangoes. (b) Hello, world! (c) The red kite (d) Rain today
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h2>I love mangoes.
    line 2: <u>Hello, world!</u>
    line 3: <i>My pets</i>
    (a) line 2 (b) line 3 (c) line 1
  18. 18.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  19. 19.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    (a) My pets (b) Good morning! (c) Rain today
  20. 20.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.Which of these is true of a web browser? (a) stores a website’s files (b) turns HTML into a page (c) is where we type code (d) saves our .html files
  22. 22.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) height (d) alt
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
  24. 24.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
  25. 25.🔍 One closing tag is missing. Which one?
    <strong>Our school trip</strong>
    <h3>My pets</h3>
    <em>I love mangoes.
    (a) </em> (b) </h3> (c) </strong> (d) </b>
  26. 26.True or false: in <img>, height sets how wide it is. (a) False (b) True
  27. 27.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
    <h2>Rain today</h2>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  29. 29.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  30. 30.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  31. 31.True or false: <li> lists things in any order. (a) True (b) False
  32. 32.Which of these is an empty tag? (a) <p> (b) <li> (c) <hr> (d) <b>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
  34. 34.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    (a) Rain today (b) Good morning! (c) My pets (d) The red kite
  35. 35.True or false: in <img>, height shows if the image fails. (a) True (b) False
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  37. 37.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <!DOCTYPE html> (c) </html> (d) <head>
  38. 38.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <small>The red kite</small>
    line 3: <u>Rain today</u>
    (a) line 3 (b) line 2 (c) line 1
  40. 40.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //

Answer key

  1. a web browser
  2. bullets
  3. Fun facts
  4. 9
  5. href
  6. as one space
  7. kite.png
  8. False
  9. <h1>
  10. False
  11. False
  12. </u>
  13. <h1>
  14. structure
  15. <p>
  16. I love mangoes.
  17. line 1
  18. opens it in a new tab
  19. Good morning!
  20. in the head
  21. turns HTML into a page
  22. src
  23. <h5>
  24. </strong>
  25. </em>
  26. False
  27. 3
  28. 1
  29. <a href="about.html">
  30. <!DOCTYPE html>
  31. False
  32. <hr>
  33. 1
  34. Good morning!
  35. False
  36. bullets
  37. </html>
  38. has a closing tag
  39. line 1
  40. -->

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