← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 906 · 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 does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  2. 2.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) height (c) alt (d) width
  3. 3.📄 What does the browser tab show for 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) All about me (c) Cricket Club (d) index.html
  4. 4.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  5. 5.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 10 (d) 4
  6. 6.🔗 Which address opens when you click this link?
    <a href="about.html">Play games</a>
    (a) about.html (b) contact.html (c) https://example.com (d) Play games
  7. 7.True or false: a web server answers page requests. (a) True (b) False
  8. 8.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    (a) Fun facts (b) Rain today (c) Our school trip (d) Good morning!
  9. 9.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  10. 10.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  12. 12.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  13. 13.True or false: a web browser answers page requests. (a) True (b) False
  14. 14.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>Good morning!</p>
    <p>I love mangoes.</p>
  15. 15.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) About us (b) contact.html (c) href (d) Contact us
  16. 16.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  19. 19.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <ul> (d) <table>
  20. 20.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) games.html (b) School news (c) contact.html (d) about.html
  21. 21.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  22. 22.🔍 Which is the odd one out? (a) saves our .html files (b) answers page requests (c) is where we type code (d) colours code to help us
  23. 23.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) hosts websites online
  24. 24.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  26. 26.Which of these is an empty tag? (a) <ul> (b) <br> (c) <h1> (d) <li>
  27. 27.True or false: <ol> is an unordered list. (a) True (b) False
  28. 28.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  29. 29.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) href (b) Art corner (c) games.html (d) Maths fun
  30. 30.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h4>Cricket is fun.</h4>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  32. 32.True or false: in <img>, height sets how tall it is. (a) True (b) False
  33. 33.📝 What does <p> make? (a) a table (b) a picture (c) a link (d) a paragraph
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  35. 35.True or false: <li> is an unordered list. (a) True (b) False
  36. 36.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  37. 37.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  38. 38.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </head> (c) </html> (d) <head>
  39. 39.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png

Answer key

  1. -->
  2. alt
  3. Cricket Club
  4. <ol>
  5. 6
  6. about.html
  7. True
  8. Fun facts
  9. No
  10. </em>
  11. <h4>
  12. href
  13. False
  14. 1
  15. About us
  16. a web browser
  17. Yes
  18. 100
  19. <meta charset="utf-8">
  20. games.html
  21. a code editor
  22. answers page requests
  23. shows pages from the web
  24. a closing tag
  25. <h5>
  26. <br>
  27. False
  28. False
  29. Maths fun
  30. 3
  31. <h6>
  32. True
  33. a paragraph
  34. <h1>
  35. False
  36. <ul>
  37. False
  38. </html>
  39. <h6>
  40. tiger.jpg

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