← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 863 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  2. 2.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  4. 4.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) I love mangoes. (d) Hello, world!
  5. 5.True or false: a web server colours code to help us. (a) False (b) True
  6. 6.True or false: in <img>, height sets how wide it is. (a) False (b) True
  7. 7.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  8. 8.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  9. 9.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) Thanks for visiting. (c) index.html (d) Cricket Club
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  11. 11.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) Rain today
  12. 12.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) games.html (c) about.html (d) contact.html
  13. 13.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) <body>
  14. 14.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="250">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Sky is blue</p>
  16. 16.Which of these is an empty tag? (a) <img> (b) <p> (c) <li> (d) <ul>
  17. 17.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <html> (d) <body>
  18. 18.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.True or false: a web browser has an address bar. (a) True (b) False
  20. 20.True or false: <a> goes in the body. (a) False (b) True
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) news.html (b) href (c) Contact us (d) Visit the site
  22. 22.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  23. 23.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high</p>
  25. 25.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  26. 26.Which of these is true of a code editor? (a) shows pages from the web (b) stores a website’s files (c) is where we type code (d) opens web pages for us
  27. 27.📄 Can HTML on its own make headings? (a) No (b) Yes
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing<br>Roses are red</p>
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) The full moon (b) A happy dog (c) dog.jpg (d) width
  30. 30.Which of these goes in the body? (a) <style> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  31. 31.🔍 One closing tag is missing. Which one?
    <b>Fun facts
    <i>Cricket is fun.</i>
    <em>My best friend</em>
    (a) </h2> (b) </em> (c) </b> (d) </i>
  32. 32.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) art.html (b) href (c) Art corner (d) Maths fun
  33. 33.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>My pets</p>
    (a) Cricket is fun. (b) Hello, world! (c) My pets (d) My best friend
  34. 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="100">
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  37. 37.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
  38. 38.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>My best friend</h3>
    <p>Cricket is fun.</p>
    <h4>Rain today</h4>
    <p>Our school trip</p>
  39. 39.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Cricket is fun.</h4>
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
  40. 40.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) quiz.html (b) Play games (c) news.html (d) art.html

Answer key

  1. 2
  2. <a>
  3. 3
  4. Hello, world!
  5. False
  6. False
  7. <ul>
  8. height
  9. Cricket Club
  10. numbers
  11. I love mangoes.
  12. games.html
  13. <!DOCTYPE html>
  14. map.png
  15. 3
  16. <img>
  17. <!DOCTYPE html>
  18. in the body
  19. True
  20. True
  21. Contact us
  22. Yes
  23. <ul>
  24. 2
  25. 6
  26. is where we type code
  27. Yes
  28. 4
  29. A happy dog
  30. <h1>
  31. </b>
  32. Maths fun
  33. Hello, world!
  34. <a href="about.html">
  35. 100
  36. <h1>
  37. <img>
  38. 3
  39. 3
  40. art.html

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