← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 761 · 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 address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) games.html (b) news.html (c) quiz.html (d) Visit the site
  2. 2.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>The red kite</p>
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="300">
  4. 4.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  5. 5.Which of these is a closing tag? (a) <h1> (b) <body> (c) </li> (d) <b>
  6. 6.True or false: <p> is an empty tag. (a) True (b) False
  7. 7.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
  9. 9.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Hello, world!</h2>
    <h2>Good morning!</h2>
    <h4>Fun facts</h4>
  10. 10.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) shows pages from the web (d) colours code to help us
  11. 11.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Machine (c) Modern (d) Mouse
  12. 12.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  13. 13.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  14. 14.True or false: in <img>, width sets how wide it is. (a) False (b) True
  15. 15.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) shows line numbers (d) has an address bar
  16. 16.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <p>My pets
    line 3: <u>I love mangoes.</u>
    (a) line 2 (b) line 1 (c) line 3
  18. 18.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <h4>Good morning!</h4>
  19. 19.🔢 In a basic web page file, which comes LAST? (a) </head> (b) </html> (c) <head> (d) <!DOCTYPE html>
  20. 20.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  21. 21.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) turns HTML into a page (d) colours code to help us
  22. 22.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  23. 23.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
  24. 24.🔍 Which is the odd one out? (a) has an address bar (b) saves our .html files (c) opens web pages for us (d) shows pages from the web
  25. 25.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
  26. 26.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  27. 27.Which of these is an opening tag? (a) </b> (b) </p> (c) <body> (d) </title>
  28. 28.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Welcome! (c) index.html (d) Art Gallery
  31. 31.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  32. 32.Which of these goes in the head? (a) <a> (b) <table> (c) <ul> (d) <title>
  33. 33.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) School news (b) contact.html (c) about.html (d) https://example.com
  34. 34.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h4> or <h3>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
  35. 35.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    (a) Fun facts (b) My best friend (c) The red kite (d) Good morning!
  36. 36.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <u/> (d) <\u>
  37. 37.📝 What does <p> make? (a) a link (b) a paragraph (c) a table (d) a picture
  38. 38.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
  39. 39.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>

Answer key

  1. news.html
  2. 5
  3. 300
  4. False
  5. </li>
  6. False
  7. 1
  8. 150
  9. 4
  10. shows pages from the web
  11. Markup
  12. Yes
  13. <ul>
  14. True
  15. has an address bar
  16. 1
  17. line 2
  18. 3
  19. </html>
  20. Yes
  21. turns HTML into a page
  22. <ul>
  23. <h5>
  24. saves our .html files
  25. <!DOCTYPE html>
  26. a closing tag
  27. <body>
  28. in the body
  29. <ol>
  30. Art Gallery
  31. has a closing tag
  32. <title>
  33. about.html
  34. <h6>
  35. Fun facts
  36. </u>
  37. a paragraph
  38. a code editor
  39. </h1>
  40. <h1>

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