← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 961 · 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 words do you click on?
    <a href="news.html">Visit the site</a>
    (a) href (b) Visit the site (c) Maths fun (d) news.html
  2. 2.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Visit the site (b) art.html (c) href (d) Contact us
  4. 4.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  5. 5.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) Art corner (c) Maths fun (d) href
  6. 6.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  7. 7.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  8. 8.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  9. 9.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) turns HTML into a page (d) shows line numbers
  10. 10.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  11. 11.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  12. 12.📋 What number does the browser show next to “Guava”?
    <ol start="6">
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <p>My best friend
    line 3: <u>Rain today</u>
    (a) line 3 (b) line 1 (c) line 2
  14. 14.📋 What number does the browser show next to “Litchi”?
    <ol start="4">
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  15. 15.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  16. 16.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
  17. 17.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) turns HTML into a page (d) opens web pages for us
  18. 18.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  19. 19.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  20. 20.Which of these is an opening tag? (a) </body> (b) </li> (c) </b> (d) <body>
  21. 21.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) Art corner (b) maths.html (c) href (d) Maths fun
  22. 22.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>My pets</h4>
    <h3>The red kite</h3>
  23. 23.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h4>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  24. 24.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  26. 26.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the doctype (d) the title
  27. 27.Which of these is an opening tag? (a) <p> (b) </p> (c) </li> (d) </body>
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Kites fly high<br>Roses are red<br>Birds sing</p>
  29. 29.🔗 Where does this link open?
    <a href="games.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  30. 30.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
  32. 32.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  33. 33.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) maths.html
  34. 34.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  35. 35.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  36. 36.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
  37. 37.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  38. 38.🔠 Are headings shown in bold by default? (a) No (b) Yes
  39. 39.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <p>Our school trip</p>
  40. 40.True or false: a web server sends pages over the net. (a) True (b) False

Answer key

  1. Visit the site
  2. an opening tag
  3. Contact us
  4. </h2>
  5. Maths fun
  6. <h1>
  7. 6
  8. <ul>
  9. shows line numbers
  10. in a new tab
  11. in the same tab
  12. 7
  13. line 2
  14. 5
  15. <a href="about.html">
  16. <h1>
  17. stores a website’s files
  18. <!--
  19. <h6>
  20. <body>
  21. Maths fun
  22. 3
  23. <h1>
  24. 3
  25. 3
  26. the body
  27. <p>
  28. 5
  29. in the same tab
  30. <ul>
  31. 2
  32. to leave notes
  33. Contact us
  34. No
  35. Yes
  36. <h1>
  37. to describe the image
  38. Yes
  39. 1
  40. True

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