← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 895 · 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: <h5>, <h1>, <h6> or <h2>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  4. 4.True or false: a web browser opens web pages for us. (a) True (b) False
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) Match report (c) I like to read. (d) index.html
  6. 6.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <h2>Fun facts</h2>
    <h2>The red kite</h2>
    <p>Cricket is fun.</p>
  7. 7.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  8. 8.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  9. 9.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  10. 10.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) </head>
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  12. 12.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
  13. 13.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 3 (d) 1
  14. 14.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  16. 16.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  17. 17.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Fun facts (c) Hello, world! (d) My best friend
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Hello, world! (c) My pets
  19. 19.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) has an address bar
  20. 20.Which of these is an empty tag? (a) <input> (b) <ul> (c) <title> (d) <b>
  21. 21.True or false: <ul> goes in the head. (a) True (b) False
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.
    line 2: <u>I love mangoes.</u>
    line 3: <b>Our school trip</b>
    (a) line 2 (b) line 1 (c) line 3
  23. 23.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  25. 25.True or false: <input> has a closing tag. (a) True (b) False
  26. 26.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  27. 27.True or false: <a> goes in the head. (a) True (b) False
  28. 28.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  29. 29.Which of these is a closing tag? (a) <p> (b) </h1> (c) <body> (d) <title>
  30. 30.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Our school trip</h4>
    <p>The red kite</p>
    <p>My best friend</p>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <u>My pets</u>
    line 3: <i>Rain today</i>
    (a) line 3 (b) line 1 (c) line 2
  33. 33.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
  34. 34.🔍 Which is the odd one out? (a) is where we type code (b) turns HTML into a page (c) colours code to help us (d) saves our .html files
  35. 35.📋 What number does the browser show next to “Orange”?
    <ol start="6">
      <li>Banana</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  36. 36.Which of these is an opening tag? (a) </body> (b) <li> (c) </p> (d) </b>
  37. 37.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  38. 38.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  39. 39.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.True or false: in <img>, src describes the picture. (a) True (b) False

Answer key

  1. <h1>
  2. 400
  3. 250
  4. True
  5. Art Gallery
  6. 3
  7. a code editor
  8. an opening tag
  9. in the same tab
  10. </html>
  11. 200
  12. <
  13. 1
  14. <ul>
  15. a slash /
  16. 4
  17. Fun facts
  18. My pets
  19. stores a website’s files
  20. <input>
  21. False
  22. line 1
  23. href
  24. 100
  25. False
  26. Yes
  27. False
  28. <ul>
  29. </h1>
  30. in the head
  31. 2
  32. line 1
  33. <h1>
  34. turns HTML into a page
  35. 8
  36. <li>
  37. No
  38. 6
  39. in the head
  40. False

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