← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 853 · 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 program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
  2. 2.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  3. 3.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Stars shine<br>Kites fly high</p>
  5. 5.True or false: HTML on its own cannot make headings. (a) True (b) False
  6. 6.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  7. 7.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <h4>My pets</h4>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) map.png (b) A red kite (c) cake.jpg (d) kite.png
  9. 9.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) shows line numbers (d) opens web pages for us
  10. 10.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  11. 11.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <em>Fun facts</em>
    <small>Our school trip
    (a) </small> (b) </i> (c) </em> (d) </h1>
  12. 12.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) We won by 5 runs. (c) Cricket Club (d) Planets
  14. 14.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    (a) My best friend (b) Rain today (c) Hello, world!
  15. 15.🔗 Where does this link open?
    <a href="news.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  16. 16.Which of these is an opening tag? (a) </b> (b) </p> (c) <p> (d) </h1>
  17. 17.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    (a) Rain today (b) Hello, world! (c) My best friend
  18. 18.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <h2>The red kite</h2>
  19. 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <img> (d) <li>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  22. 22.Which of these goes in the head? (a) <table> (b) <title> (c) <img> (d) <a>
  23. 23.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <h3>Hello, world!</h3>
    <h2>I love mangoes.</h2>
    (a) </h2> (b) </small> (c) </strong> (d) </h3>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
  25. 25.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h2>
  26. 26.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) width (c) A happy dog (d) Birthday cake
  28. 28.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) The red kite (b) I love mangoes. (c) Fun facts (d) Our school trip
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) An old fort (b) bus.jpg (c) width (d) Our school bus
  30. 30.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) A happy dog (b) dog.jpg (c) The full moon (d) width
  32. 32.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  34. 34.True or false: in <img>, height sets how tall it is. (a) False (b) True
  35. 35.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  36. 36.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
  37. 37.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows pages from the web
  38. 38.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  39. 39.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  40. 40.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. a web browser
  2. as one space
  3. <a href="about.html">
  4. 4
  5. False
  6. has a closing tag
  7. 2
  8. kite.png
  9. shows line numbers
  10. Yes
  11. </small>
  12. 5
  13. Cricket Club
  14. Rain today
  15. in the same tab
  16. <p>
  17. Rain today
  18. 5
  19. an opening tag
  20. <li>
  21. 200
  22. <title>
  23. </small>
  24. 1
  25. <h1>
  26. Yes
  27. Birthday cake
  28. Our school trip
  29. Our school bus
  30. True
  31. A happy dog
  32. in the body
  33. opens it in a new tab
  34. True
  35. <ul>
  36. a code editor
  37. shows pages from the web
  38. an attribute
  39. to describe the image
  40. an opening tag

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