← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 577 · 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 tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  2. 2.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
  3. 3.🔍 Which is the odd one out? (a) opens web pages for us (b) answers page requests (c) shows pages from the web (d) has an address bar
  4. 4.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Our school trip (b) Fun facts (c) Cricket is fun.
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <p>Our school trip</p>
    line 2: <i>My best friend
    line 3: <small>Fun facts</small>
    (a) line 1 (b) line 2 (c) line 3
  6. 6.🔍 One closing tag is missing. Which one?
    <h2>Our school trip
    <em>The red kite</em>
    <b>Cricket is fun.</b>
    (a) </b> (b) </h2> (c) </em> (d) </i>
  7. 7.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) height (d) src
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  9. 9.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) contact.html (c) Play games (d) About us
  10. 10.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) Visit the site (b) games.html (c) Contact us (d) href
  11. 11.True or false: in <img>, src shows if the image fails. (a) True (b) False
  12. 12.Which of these is an empty tag? (a) <b> (b) <h1> (c) <p> (d) <hr>
  13. 13.True or false: in <img>, width sets how wide it is. (a) False (b) True
  14. 14.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  15. 15.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) turns HTML into a page
  16. 16.True or false: <li> is an empty tag. (a) False (b) True
  17. 17.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
  18. 18.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.</h3>
    line 2: <h1>Hello, world!
    line 3: <h2>My best friend</h2>
    (a) line 2 (b) line 3 (c) line 1
  20. 20.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) maths.html (b) href (c) Art corner (d) School news
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  22. 22.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  23. 23.True or false: in <img>, height tells which image to load. (a) False (b) True
  24. 24.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Fun facts</h2>
    <p>The red kite</p>
  25. 25.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <p>Hello, world!</p>
    <em>The red kite</em>
    (a) </em> (b) </small> (c) </p> (d) </h2>
  26. 26.True or false: <ol> goes inside ul or ol. (a) True (b) False
  27. 27.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  28. 28.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  29. 29.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) width (d) src
  30. 30.Which of these is true of a web server? (a) is where we type code (b) sends pages over the net (c) opens web pages for us (d) has an address bar
  31. 31.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  32. 32.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  33. 33.🏷️ Which is the closing tag for <h1>? (a) <\h1> (b) <h1/> (c) <h1> (d) </h1>
  34. 34.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) All about me (b) Try this poha. (c) body (d) Class 7 Blog
  35. 35.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  36. 36.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h4>? (a) <h4> (b) <h2> (c) <h5> (d) <h6>
  37. 37.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) about.html (b) contact.html (c) About us (d) games.html
  38. 38.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Match report (b) body (c) Here is my best one. (d) Cricket Club
  39. 39.True or false: a code editor shows pages from the web. (a) False (b) True
  40. 40.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <p> (d) <input>

Answer key

  1. <a>
  2. a line across the page
  3. answers page requests
  4. Cricket is fun.
  5. line 2
  6. </h2>
  7. height
  8. 1
  9. Play games
  10. Contact us
  11. False
  12. <hr>
  13. True
  14. in the same tab
  15. turns HTML into a page
  16. False
  17. 1
  18. No
  19. line 2
  20. Art corner
  21. 1
  22. <ul>
  23. False
  24. 2
  25. </small>
  26. False
  27. <ul>
  28. No
  29. alt
  30. sends pages over the net
  31. href
  32. a web browser
  33. </h1>
  34. All about me
  35. an opening tag
  36. <h2>
  37. games.html
  38. Match report
  39. False
  40. <p>

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