← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 581 · 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.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
  3. 3.Which of these is an empty tag? (a) <input> (b) <b> (c) <h1> (d) <ul>
  4. 4.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
  5. 5.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <body>
  6. 6.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <p>The red kite</p>
    line 3: <h1>My best friend
    (a) line 1 (b) line 2 (c) line 3
  9. 9.True or false: <b> is an empty tag. (a) True (b) False
  10. 10.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  11. 11.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  12. 12.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  13. 13.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
  14. 14.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) </small> (d) <small>
  15. 15.True or false: HTML on its own cannot make a form. (a) True (b) False
  16. 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  17. 17.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  18. 18.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  19. 19.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) Hot Tags (c) High Tech (d) HyperText
  20. 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  21. 21.📄 Can HTML on its own make headings? (a) Yes (b) No
  22. 22.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h4> or <h3>? (a) <h6> (b) <h2> (c) <h4> (d) <h3>
  23. 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  24. 24.Which of these is an empty tag? (a) <p> (b) <br> (c) <ul> (d) <li>
  25. 25.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  26. 26.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  27. 27.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) Play games (c) contact.html (d) About us
  28. 28.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a microphone (d) a printer
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!
    line 2: <small>The red kite</small>
    line 3: <em>I love mangoes.</em>
    (a) line 2 (b) line 3 (c) line 1
  30. 30.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  31. 31.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  32. 32.📄 Can HTML on its own make a form? (a) No (b) Yes
  33. 33.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Good morning!</p>
    <h2>My pets</h2>
  34. 34.True or false: <hr> is an empty tag. (a) False (b) True
  35. 35.Which of these is an opening tag? (a) </h1> (b) </title> (c) </p> (d) <h1>
  36. 36.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  37. 37.True or false: HTML on its own cannot make headings. (a) True (b) False
  38. 38.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) opens web pages for us (d) shows line numbers
  39. 39.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Fun facts (c) The red kite (d) Rain today

Answer key

  1. to describe the image
  2. 1
  3. <input>
  4. href
  5. <!DOCTYPE html>
  6. in the head
  7. alt
  8. line 3
  9. False
  10. No
  11. <a href="about.html">
  12. <ul>
  13. 2
  14. </small>
  15. False
  16. an attribute
  17. <!--
  18. numbers
  19. HyperText
  20. opens it in a new tab
  21. Yes
  22. <h2>
  23. <!DOCTYPE html>
  24. <br>
  25. Yes
  26. <h1>
  27. Play games
  28. a plain text editor
  29. line 1
  30. 3
  31. <h5>
  32. Yes
  33. 2
  34. True
  35. <h1>
  36. 6
  37. False
  38. stores a website’s files
  39. in the same tab
  40. Cricket is fun.

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