← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 890 · 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.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  2. 2.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
  3. 3.True or false: <h1> is an empty tag. (a) False (b) True
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  5. 5.True or false: in <img>, width sets how tall it is. (a) True (b) False
  6. 6.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  7. 7.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  9. 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 3 (d) 10
  10. 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  11. 11.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  12. 12.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <h2>My pets
    line 3: <b>I love mangoes.</b>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) news.html (b) School news (c) href (d) Take the quiz
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.</i>
    line 2: <b>My pets
    line 3: <strong>The red kite</strong>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <strong>Rain today
    line 2: <em>Fun facts</em>
    line 3: <u>I love mangoes.</u>
    (a) line 1 (b) line 3 (c) line 2
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h4> (d) <h5>
  19. 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as 5 spaces (d) as a new line
  20. 20.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  21. 21.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  22. 22.True or false: a web browser opens web pages for us. (a) False (b) True
  23. 23.True or false: a code editor is where we type code. (a) True (b) False
  24. 24.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  25. 25.🔍 One closing tag is missing. Which one?
    <h2>My best friend</h2>
    <h3>Hello, world!</h3>
    <b>The red kite
    (a) </b> (b) </h3> (c) </em> (d) </h2>
  26. 26.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
  27. 27.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <h1>Cricket is fun.</h1>
    <p>Our school trip
    (a) </p> (b) </h1> (c) </em> (d) </i>
  28. 28.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
  29. 29.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>
  31. 31.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.💬 Does the browser show comments on the page? (a) Yes (b) No
  33. 33.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) kite.png (b) map.png (c) A tiger asleep (d) tiger.jpg
  34. 34.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) My pets (b) I love mangoes. (c) Rain today
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  36. 36.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
  37. 37.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
  38. 38.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Welcome! (d) Thanks for visiting.
  40. 40.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) answers page requests (d) stores a website’s files

Answer key

  1. <!DOCTYPE html>
  2. a web server
  3. False
  4. <h5>
  5. False
  6. <ol>
  7. a web server
  8. 2
  9. 1
  10. Yes
  11. an opening tag
  12. 4
  13. line 2
  14. School news
  15. line 2
  16. <img>
  17. line 1
  18. <h1>
  19. as one space
  20. alt
  21. </small>
  22. True
  23. True
  24. an opening tag
  25. </b>
  26. <ol>
  27. </p>
  28. alt
  29. in the head
  30. </h3>
  31. in the head
  32. No
  33. tiger.jpg
  34. My pets
  35. 1
  36. a web server
  37. 2
  38. a line across the page
  39. Welcome!
  40. turns HTML into a page

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