← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 722 · 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 of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </body>
  2. 2.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>My best friend</h2>
  3. 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Match report (b) body (c) Try this poha. (d) Space Facts
  5. 5.True or false: <li> goes inside ul or ol. (a) False (b) True
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.Which of these is an opening tag? (a) </li> (b) </body> (c) </p> (d) <h1>
  8. 8.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  9. 9.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  10. 10.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) opens web pages for us (d) is where we type code
  11. 11.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
  12. 12.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.📋 What number does the browser show next to “Orange”?
    <ol start="4">
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  15. 15.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  16. 16.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  17. 17.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  19. 19.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  20. 20.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) turns HTML into a page (d) sends pages over the net
  21. 21.True or false: <img> has a closing tag. (a) True (b) False
  22. 22.🔗 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
  23. 23.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Cricket Club (c) Try this poha. (d) All about me
  25. 25.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  26. 26.True or false: in <img>, width sets how wide it is. (a) True (b) False
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing</p>
  28. 28.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  29. 29.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Welcome! (b) Here is my best one. (c) index.html (d) Art Gallery
  30. 30.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h5>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  31. 31.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <ul> (d) <style>
  32. 32.🖼️ Which attribute of <img> tells which image to load? (a) width (b) src (c) alt (d) height
  33. 33.True or false: <li> is one item of a list. (a) True (b) False
  34. 34.🔢 In a basic web page file, which comes first: “<html>” or “<body>”? (a) <body> (b) <html>
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Planets (c) We won by 5 runs. (d) index.html
  36. 36.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Mouse (d) Modern
  37. 37.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) </body>
  38. 38.True or false: <input> has a closing tag. (a) False (b) True
  39. 39.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  40. 40.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) sends pages over the net (d) is where we type code

Answer key

  1. <p>
  2. 2
  3. as one space
  4. Match report
  5. True
  6. Yes
  7. <h1>
  8. <ol>
  9. href
  10. opens web pages for us
  11. src
  12. a closing tag
  13. 5
  14. A tiger asleep
  15. <ol>
  16. <ul>
  17. a paragraph
  18. <h1>
  19. <img>
  20. turns HTML into a page
  21. False
  22. contact.html
  23. <a href="about.html">
  24. All about me
  25. <h6>
  26. True
  27. 3
  28. a web browser
  29. Art Gallery
  30. <h6>
  31. <ul>
  32. src
  33. True
  34. <html>
  35. Class 7 Blog
  36. Markup
  37. </html>
  38. False
  39. starts a new line
  40. sends pages over the net

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