← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 632 · 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.True or false: in <img>, alt tells which image to load. (a) True (b) False
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  3. 3.True or false: <h1> goes in the head. (a) True (b) False
  4. 4.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) Rain today (b) I love mangoes. (c) My best friend (d) Fun facts
  5. 5.Which of these is true of a code editor? (a) turns HTML into a page (b) colours code to help us (c) opens web pages for us (d) hosts websites online
  6. 6.Which of these has a closing tag? (a) <br> (b) <h1> (c) <meta> (d) <img>
  7. 7.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  8. 8.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
  9. 9.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  10. 10.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  11. 11.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <h1> (d) <br>
  12. 12.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  13. 13.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  14. 14.True or false: in <img>, width names the picture file. (a) True (b) False
  15. 15.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) hides the link (d) makes it bold
  16. 16.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  17. 17.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <h3> (d) <\h3>
  18. 18.💬 Does the browser show comments on the page? (a) Yes (b) No
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  20. 20.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  21. 21.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
  22. 22.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  23. 23.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    (a) My pets (b) Hello, world! (c) I love mangoes.
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  25. 25.📄 Can HTML on its own make headings? (a) Yes (b) No
  26. 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  27. 27.True or false: HTML on its own can make tables. (a) False (b) True
  28. 28.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h1> (d) <h6>
  29. 29.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <a>
  30. 30.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.Which of these is an opening tag? (a) </h1> (b) </li> (c) </p> (d) <li>
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!</h1>
    line 2: <em>Rain today</em>
    line 3: <h3>The red kite
    (a) line 2 (b) line 1 (c) line 3
  33. 33.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  34. 34.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  35. 35.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) bus.jpg (b) moon.png (c) A happy dog (d) dog.jpg
  37. 37.Which of these is an opening tag? (a) </body> (b) </h1> (c) <p> (d) </p>
  38. 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.True or false: <input> has a closing tag. (a) True (b) False
  40. 40.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser

Answer key

  1. False
  2. Yes
  3. False
  4. Rain today
  5. colours code to help us
  6. <h1>
  7. <ul>
  8. 2
  9. Yes
  10. <img>
  11. <h1>
  12. in a new tab
  13. Yes
  14. False
  15. opens it in a new tab
  16. <!DOCTYPE html>
  17. </h3>
  18. No
  19. A tiger asleep
  20. a web browser
  21. <h1>
  22. <a href="about.html">
  23. I love mangoes.
  24. <h1>
  25. Yes
  26. No
  27. True
  28. <h6>
  29. <a>
  30. a closing tag
  31. <li>
  32. line 3
  33. href
  34. 6
  35. in the head
  36. dog.jpg
  37. <p>
  38. an opening tag
  39. False
  40. a web browser

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