← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 196 · 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 browser? (a) turns HTML into a page (b) saves our .html files (c) sends pages over the net (d) shows line numbers
  2. 2.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  4. 4.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
  5. 5.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  6. 6.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  7. 7.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  8. 8.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  9. 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  10. 10.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  11. 11.📋 What number does the browser show next to “Grapes”?
    <ol start="6">
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  12. 12.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h6>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
  13. 13.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  14. 14.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>My best friend</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
  15. 15.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Our school trip (c) The red kite
  16. 16.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  17. 17.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) maths.html (d) Visit the site
  18. 18.💬 Does the browser show comments on the page? (a) Yes (b) No
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Thanks for visiting. (c) Space Facts (d) All about me
  20. 20.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
  21. 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  22. 22.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
  23. 23.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .mp3 (d) .png
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.
    <small>I love mangoes.</small>
    <strong>Fun facts</strong>
    (a) </u> (b) </h2> (c) </strong> (d) </small>
  26. 26.Which of these is true of a web server? (a) shows line numbers (b) opens web pages for us (c) turns HTML into a page (d) hosts websites online
  27. 27.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h1>? (a) <h2> (b) <h5> (c) <h1> (d) <h4>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png
  29. 29.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Machine (d) Markup
  30. 30.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  31. 31.True or false: <ol> is one item of a list. (a) True (b) False
  32. 32.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
  33. 33.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  34. 34.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <p>The red kite
    line 3: <strong>Fun facts</strong>
    (a) line 2 (b) line 1 (c) line 3
  36. 36.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) saves our .html files (d) hosts websites online
  37. 37.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
  38. 38.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  39. 39.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
  40. 40.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. turns HTML into a page
  2. 3
  3. dog.jpg
  4. as one space
  5. a code editor
  6. has a closing tag
  7. opens it in a new tab
  8. an attribute
  9. <a href="about.html">
  10. in the same tab
  11. 7
  12. <h2>
  13. 2
  14. 5
  15. Rain today
  16. <ul>
  17. contact.html
  18. No
  19. Space Facts
  20. href
  21. 1
  22. 5
  23. .html
  24. bullets
  25. </u>
  26. hosts websites online
  27. <h5>
  28. dog.jpg
  29. Markup
  30. a slash /
  31. False
  32. 2
  33. 3
  34. to leave notes
  35. line 2
  36. hosts websites online
  37. a line across the page
  38. <h1>
  39. src
  40. an opening tag

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