← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 295 · 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.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  2. 2.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h6>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
  3. 3.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  4. 4.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  5. 5.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <table>
  6. 6.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>My pets</h3>
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
  7. 7.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  8. 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  9. 9.🖼️ 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) width (c) An old fort (d) fort.jpg
  10. 10.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>My best friend</h4>
    <p>Rain today</p>
    <p>The red kite</p>
  11. 11.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Cricket Club (c) All about me (d) body
  13. 13.True or false: <table> goes in the head. (a) True (b) False
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
  15. 15.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
  16. 16.True or false: <ul> goes inside ul or ol. (a) True (b) False
  17. 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  18. 18.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) about.html (b) Take the quiz (c) quiz.html (d) games.html
  19. 19.True or false: a code editor has an address bar. (a) True (b) False
  20. 20.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Our school trip</p>
    <h4>The red kite</h4>
  21. 21.True or false: in <img>, height names the picture file. (a) True (b) False
  22. 22.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  23. 23.True or false: HTML on its own can make bullet lists. (a) False (b) True
  24. 24.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>I love mangoes.</p>
    <h4>Good morning!</h4>
  25. 25.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  26. 26.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) quiz.html (d) href
  27. 27.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) news.html (b) maths.html (c) Contact us (d) art.html
  28. 28.💬 Does the browser show comments on the page? (a) Yes (b) No
  29. 29.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h5>
  30. 30.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  31. 31.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  32. 32.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </html>
  33. 33.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) alt (d) height
  34. 34.Which of these is an opening tag? (a) </h1> (b) <body> (c) </title> (d) </p>
  35. 35.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  36. 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  37. 37.📄 Can HTML on its own make a form? (a) No (b) Yes
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red<br>Sky is blue</p>
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <i>I love mangoes.
    line 2: <u>My best friend</u>
    line 3: <h1>Good morning!</h1>
    (a) line 3 (b) line 2 (c) line 1
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Rivers flow</p>

Answer key

  1. opens it in a new tab
  2. <h6>
  3. 1
  4. in the same tab
  5. <table>
  6. 3
  7. 2
  8. No
  9. An old fort
  10. 2
  11. <ul>
  12. All about me
  13. False
  14. 1
  15. <li>
  16. False
  17. <ol>
  18. quiz.html
  19. False
  20. 2
  21. False
  22. <!DOCTYPE html>
  23. True
  24. 2
  25. No
  26. Take the quiz
  27. maths.html
  28. No
  29. <h1>
  30. <!--
  31. bullets
  32. <!DOCTYPE html>
  33. height
  34. <body>
  35. <h6>
  36. a web browser
  37. Yes
  38. 4
  39. line 1
  40. 3

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