← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 697 · 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 list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  2. 2.📋 What number does the browser show next to “Grapes”?
    <ol start="6">
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  3. 3.Which of these is true of a web browser? (a) colours code to help us (b) opens web pages for us (c) sends pages over the net (d) stores a website’s files
  4. 4.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
  5. 5.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  6. 6.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  7. 7.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows line numbers (d) shows pages from the web
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) My Hobbies (c) My drawings (d) index.html
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h5>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
  10. 10.Which of these is a closing tag? (a) <b> (b) </li> (c) <title> (d) <h1>
  11. 11.True or false: in <img>, width sets how tall it is. (a) True (b) False
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue<br>Birds sing<br>Kites fly high</p>
  13. 13.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!
    <h3>Good morning!</h3>
    <em>Rain today</em>
    (a) </u> (b) </em> (c) </h1> (d) </h3>
  14. 14.True or false: <ol> shows bullet points. (a) False (b) True
  15. 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
  16. 16.True or false: in <img>, height shows if the image fails. (a) False (b) True
  17. 17.📋 What number does the browser show next to “Grapes”?
    <ol start="4">
      <li>Guava</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  18. 18.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) Play games (c) About us (d) contact.html
  19. 19.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  20. 20.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  21. 21.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
  22. 22.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  23. 23.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
  24. 24.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) Play games (c) about.html (d) games.html
  25. 25.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
  26. 26.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  27. 27.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="200">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  29. 29.True or false: a web browser opens web pages for us. (a) True (b) False
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Cricket is fun. (c) I love mangoes. (d) Rain today
  31. 31.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  32. 32.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  33. 33.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  34. 34.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) My best friend (d) Fun facts
  36. 36.Which of these is true of a code editor? (a) sends pages over the net (b) turns HTML into a page (c) shows pages from the web (d) shows line numbers
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) tiger.jpg (b) A red kite (c) A tiger asleep (d) width
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  39. 39.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) The red kite (b) Fun facts (c) Cricket is fun.

Answer key

  1. <li>
  2. 10
  3. opens web pages for us
  4. <h6>
  5. alt
  6. <li>
  7. shows line numbers
  8. My Hobbies
  9. <h6>
  10. </li>
  11. False
  12. 4
  13. </h1>
  14. False
  15. Yes
  16. False
  17. 8
  18. Play games
  19. Yes
  20. opens it in a new tab
  21. <h6>
  22. a web server
  23. </em>
  24. quiz.html
  25. 6
  26. <ul>
  27. alt
  28. Map of India
  29. True
  30. My pets
  31. 3
  32. <a>
  33. in a new tab
  34. bus.jpg
  35. Fun facts
  36. shows line numbers
  37. A tiger asleep
  38. 300
  39. <h6>
  40. Cricket is fun.

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