← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 417 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h2> → <h2>
    (a) No (b) Yes
  2. 2.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  3. 3.Which of these does JavaScript do? (a) rounds box corners (b) shows a pop-up message (c) gives the page structure (d) sets colours and fonts
  4. 4.🔁 How many times does this code print “Hello”?
    for (let i = 3; i <= 12; i++) {
      console.log("Hello");
    }
  5. 5.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) space-between (c) flex-end (d) center
  6. 6.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <main> (b) <nav> (c) <header> (d) <footer>
  7. 7.True or false: a web server turns HTML into a page. (a) True (b) False
  8. 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  9. 9.🌗 Is pink on red easy or hard to read? (a) easy to read (b) hard to read
  10. 10.✍️ Which sign goes between a property and its value? (a) : (b) - (c) = (d) ;
  11. 11.✍️ What is the selector in this CSS rule?
    .box {
      border: 2px solid;
      text-align: center;
      background-color: yellow;
      font-style: italic;
    }
    (a) .box (b) center (c) h2 (d) border
  12. 12.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  13. 13.🎯 What kind of selector is .menu? (a) an element selector (b) a class selector (c) an id selector
  14. 14.✍️ What is the selector in this CSS rule?
    h1 {
      margin: 10px;
      font-weight: bold;
    }
    (a) p (b) bold (c) margin (d) h1
  15. 15.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) add CSS styles (b) publish it online (c) write the HTML (d) test in a browser
  16. 16.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  17. 17.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h4> (c) <h1> (d) <h2>
  18. 18.True or false: <article> holds a news story. (a) False (b) True
  19. 19.⚡ Which JavaScript word runs code when true? (a) console.log() (b) for (c) if (d) let
  20. 20.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 320px;
      justify-content: center;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  21. 21.🌈 In #c00000 the red part is the hex number c0. What is it as a normal number?
  22. 22.🔍 One closing tag is missing. Which one?
    <p>My best friend
    <em>Good morning!</em>
    <i>Cricket is fun.</i>
    (a) </em> (b) </i> (c) </strong> (d) </p>
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  24. 24.✍️ In color: blue; which part is the property? (a) : (b) ; (c) blue (d) color
  25. 25.🧩 Which language reacts to a button click? (a) JavaScript (b) CSS (c) HTML
  26. 26.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
  27. 27.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) src (d) alt
  28. 28.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.True or false: a code editor turns HTML into a page. (a) True (b) False
  30. 30.🎯 Which CSS selector matches this element?
    <h1 class="red" id="hero">Hello</h1>
    (a) .box (b) #red (c) h1 (d) h2
  31. 31.Which of these is an empty tag? (a) <h1> (b) <br> (c) <li> (d) <p>
  32. 32.🛡️ Online: is it safe to post your home address? (a) not safe (b) safe
  33. 33.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) sends pages over the net (d) shows pages from the web
  34. 34.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  35. 35.True or false: <input type="submit"> sends the form. (a) False (b) True
  36. 36.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    #intro { color: white; }
    #intro { color: black; }
    (a) black (b) white (c) yellow (d) blue
  37. 37.Which of these is an opening tag? (a) </body> (b) <li> (c) </li> (d) </p>
  38. 38.True or false: <input type="email"> lets you pick only one. (a) True (b) False
  39. 39.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  40. 40.🔍 Which is the odd one out? (a) adds space around boxes (b) reacts to a button click (c) changes the text size (d) sets colours and fonts

Answer key

  1. No
  2. 3
  3. shows a pop-up message
  4. 10
  5. space-between
  6. <header>
  7. False
  8. Yes
  9. hard to read
  10. :
  11. .box
  12. 3
  13. a class selector
  14. h1
  15. write the HTML
  16. <li>
  17. <h1>
  18. True
  19. if
  20. 60
  21. 192
  22. </p>
  23. 300
  24. color
  25. JavaScript
  26. an id selector
  27. src
  28. in the body
  29. False
  30. h1
  31. <br>
  32. not safe
  33. shows pages from the web
  34. <h3>
  35. True
  36. black
  37. <li>
  38. False
  39. href
  40. reacts to a button click

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