← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 996 · 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) answers page requests (b) sends pages over the net (c) opens web pages for us (d) is where we type code
  2. 2.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  3. 3.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend</strong>
    line 2: <h1>Our school trip</h1>
    line 3: <u>Rain today
    (a) line 1 (b) line 2 (c) line 3
  5. 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  6. 6.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg
  7. 7.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.💬 Does the browser show comments on the page? (a) No (b) Yes
  9. 9.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  11. 11.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  12. 12.🔗 Which words do you click on?
    <a href="contact.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) contact.html
  13. 13.True or false: a web server shows line numbers. (a) True (b) False
  14. 14.Which of these is an opening tag? (a) </p> (b) </title> (c) </body> (d) <p>
  15. 15.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) nowhere (d) on the browser tab
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Welcome! (b) body (c) My Hobbies (d) Mars is red.
  17. 17.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) about.html (c) quiz.html (d) games.html
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  19. 19.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  20. 20.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) href (c) Maths fun (d) news.html
  22. 22.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  23. 23.True or false: HTML on its own cannot make a form. (a) True (b) False
  24. 24.Which of these is an opening tag? (a) </b> (b) </title> (c) </body> (d) <title>
  25. 25.True or false: <ol> is an ordered list. (a) True (b) False
  26. 26.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Cricket is fun. (b) The red kite (c) Good morning! (d) Rain today
  27. 27.Which of these goes in the head? (a) <title> (b) <p> (c) <table> (d) <a>
  28. 28.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  29. 29.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) cake.jpg (b) A red kite (c) kite.png (d) map.png
  30. 30.🔍 Which is the odd one out? (a) has an address bar (b) answers page requests (c) sends pages over the net (d) hosts websites online
  31. 31.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon
  32. 32.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  33. 33.Which of these is true of a web server? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) sends pages over the net
  34. 34.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <h2>My best friend</h2>
    <p>Hello, world!</p>
    <p>The red kite</p>
  35. 35.True or false: in <img>, alt describes the picture. (a) True (b) False
  36. 36.Which of these has a closing tag? (a) <input> (b) <hr> (c) <br> (d) <ul>
  37. 37.True or false: <img> goes in the head. (a) True (b) False
  38. 38.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) Contact us (c) Visit the site (d) games.html
  40. 40.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) colours code to help us (d) saves our .html files

Answer key

  1. opens web pages for us
  2. <ul>
  3. 3
  4. line 3
  5. opens it in a new tab
  6. map.png
  7. a closing tag
  8. No
  9. a paragraph
  10. <a>
  11. in the same tab
  12. School news
  13. False
  14. <p>
  15. on the browser tab
  16. Welcome!
  17. quiz.html
  18. <ol>
  19. <ol>
  20. 3
  21. Visit the site
  22. <img>
  23. False
  24. <title>
  25. True
  26. Good morning!
  27. <title>
  28. False
  29. kite.png
  30. has an address bar
  31. moon.png
  32. in a new tab
  33. sends pages over the net
  34. 5
  35. True
  36. <ul>
  37. False
  38. a closing tag
  39. Contact us
  40. stores a website’s files

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