← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 572 · 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 many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  2. 2.True or false: a web server sends pages over the net. (a) True (b) False
  3. 3.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) art.html (d) maths.html
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today
    line 2: <u>Good morning!</u>
    line 3: <b>I love mangoes.</b>
    (a) line 3 (b) line 1 (c) line 2
  5. 5.True or false: in <img>, alt describes the picture. (a) True (b) False
  6. 6.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Our school trip (c) Fun facts (d) My pets
  7. 7.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  8. 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
  10. 10.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Rain today</p>
    <p>The red kite</p>
  11. 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  12. 12.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
  13. 13.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <h2>My best friend</h2>
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  15. 15.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    (a) Fun facts (b) Our school trip (c) Rain today (d) Hello, world!
  16. 16.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
  17. 17.Which of these is a closing tag? (a) </title> (b) <body> (c) <li> (d) <h1>
  18. 18.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  19. 19.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  20. 20.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Cricket Club (b) Here is my best one. (c) Planets (d) index.html
  22. 22.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  23. 23.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
  24. 24.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  25. 25.True or false: a web browser sends pages over the net. (a) True (b) False
  26. 26.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  27. 27.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h6>? (a) <h5> (b) <h4> (c) <h6> (d) <h3>
  28. 28.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <p>My pets</p>
  29. 29.True or false: in <img>, width is read by screen readers. (a) True (b) False
  30. 30.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  31. 31.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Fun facts (c) Rain today (d) I love mangoes.
  32. 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  33. 33.Which of these is true of a web server? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) stores a website’s files
  34. 34.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Hello, world! (c) Rain today (d) Cricket is fun.
  36. 36.🔗 Where does this link open?
    <a href="about.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  37. 37.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  38. 38.True or false: <table> goes in the body. (a) False (b) True
  39. 39.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  40. 40.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1

Answer key

  1. 2
  2. True
  3. maths.html
  4. line 1
  5. True
  6. Cricket is fun.
  7. <li>
  8. tags
  9. 3
  10. 1
  11. Yes
  12. alt
  13. 2
  14. 300
  15. Fun facts
  16. the body
  17. </title>
  18. 6
  19. -->
  20. </small>
  21. Cricket Club
  22. 2
  23. 4
  24. <a href="about.html">
  25. False
  26. <ul>
  27. <h6>
  28. 2
  29. False
  30. <h1>
  31. My best friend
  32. <a>
  33. stores a website’s files
  34. in the same tab
  35. Cricket is fun.
  36. in a new tab
  37. <li>
  38. True
  39. 3
  40. 1

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