← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 389 · 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.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
  2. 2.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) Rain today (b) My pets (c) My best friend (d) Fun facts
  3. 3.True or false: <meta> has a closing tag. (a) True (b) False
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!</strong>
    line 2: <p>My best friend
    line 3: <h3>I love mangoes.</h3>
    (a) line 1 (b) line 2 (c) line 3
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) A tiger asleep (b) An old fort (c) width (d) fort.jpg
  7. 7.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) maths.html (b) news.html (c) About us (d) art.html
  8. 8.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  9. 9.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  10. 10.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  11. 11.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Our school trip</h2>
    <p>My pets</p>
  12. 12.Which of these goes in the head? (a) <img> (b) <table> (c) <p> (d) <title>
  13. 13.💬 Does the browser show comments on the page? (a) Yes (b) No
  14. 14.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <h1>Cricket is fun.
    line 2: <i>Our school trip</i>
    line 3: <b>Rain today</b>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) width (c) A red kite (d) Map of India
  17. 17.True or false: <ol> shows bullet points. (a) True (b) False
  18. 18.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
  19. 19.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  20. 20.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  21. 21.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) about.html (c) https://example.com (d) contact.html
  22. 22.🔠 Are headings shown in bold by default? (a) Yes (b) No
  23. 23.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) colours code to help us
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  26. 26.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) has an address bar
  27. 27.True or false: <p> has a closing tag. (a) True (b) False
  28. 28.🔍 One closing tag is missing. Which one?
    <em>Fun facts
    <h1>My pets</h1>
    <strong>Rain today</strong>
    (a) </em> (b) </strong> (c) </p> (d) </h1>
  29. 29.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  30. 30.🔗 Where does this link open?
    <a href="https://example.com">Maths fun</a>
    (a) in the same tab (b) in a new tab
  31. 31.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) shows line numbers (d) shows pages from the web
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Rain today</p>
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high<br>Roses are red<br>Rivers flow</p>
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <h2>Hello, world!
    line 3: <i>My best friend</i>
    (a) line 3 (b) line 1 (c) line 2
  36. 36.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
  37. 37.True or false: <li> has a closing tag. (a) True (b) False
  38. 38.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
  39. 39.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    (a) Rain today (b) Fun facts (c) Hello, world! (d) Good morning!
  40. 40.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h4> or <h6>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>

Answer key

  1. 2
  2. My pets
  3. False
  4. 2
  5. line 2
  6. An old fort
  7. maths.html
  8. <ol>
  9. numbers
  10. in a new tab
  11. 2
  12. <title>
  13. No
  14. <h6>
  15. line 1
  16. A red kite
  17. False
  18. <h6>
  19. a code editor
  20. <!--
  21. about.html
  22. Yes
  23. colours code to help us
  24. 50
  25. 100
  26. answers page requests
  27. True
  28. </em>
  29. a web server
  30. in the same tab
  31. shows line numbers
  32. 3
  33. 5
  34. <h1>
  35. line 2
  36. a code editor
  37. True
  38. 3
  39. Hello, world!
  40. <h6>

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