← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 393 · 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 part holds everything you see on the page? (a) the title (b) the body (c) the doctype (d) the head
  2. 2.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
  3. 3.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
  4. 4.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  5. 5.Which of these is true of a web server? (a) saves our .html files (b) hosts websites online (c) is where we type code (d) has an address bar
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.
    line 2: <em>Rain today</em>
    line 3: <strong>The red kite</strong>
    (a) line 1 (b) line 2 (c) line 3
  7. 7.True or false: HTML on its own cannot make a form. (a) True (b) False
  8. 8.Which of these is true of a web server? (a) has an address bar (b) sends pages over the net (c) shows line numbers (d) colours code to help us
  9. 9.True or false: <style> goes in the head. (a) True (b) False
  10. 10.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.Which of these is an opening tag? (a) </title> (b) </h1> (c) <li> (d) </b>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h2>Cricket is fun.</h2>
    line 2: <i>My best friend</i>
    line 3: <em>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
  14. 14.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Hello, world!</h2>
    <h2>Hello, world!</h2>
  15. 15.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  16. 16.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high</p>
  18. 18.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
  19. 19.True or false: in <img>, width tells which image to load. (a) True (b) False
  20. 20.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
  22. 22.Which of these is a closing tag? (a) <body> (b) <p> (c) </h1> (d) <li>
  23. 23.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <b>Our school trip
    line 2: <small>My pets</small>
    line 3: <strong>The red kite</strong>
    (a) line 2 (b) line 1 (c) line 3
  26. 26.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  27. 27.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  29. 29.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) href (c) Maths fun (d) Visit the site
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
  31. 31.💬 Does the browser show comments on the page? (a) Yes (b) No
  32. 32.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  33. 33.True or false: HTML on its own can make bullet lists. (a) True (b) False
  34. 34.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
  35. 35.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <p>My best friend</p>
  36. 36.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) href (c) Art corner (d) https://example.com
  37. 37.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) Take the quiz (c) href (d) Play games
  38. 38.Which of these is an opening tag? (a) <h1> (b) </title> (c) </p> (d) </li>
  39. 39.True or false: a code editor is where we type code. (a) True (b) False
  40. 40.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server

Answer key

  1. the body
  2. </small>
  3. 4
  4. in a new tab
  5. hosts websites online
  6. line 1
  7. False
  8. sends pages over the net
  9. True
  10. an opening tag
  11. <li>
  12. line 3
  13. 1
  14. 3
  15. <img>
  16. to describe the image
  17. 2
  18. src
  19. False
  20. <a href="about.html">
  21. 1
  22. </h1>
  23. a closing tag
  24. <!DOCTYPE html>
  25. line 1
  26. 3
  27. No
  28. numbers
  29. Visit the site
  30. 2
  31. No
  32. an attribute
  33. True
  34. -->
  35. 2
  36. Art corner
  37. Take the quiz
  38. <h1>
  39. True
  40. a web browser

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