← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 460 · 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.True or false: <ul> is an unordered list. (a) False (b) True
  2. 2.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  3. 3.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h1> (d) <h5>
  5. 5.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
  6. 6.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h2>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
  7. 7.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    (a) My best friend (b) Our school trip (c) Hello, world!
  8. 8.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  9. 9.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
  10. 10.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  11. 11.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  13. 13.📋 What number does the browser show next to “Papaya”?
    <ol start="7">
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  14. 14.Which of these is an opening tag? (a) </p> (b) </b> (c) </li> (d) <p>
  15. 15.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  16. 16.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
  17. 17.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h6> or <h1>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  18. 18.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  19. 19.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  20. 20.Which of these is true of a web browser? (a) shows line numbers (b) opens web pages for us (c) hosts websites online (d) stores a website’s files
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Class 7 Blog (d) Welcome!
  22. 22.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  23. 23.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) has an address bar
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
  25. 25.🔍 One closing tag is missing. Which one?
    <p>Rain today
    <h2>The red kite</h2>
    <em>I love mangoes.</em>
    (a) </h2> (b) </h3> (c) </p> (d) </em>
  26. 26.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <small>Rain today
    <h2>Cricket is fun.</h2>
    (a) </h2> (b) </u> (c) </h1> (d) </small>
  27. 27.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Rain today (c) My pets (d) Our school trip
  28. 28.True or false: HTML on its own cannot make headings. (a) True (b) False
  29. 29.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  30. 30.📄 Can HTML on its own make a form? (a) Yes (b) No
  31. 31.📝 What does <p> make? (a) a picture (b) a link (c) a paragraph (d) a table
  32. 32.🖼️ Which attribute of <img> describes the picture? (a) src (b) alt (c) height (d) width
  33. 33.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
  34. 34.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  35. 35.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  36. 36.True or false: a web browser shows pages from the web. (a) True (b) False
  37. 37.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
  38. 38.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Planets (d) Art Gallery
  40. 40.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
    <h2>Good morning!</h2>
    <h2>Fun facts</h2>
    <h2>The red kite</h2>

Answer key

  1. True
  2. 4
  3. in the head
  4. <h1>
  5. 3
  6. <h1>
  7. Hello, world!
  8. Yes
  9. 3
  10. in the head
  11. an opening tag
  12. 2
  13. 9
  14. <p>
  15. opens it in a new tab
  16. alt
  17. <h6>
  18. <!DOCTYPE html>
  19. 3
  20. opens web pages for us
  21. Class 7 Blog
  22. a closing tag
  23. has an address bar
  24. 2
  25. </p>
  26. </small>
  27. Fun facts
  28. False
  29. <ol>
  30. Yes
  31. a paragraph
  32. alt
  33. <
  34. src
  35. src
  36. True
  37. 6
  38. <a href="about.html">
  39. Art Gallery
  40. 1

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