← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 991 · 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 of these is true of a code editor? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) stores a website’s files
  2. 2.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
  3. 3.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  4. 4.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  5. 5.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  6. 6.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) news.html (b) href (c) About us (d) Play games
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Sky is blue</p>
  8. 8.True or false: HTML on its own can make headings. (a) True (b) False
  9. 9.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  10. 10.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </html> (c) </body> (d) <!DOCTYPE html>
  11. 11.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  12. 12.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  13. 13.💾 A web page file usually ends with which extension? (a) .txt (b) .mp3 (c) .html (d) .png
  14. 14.True or false: in <img>, width sets how tall it is. (a) False (b) True
  15. 15.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  16. 16.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <i>Hello, world!
    <u>Fun facts</u>
    (a) </h1> (b) </h2> (c) </u> (d) </i>
  17. 17.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
  18. 18.🔗 Where does this link open?
    <a href="art.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  19. 19.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  20. 20.True or false: HTML on its own can make bullet lists. (a) True (b) False
  21. 21.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) games.html (b) href (c) Take the quiz (d) School news
  22. 22.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
  23. 23.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!</h1>
    line 2: <small>My best friend</small>
    line 3: <b>The red kite
    (a) line 1 (b) line 3 (c) line 2
  25. 25.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  27. 27.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) href (b) Art corner (c) art.html (d) School news
  28. 28.True or false: <h1> has a closing tag. (a) False (b) True
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) My Hobbies (c) Easy snacks (d) I like to read.
  30. 30.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
  31. 31.Which of these has a closing tag? (a) <img> (b) <hr> (c) <br> (d) <ul>
  32. 32.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h5>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  34. 34.🏷️ Which is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
  35. 35.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
  36. 36.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a dollar $ (d) a hash #
  37. 37.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) opens web pages for us (d) saves our .html files
  38. 38.🏷️ Which is the closing tag for <p>? (a) <p/> (b) </p> (c) <\p> (d) <p>
  39. 39.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h2>
  40. 40.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. shows line numbers
  2. 5
  3. a web browser
  4. starts a new line
  5. Yes
  6. Play games
  7. 3
  8. True
  9. <!DOCTYPE html>
  10. <!DOCTYPE html>
  11. the body
  12. in the same tab
  13. .html
  14. False
  15. True
  16. </i>
  17. 4
  18. in the same tab
  19. <ul>
  20. True
  21. School news
  22. 3
  23. 7
  24. line 3
  25. a closing tag
  26. 4
  27. Art corner
  28. True
  29. Easy snacks
  30. 2
  31. <ul>
  32. <h6>
  33. <h5>
  34. </i>
  35. <h6>
  36. a slash /
  37. opens web pages for us
  38. </p>
  39. <h6>
  40. an opening tag

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