← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 355 · 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.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  2. 2.Which of these goes in the head? (a) <table> (b) <title> (c) <ul> (d) <a>
  3. 3.True or false: HTML on its own can make headings. (a) True (b) False
  4. 4.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  5. 5.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  6. 6.Which of these is true of a code editor? (a) colours code to help us (b) opens web pages for us (c) has an address bar (d) answers page requests
  7. 7.True or false: <ul> lists things in any order. (a) True (b) False
  8. 8.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
  9. 9.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  10. 10.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <li> (d) <ol>
  11. 11.True or false: in <img>, src describes the picture. (a) True (b) False
  12. 12.Which of these is an opening tag? (a) </body> (b) </p> (c) <b> (d) </b>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  14. 14.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
  15. 15.True or false: <a> goes in the body. (a) True (b) False
  16. 16.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  18. 18.Which of these is true of a web browser? (a) hosts websites online (b) saves our .html files (c) colours code to help us (d) has an address bar
  19. 19.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  20. 20.True or false: <table> goes in the head. (a) True (b) False
  21. 21.True or false: <style> goes in the head. (a) True (b) False
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red<br>Birds sing<br>Rivers flow</p>
  23. 23.Which of these goes in the head? (a) <a> (b) <h1> (c) <p> (d) <link rel="stylesheet">
  24. 24.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <h2>I love mangoes.</h2>
    <p>My best friend</p>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Birds sing<br>Stars shine</p>
  26. 26.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) index.html (c) I like to read. (d) My Hobbies
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts</h2>
    line 2: <u>Our school trip</u>
    line 3: <em>My best friend
    (a) line 1 (b) line 2 (c) line 3
  29. 29.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Machine (d) Markup
  30. 30.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  32. 32.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <h1>Cricket is fun.</h1>
    <h3>Our school trip</h3>
    (a) </small> (b) </h1> (c) </h3> (d) </h2>
  33. 33.Which of these is true of a web browser? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) sends pages over the net
  34. 34.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  35. 35.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Rain today</p>
  36. 36.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  37. 37.True or false: <b> is an empty tag. (a) True (b) False
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  39. 39.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  40. 40.Which of these is true of a code editor? (a) hosts websites online (b) has an address bar (c) stores a website’s files (d) shows line numbers

Answer key

  1. 100
  2. <title>
  3. True
  4. 3
  5. <
  6. colours code to help us
  7. True
  8. a paragraph
  9. Yes
  10. <li>
  11. False
  12. <b>
  13. An old fort
  14. to describe the image
  15. True
  16. a web server
  17. A happy dog
  18. has an address bar
  19. <a>
  20. False
  21. True
  22. 5
  23. <link rel="stylesheet">
  24. 3
  25. 4
  26. cake.jpg
  27. My Hobbies
  28. line 3
  29. Markup
  30. opens it in a new tab
  31. 2
  32. </small>
  33. turns HTML into a page
  34. an opening tag
  35. 3
  36. 6
  37. False
  38. 100
  39. <ul>
  40. shows line numbers

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