← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 425 · 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 tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  2. 2.Which of these is true of a web browser? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) is where we type code
  3. 3.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) kite.png (b) map.png (c) cake.jpg (d) A red kite
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) map.png (b) Birthday cake (c) Map of India (d) width
  5. 5.Which of these is true of a web server? (a) saves our .html files (b) sends pages over the net (c) has an address bar (d) turns HTML into a page
  6. 6.True or false: <title> goes in the body. (a) False (b) True
  7. 7.True or false: in <img>, src tells which image to load. (a) True (b) False
  8. 8.True or false: <a> goes in the head. (a) True (b) False
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) My best friend (b) Hello, world! (c) Good morning! (d) My pets
  10. 10.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  11. 11.🔍 One closing tag is missing. Which one?
    <em>Rain today</em>
    <h3>I love mangoes.</h3>
    <i>Cricket is fun.
    (a) </small> (b) </h3> (c) </i> (d) </em>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <small>Fun facts</small>
    line 2: <em>The red kite
    line 3: <p>Hello, world!</p>
    (a) line 1 (b) line 3 (c) line 2
  13. 13.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) <html>
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Our school trip (c) Hello, world!
  15. 15.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <table>
  16. 16.True or false: <ul> is an empty tag. (a) False (b) True
  17. 17.Which of these is a closing tag? (a) <p> (b) <title> (c) </p> (d) <h1>
  18. 18.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
    <h2>Fun facts</h2>
  19. 19.🔍 One closing tag is missing. Which one?
    <p>Rain today
    <b>I love mangoes.</b>
    <h1>My best friend</h1>
    (a) </h2> (b) </b> (c) </h1> (d) </p>
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) Try this poha. (d) Easy snacks
  21. 21.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  22. 22.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) bus.jpg (b) Our school bus (c) An old fort (d) width
  24. 24.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  25. 25.True or false: HTML on its own cannot make headings. (a) True (b) False
  26. 26.Which of these has a closing tag? (a) <img> (b) <meta> (c) <br> (d) <b>
  27. 27.True or false: in <img>, width shows if the image fails. (a) True (b) False
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Cricket Club (b) index.html (c) My drawings (d) Mars is red.
  29. 29.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  30. 30.True or false: a web browser opens web pages for us. (a) False (b) True
  31. 31.True or false: in <img>, width names the picture file. (a) True (b) False
  32. 32.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  33. 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
  34. 34.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  35. 35.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Kites fly high</p>
  37. 37.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) href (b) Art corner (c) Maths fun (d) art.html
  38. 38.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) maths.html (c) art.html (d) news.html
  39. 39.True or false: <ol> is an unordered list. (a) True (b) False
  40. 40.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>The red kite</p>
    <h4>Good morning!</h4>
    <p>My pets</p>

Answer key

  1. <img>
  2. opens web pages for us
  3. kite.png
  4. Map of India
  5. sends pages over the net
  6. False
  7. True
  8. False
  9. Good morning!
  10. -->
  11. </i>
  12. line 2
  13. <!DOCTYPE html>
  14. Our school trip
  15. <table>
  16. False
  17. </p>
  18. 4
  19. </p>
  20. Cricket Club
  21. <ol>
  22. a code editor
  23. Our school bus
  24. a web browser
  25. False
  26. <b>
  27. False
  28. Cricket Club
  29. False
  30. True
  31. False
  32. <ul>
  33. <a href="about.html">
  34. 6
  35. on the browser tab
  36. 3
  37. Maths fun
  38. maths.html
  39. False
  40. 2

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