← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 42 · 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 is the closing tag for <em>? (a) </em> (b) <em> (c) <\em> (d) <em/>
  2. 2.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>My best friend</h4>
    <p>Fun facts</p>
    <h3>I love mangoes.</h3>
  4. 4.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  5. 5.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  6. 6.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) stores a website’s files (d) shows line numbers
  7. 7.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  8. 8.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
  9. 9.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) <h1> (d) </h1>
  10. 10.True or false: in <img>, width describes the picture. (a) False (b) True
  11. 11.🔍 One closing tag is missing. Which one?
    <small>My best friend</small>
    <em>The red kite</em>
    <h1>Rain today
    (a) </b> (b) </small> (c) </h1> (d) </em>
  12. 12.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  13. 13.🔍 One closing tag is missing. Which one?
    <h1>Cricket is fun.
    <i>I love mangoes.</i>
    <em>Fun facts</em>
    (a) </h2> (b) </i> (c) </h1> (d) </em>
  14. 14.Which of these is a closing tag? (a) <p> (b) </title> (c) <body> (d) <h1>
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <b>Fun facts
    line 3: <small>Rain today</small>
    (a) line 2 (b) line 3 (c) line 1
  16. 16.True or false: a web server answers page requests. (a) False (b) True
  17. 17.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) about.html (b) quiz.html (c) games.html (d) Visit the site
  18. 18.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  19. 19.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <p>My best friend</p>
    <h2>My pets</h2>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
  20. 20.True or false: <li> has a closing tag. (a) True (b) False
  21. 21.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  22. 22.Which of these is a closing tag? (a) <h1> (b) </body> (c) <b> (d) <li>
  23. 23.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h6> (d) <h3>
  24. 24.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) stores a website’s files (d) colours code to help us
  25. 25.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.Which of these is true of a code editor? (a) turns HTML into a page (b) answers page requests (c) opens web pages for us (d) shows line numbers
  27. 27.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  28. 28.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) Our school trip (b) My pets (c) The red kite
  29. 29.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
  30. 30.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
    <p>My best friend</p>
    <p>Hello, world!</p>
  31. 31.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  32. 32.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) </i> (d) <i>
  33. 33.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) href (b) Contact us (c) About us (d) https://example.com
  34. 34.🔍 One closing tag is missing. Which one?
    <em>I love mangoes.</em>
    <strong>The red kite
    <i>My pets</i>
    (a) </b> (b) </strong> (c) </i> (d) </em>
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Roses are red</p>
  36. 36.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  37. 37.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) maths.html (b) Contact us (c) href (d) Visit the site
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h6> or <h3>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  39. 39.🔍 One closing tag is missing. Which one?
    <h3>Hello, world!</h3>
    <p>My pets
    <i>My best friend</i>
    (a) </p> (b) </i> (c) </h2> (d) </h3>
  40. 40.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">

Answer key

  1. </em>
  2. in a new tab
  3. 3
  4. False
  5. <a>
  6. shows line numbers
  7. on the browser tab
  8. an attribute
  9. </h1>
  10. False
  11. </h1>
  12. True
  13. </h1>
  14. </title>
  15. line 2
  16. True
  17. quiz.html
  18. <ol>
  19. 2
  20. True
  21. starts a new line
  22. </body>
  23. <h6>
  24. stores a website’s files
  25. a closing tag
  26. shows line numbers
  27. <!DOCTYPE html>
  28. Our school trip
  29. 3
  30. 3
  31. 4
  32. </i>
  33. About us
  34. </strong>
  35. 3
  36. a web browser
  37. Contact us
  38. <h6>
  39. </p>
  40. <a href="about.html">

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