← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 122 · 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="https://example.com">Play games</a>
    (a) About us (b) https://example.com (c) href (d) Play games
  2. 2.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) shows line numbers
  4. 4.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) moon.png (b) bus.jpg (c) A happy dog (d) dog.jpg
  5. 5.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  7. 7.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
  8. 8.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  9. 9.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) Art corner (c) School news (d) href
  10. 10.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  11. 11.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  12. 12.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  13. 13.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h6>? (a) <h1> (b) <h6> (c) <h2> (d) <h5>
  14. 14.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) games.html (b) contact.html (c) about.html (d) Art corner
  15. 15.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Stars shine</p>
  17. 17.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  18. 18.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <i> (c) </i> (d) <\i>
  19. 19.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) element (d) editor
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) Our school bus (b) width (c) An old fort (d) bus.jpg
  21. 21.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  22. 22.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <head> (c) </body> (d) </html>
  23. 23.True or false: <img> goes in the head. (a) False (b) True
  24. 24.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  25. 25.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  26. 26.🔍 Which is the odd one out? (a) answers page requests (b) shows line numbers (c) saves our .html files (d) colours code to help us
  27. 27.💬 Does the browser show comments on the page? (a) No (b) Yes
  28. 28.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <p>My best friend</p>
    <h4>Rain today</h4>
    <h2>Rain today</h2>
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
    </ul>
  30. 30.Which of these is a closing tag? (a) <body> (b) </b> (c) <h1> (d) <title>
  31. 31.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  32. 32.Which of these is an empty tag? (a) <h1> (b) <title> (c) <img> (d) <b>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>My best friend</p> -->
  34. 34.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
  35. 35.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  36. 36.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
  37. 37.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) Play games (b) news.html (c) About us (d) href
  39. 39.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  40. 40.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt

Answer key

  1. Play games
  2. in a new tab
  3. shows line numbers
  4. dog.jpg
  5. an opening tag
  6. Yes
  7. href
  8. a web browser
  9. Art corner
  10. <ul>
  11. an opening tag
  12. alt
  13. <h1>
  14. games.html
  15. <h4>
  16. 5
  17. a web server
  18. </i>
  19. element
  20. Our school bus
  21. No
  22. </html>
  23. False
  24. 1
  25. <a>
  26. answers page requests
  27. No
  28. 3
  29. 6
  30. </b>
  31. <!DOCTYPE html>
  32. <img>
  33. 2
  34. width
  35. False
  36. Language
  37. a closing tag
  38. Play games
  39. <h1>
  40. alt

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