← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 845 · 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.True or false: a web browser shows line numbers. (a) True (b) False
  2. 2.💾 A web page file usually ends with which extension? (a) .html (b) .txt (c) .png (d) .mp3
  3. 3.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    (a) Good morning! (b) I love mangoes. (c) My best friend
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Kites fly high<br>Sky is blue<br>Rivers flow</p>
  5. 5.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) The red kite (b) My best friend (c) Rain today
  6. 6.🔍 Which is the odd one out? (a) answers page requests (b) stores a website’s files (c) sends pages over the net (d) colours code to help us
  7. 7.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  8. 8.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) about.html
  9. 9.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Stars shine<br>Birds sing</p>
  11. 11.True or false: HTML on its own can make tables. (a) True (b) False
  12. 12.🏷️ Which is the closing tag for <u>? (a) <\u> (b) </u> (c) <u/> (d) <u>
  13. 13.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) width (c) alt (d) src
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  15. 15.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  16. 16.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) href (c) Visit the site (d) contact.html
  17. 17.True or false: in <img>, width sets how wide it is. (a) True (b) False
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) about.html (b) contact.html (c) Maths fun (d) games.html
  20. 20.True or false: a web browser opens web pages for us. (a) False (b) True
  21. 21.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  22. 22.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    (a) I love mangoes. (b) Our school trip (c) Cricket is fun.
  23. 23.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
  24. 24.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) Our school trip
  25. 25.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Space Facts (c) Thanks for visiting. (d) Planets
  27. 27.True or false: <li> goes inside ul or ol. (a) True (b) False
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  29. 29.🔍 One closing tag is missing. Which one?
    <p>My best friend</p>
    <h2>Cricket is fun.
    <small>My pets</small>
    (a) </u> (b) </h2> (c) </p> (d) </small>
  30. 30.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
  31. 31.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  32. 32.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Rain today</p> -->
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  36. 36.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Welcome! (b) Mars is red. (c) index.html (d) Art Gallery
  38. 38.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) width (d) height
  39. 39.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
  40. 40.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <small>My pets
    (a) </small> (b) </p> (c) </h1> (d) </h3>

Answer key

  1. False
  2. .html
  3. My best friend
  4. 5
  5. Rain today
  6. colours code to help us
  7. Yes
  8. School news
  9. <!--
  10. 4
  11. True
  12. </u>
  13. alt
  14. 1
  15. in a new tab
  16. Contact us
  17. True
  18. <ol>
  19. games.html
  20. True
  21. 3
  22. I love mangoes.
  23. 1
  24. Cricket is fun.
  25. 3
  26. Planets
  27. True
  28. 2
  29. </h2>
  30. 3
  31. True
  32. in the body
  33. 1
  34. <a href="about.html">
  35. <a>
  36. src
  37. Art Gallery
  38. width
  39. </h1>
  40. </small>

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