← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 724 · 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 attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  2. 2.True or false: <br> is an empty tag. (a) False (b) True
  3. 3.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  4. 4.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  5. 5.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) My pets (c) Good morning!
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  7. 7.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <i>Good morning!</i>
    <b>My pets
    (a) </i> (b) </h2> (c) </small> (d) </b>
  8. 8.True or false: in <img>, height sets how tall it is. (a) False (b) True
  9. 9.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) about.html (b) Take the quiz (c) games.html (d) contact.html
  10. 10.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) Play games (b) href (c) Take the quiz (d) news.html
  11. 11.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
  12. 12.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
  13. 13.True or false: <ul> lists steps in order. (a) True (b) False
  14. 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  15. 15.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) Play games (c) maths.html (d) https://example.com
  17. 17.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  18. 18.🔍 Which is the odd one out? (a) is where we type code (b) stores a website’s files (c) saves our .html files (d) colours code to help us
  19. 19.True or false: <b> is an empty tag. (a) False (b) True
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    (a) I love mangoes. (b) My best friend (c) Rain today (d) Hello, world!
  21. 21.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  22. 22.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
  23. 23.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  24. 24.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  25. 25.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  26. 26.Which of these is true of a web browser? (a) answers page requests (b) shows pages from the web (c) saves our .html files (d) shows line numbers
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Planets (b) Try this poha. (c) My Hobbies (d) body
  28. 28.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  29. 29.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  30. 30.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <p> (d) <link>
  31. 31.Which of these is a closing tag? (a) <p> (b) <li> (c) <b> (d) </b>
  32. 32.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  33. 33.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  34. 34.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
  35. 35.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  36. 36.True or false: a web browser saves our .html files. (a) False (b) True
  37. 37.🔗 Where does this link open?
    <a href="contact.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  38. 38.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  40. 40.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) </html> (b) <body>

Answer key

  1. alt
  2. True
  3. 4
  4. False
  5. Rain today
  6. Yes
  7. </b>
  8. True
  9. games.html
  10. Take the quiz
  11. starts a new line
  12. a line across the page
  13. False
  14. True
  15. <h6>
  16. contact.html
  17. as one space
  18. stores a website’s files
  19. False
  20. Rain today
  21. <ul>
  22. </h2>
  23. a web browser
  24. <ol>
  25. <a href="about.html">
  26. shows pages from the web
  27. Planets
  28. an opening tag
  29. 4
  30. <a>
  31. </b>
  32. <h6>
  33. in the body
  34. 1
  35. an empty tag
  36. False
  37. in the same tab
  38. a web server
  39. <h1>
  40. <body>

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