← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 141 · 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 list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  2. 2.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  3. 3.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) index.html (c) My Hobbies (d) Here is my best one.
  5. 5.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Cricket Club (c) Easy snacks (d) body
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Easy snacks (c) Riya’s Recipes (d) Try this poha.
  7. 7.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort
  8. 8.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  9. 9.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) width (b) An old fort (c) bus.jpg (d) Our school bus
  12. 12.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  13. 13.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) quiz.html (b) news.html (c) About us (d) games.html
  14. 14.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  15. 15.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  16. 16.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
  17. 17.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  18. 18.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) href (b) About us (c) art.html (d) Contact us
  19. 19.True or false: <style> goes in the body. (a) True (b) False
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Cricket Club (b) Thanks for visiting. (c) All about me (d) body
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) Art Gallery (d) Match report
  22. 22.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  23. 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  24. 24.True or false: <li> is an unordered list. (a) True (b) False
  25. 25.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  26. 26.True or false: HTML on its own can make a form. (a) False (b) True
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  28. 28.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) stores a website’s files (d) turns HTML into a page
  29. 29.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) Maths fun (b) href (c) Visit the site (d) news.html
  30. 30.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
  31. 31.🔍 Which line is missing its closing tag?
    line 1: <u>Hello, world!</u>
    line 2: <p>Rain today
    line 3: <i>Fun facts</i>
    (a) line 3 (b) line 2 (c) line 1
  32. 32.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  33. 33.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    (a) Our school trip (b) Hello, world! (c) The red kite
  34. 34.True or false: <ul> is an ordered list. (a) False (b) True
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  36. 36.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a new line (c) as a dot (d) as 5 spaces
  37. 37.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  38. 38.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  39. 39.💬 Does the browser show comments on the page? (a) Yes (b) No
  40. 40.Which of these is true of a code editor? (a) opens web pages for us (b) sends pages over the net (c) answers page requests (d) shows line numbers

Answer key

  1. <ul>
  2. to describe the image
  3. 1
  4. My Hobbies
  5. Easy snacks
  6. Riya’s Recipes
  7. fort.jpg
  8. an empty tag
  9. alt
  10. numbers
  11. Our school bus
  12. numbers
  13. news.html
  14. <li>
  15. <ul>
  16. on the browser tab
  17. <!--
  18. About us
  19. False
  20. All about me
  21. Match report
  22. <img>
  23. -->
  24. False
  25. a code editor
  26. True
  27. 2
  28. turns HTML into a page
  29. Visit the site
  30. the body
  31. line 2
  32. an opening tag
  33. Our school trip
  34. False
  35. <a>
  36. as one space
  37. Yes
  38. No
  39. No
  40. shows line numbers

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