← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 215 · 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.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
  2. 2.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) is where we type code (d) turns HTML into a page
  3. 3.True or false: <img> goes in the head. (a) True (b) False
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    (a) Rain today (b) I love mangoes. (c) Good morning!
  5. 5.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Rivers flow<br>Sky is blue<br>Kites fly high</p>
  8. 8.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
  9. 9.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h2> or <h1>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
  10. 10.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  11. 11.Which of these is true of a code editor? (a) opens web pages for us (b) turns HTML into a page (c) is where we type code (d) answers page requests
  12. 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  13. 13.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  14. 14.Which of these is true of a web server? (a) shows line numbers (b) turns HTML into a page (c) has an address bar (d) sends pages over the net
  15. 15.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  16. 16.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.</h3>
    line 2: <p>Our school trip</p>
    line 3: <small>Fun facts
    (a) line 1 (b) line 3 (c) line 2
  18. 18.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  19. 19.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  20. 20.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) Cricket Club (d) Here is my best one.
  23. 23.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
  24. 24.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) The full moon (c) A happy dog (d) dog.jpg
  25. 25.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>The red kite</h2>
    <h2>Rain today</h2>
    <p>Rain today</p>
    <p>Good morning!</p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) about.html (b) Play games (c) games.html (d) quiz.html
  28. 28.🔍 One closing tag is missing. Which one?
    <u>Our school trip</u>
    <small>Rain today</small>
    <h2>Fun facts
    (a) </h2> (b) </small> (c) </i> (d) </u>
  29. 29.True or false: in <img>, alt describes the picture. (a) True (b) False
  30. 30.🔠 Are headings shown in bold by default? (a) Yes (b) No
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="200">
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  33. 33.🔗 Where does this link open?
    <a href="news.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  34. 34.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) The red kite (c) Fun facts (d) Good morning!
  35. 35.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  36. 36.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My best friend</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <h2>My pets</h2>
  37. 37.🔗 Where does this link open?
    <a href="about.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  38. 38.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) Take the quiz (c) art.html (d) news.html
  39. 39.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  40. 40.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My best friend (b) Good morning! (c) I love mangoes. (d) Hello, world!

Answer key

  1. 2
  2. turns HTML into a page
  3. False
  4. Rain today
  5. <li>
  6. 5
  7. 5
  8. <h5>
  9. <h1>
  10. the body
  11. is where we type code
  12. Yes
  13. True
  14. sends pages over the net
  15. </h2>
  16. </u>
  17. line 3
  18. to leave notes
  19. 400
  20. an empty tag
  21. src
  22. Cricket Club
  23. <html>
  24. A happy dog
  25. an opening tag
  26. 3
  27. quiz.html
  28. </h2>
  29. True
  30. Yes
  31. 200
  32. <ol>
  33. in the same tab
  34. My pets
  35. <h6>
  36. 2
  37. in a new tab
  38. maths.html
  39. a web browser
  40. I love mangoes.

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