← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 562 · 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 heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h5>? (a) <h6> (b) <h1> (c) <h2> (d) <h5>
  2. 2.Which of these is true of a web server? (a) stores a website’s files (b) has an address bar (c) colours code to help us (d) shows line numbers
  3. 3.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) colours code to help us (d) shows pages from the web
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  5. 5.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
  6. 6.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.True or false: <ul> is an unordered list. (a) False (b) True
  8. 8.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) Hello, world! (c) I love mangoes.
  9. 9.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  10. 10.Which of these is an empty tag? (a) <ul> (b) <p> (c) <img> (d) <li>
  11. 11.True or false: a web server hosts websites online. (a) False (b) True
  12. 12.Which of these is a closing tag? (a) <b> (b) <title> (c) <h1> (d) </p>
  13. 13.True or false: a web browser shows line numbers. (a) True (b) False
  14. 14.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  17. 17.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) Take the quiz (c) about.html (d) contact.html
  18. 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  19. 19.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) maths.html (d) art.html
  20. 20.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <h1> (c) <title> (d) <style>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  22. 22.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <title>
  23. 23.🔍 One closing tag is missing. Which one?
    <h1>Fun facts
    <em>Hello, world!</em>
    <h2>I love mangoes.</h2>
    (a) </em> (b) </strong> (c) </h1> (d) </h2>
  24. 24.True or false: <table> goes in the head. (a) True (b) False
  25. 25.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
  26. 26.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) </html>
  27. 27.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  29. 29.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) art.html (b) news.html (c) Take the quiz (d) maths.html
  30. 30.Which of these is true of a web server? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) colours code to help us
  31. 31.True or false: a code editor is where we type code. (a) True (b) False
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Space Facts (c) Welcome! (d) index.html
  33. 33.True or false: <h1> is an empty tag. (a) True (b) False
  34. 34.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  36. 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="400">
  38. 38.🔗 Which address opens when you click this link?
    <a href="art.html">Maths fun</a>
    (a) news.html (b) quiz.html (c) Maths fun (d) art.html
  39. 39.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <pic> (d) <img>
  40. 40.True or false: <ul> lists things in any order. (a) False (b) True

Answer key

  1. <h1>
  2. stores a website’s files
  3. shows pages from the web
  4. 2
  5. src
  6. in the body
  7. True
  8. Good morning!
  9. opens it in a new tab
  10. <img>
  11. True
  12. </p>
  13. False
  14. <ol>
  15. 1
  16. 100
  17. about.html
  18. 1
  19. maths.html
  20. <h1>
  21. 200
  22. <title>
  23. </h1>
  24. False
  25. False
  26. </html>
  27. <ol>
  28. 3
  29. maths.html
  30. hosts websites online
  31. True
  32. Space Facts
  33. False
  34. a paragraph
  35. 2
  36. <h6>
  37. 400
  38. art.html
  39. <img>
  40. True

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