← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 391 · 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 SMALLEST text: <h4>, <h5>, <h2> or <h3>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  2. 2.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
  3. 3.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  5. 5.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  6. 6.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
  7. 7.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  8. 8.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  9. 9.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
  10. 10.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    (a) Our school trip (b) Hello, world! (c) Good morning!
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red<br>Kites fly high</p>
  12. 12.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Kites fly high<br>Stars shine</p>
  14. 14.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  15. 15.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  16. 16.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) structure (d) speed
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    (a) My pets (b) The red kite (c) Our school trip
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <b>My best friend</b>
    line 3: <i>The red kite
    (a) line 2 (b) line 1 (c) line 3
  19. 19.Which of these is an opening tag? (a) </h1> (b) <title> (c) </title> (d) </li>
  20. 20.🔗 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
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  22. 22.🔗 Where does this link open?
    <a href="art.html">About us</a>
    (a) in a new tab (b) in the same tab
  23. 23.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  24. 24.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <small>My pets</small>
    <strong>Hello, world!
    (a) </h1> (b) </small> (c) </h2> (d) </strong>
  26. 26.🔍 Which is the odd one out? (a) opens web pages for us (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
  27. 27.Which of these goes in the head? (a) <a> (b) <table> (c) <meta charset="utf-8"> (d) <h1>
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  29. 29.True or false: a web browser shows pages from the web. (a) False (b) True
  30. 30.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) has an address bar (d) opens web pages for us
  31. 31.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  32. 32.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    (a) Our school trip (b) Cricket is fun. (c) My best friend (d) My pets
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  34. 34.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  35. 35.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  36. 36.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) about.html (b) Play games (c) About us (d) href
  38. 38.True or false: <h1> goes in the body. (a) False (b) True
  39. 39.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <b>Fun facts
    <small>The red kite</small>
    (a) </h2> (b) </small> (c) </h1> (d) </b>
  40. 40.💬 Does the browser show comments on the page? (a) No (b) Yes

Answer key

  1. <h5>
  2. <h1>
  3. 3
  4. 4
  5. <!DOCTYPE html>
  6. to describe the image
  7. <ul>
  8. Yes
  9. <h6>
  10. Good morning!
  11. 4
  12. in a new tab
  13. 4
  14. a web server
  15. <h1>
  16. structure
  17. My pets
  18. line 3
  19. <title>
  20. opens it in a new tab
  21. 2
  22. in the same tab
  23. <h5>
  24. has a closing tag
  25. </strong>
  26. colours code to help us
  27. <meta charset="utf-8">
  28. Yes
  29. True
  30. stores a website’s files
  31. an opening tag
  32. My pets
  33. <h1>
  34. <a>
  35. <h1>
  36. dog.jpg
  37. Play games
  38. True
  39. </b>
  40. No

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