← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 265 · 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.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <strong>The red kite</strong>
    <h3>Hello, world!
    (a) </em> (b) </strong> (c) </h3> (d) </i>
  2. 2.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
  3. 3.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>My best friend</h2>
    <h2>Hello, world!</h2>
  4. 4.🔍 Which is the odd one out? (a) opens web pages for us (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
  5. 5.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) <body> (d) </body>
  6. 6.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Art Gallery (b) Easy snacks (c) Try this poha. (d) body
  8. 8.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  9. 9.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  10. 10.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    (a) My pets (b) Our school trip (c) Good morning! (d) I love mangoes.
  12. 12.🖼️ Which attribute of <img> names the picture file? (a) width (b) alt (c) src (d) height
  13. 13.Which of these is true of a code editor? (a) hosts websites online (b) sends pages over the net (c) stores a website’s files (d) is where we type code
  14. 14.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  15. 15.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) turns HTML into a page (d) has an address bar
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) bus.jpg (c) width (d) An old fort
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Sky is blue<br>Kites fly high</p>
  18. 18.📋 What number does the browser show next to “Mango”?
    <ol start="7">
      <li>Banana</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  19. 19.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    (a) Good morning! (b) Fun facts (c) My best friend
  20. 20.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  21. 21.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  22. 22.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
  23. 23.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <h4>I love mangoes.</h4>
    <p>Cricket is fun.</p>
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.True or false: <li> shows bullet points. (a) True (b) False
  26. 26.🔍 One closing tag is missing. Which one?
    <strong>Good morning!
    <i>Our school trip</i>
    <h2>My best friend</h2>
    (a) </i> (b) </u> (c) </strong> (d) </h2>
  27. 27.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
  28. 28.True or false: HTML on its own cannot add up two numbers. (a) True (b) False
  29. 29.💾 A web page file usually ends with which extension? (a) .png (b) .mp3 (c) .html (d) .txt
  30. 30.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
  31. 31.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  32. 32.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  33. 33.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  34. 34.True or false: a web browser has an address bar. (a) False (b) True
  35. 35.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  37. 37.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  38. 38.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  39. 39.📄 Can HTML on its own make a form? (a) Yes (b) No
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite</h1>
    line 2: <h2>My pets
    line 3: <em>Hello, world!</em>
    (a) line 2 (b) line 3 (c) line 1

Answer key

  1. </h3>
  2. a web server
  3. 3
  4. opens web pages for us
  5. </html>
  6. in the body
  7. Easy snacks
  8. on the browser tab
  9. <a>
  10. numbers
  11. Our school trip
  12. src
  13. is where we type code
  14. <li>
  15. sends pages over the net
  16. Our school bus
  17. 4
  18. 9
  19. Good morning!
  20. <ol>
  21. Yes
  22. 2
  23. 2
  24. bullets
  25. False
  26. </strong>
  27. 1
  28. True
  29. .html
  30. 50
  31. has a closing tag
  32. 6
  33. an attribute
  34. True
  35. in the head
  36. <!DOCTYPE html>
  37. <ul>
  38. in a new tab
  39. Yes
  40. line 2

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