← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 905 · 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.⚖️ What colour is the text of this element?
    <p class="box" id="hero">Hi</p>
    CSS:
    p { color: black; }
    #hero { color: red; }
    .box { color: orange; }
    (a) yellow (b) black (c) red (d) orange
  2. 2.True or false: <input type="email"> lets you pick only one. (a) False (b) True
  3. 3.True or false: HTML reacts to a button click. (a) True (b) False
  4. 4.⚡ What does JavaScript add to a web page? (a) the page title (b) the domain name (c) actions and changes (d) only colours
  5. 5.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Grapes</td><td>Orange</td><td>Papaya</td><td>Litchi</td></tr>
      <tr><td>Guava</td><td>Banana</td><td>Mango</td><td>Jamun</td></tr>
      <tr><td>Jamun</td><td>Litchi</td><td>Grapes</td><td>Orange</td></tr>
    </table>
  6. 6.💪 Which flexbox property spaces boxes along a row? (a) justify-content (b) align-items (c) flex-direction (d) display: flex
  7. 7.🌍 What is the protocol in this URL?
    https://www.example.net/news/today.html
    (a) /news/today.html (b) www.example.net (c) http (d) https
  8. 8.True or false: <meta> has a closing tag. (a) True (b) False
  9. 9.⚡ A JavaScript file usually ends with which extension? (a) .html (b) .js (c) .jpg (d) .css
  10. 10.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  11. 11.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) href (b) Contact us (c) Visit the site (d) art.html
  12. 12.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  13. 13.⚡ What does this code show?
    let name = "Riya";
    console.log("Well done, " + name + "!");
    (a) name (b) Well done, Riya! (c) Well done, name! (d) Riya
  14. 14.📦 In the box model, which part is space inside the border? (a) margin (b) content (c) padding (d) border
  15. 15.🚀 Which file should this code go in: .box { padding: 8px; } (a) index.html (b) style.css (c) script.js
  16. 16.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) https://example.com (b) contact.html (c) Take the quiz (d) about.html
  17. 17.True or false: HTML on its own cannot make links to pages. (a) True (b) False
  18. 18.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  19. 19.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  20. 20.🔁 What does this code print?
    let score = 22;
    if (score >= 32) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  21. 21.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  22. 22.True or false: <input type="email"> is for one line of words. (a) False (b) True
  23. 23.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Rain today</h4>
    <p>My pets</p>
    <h3>Cricket is fun.</h3>
  24. 24.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  25. 25.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 7; i++) {
      console.log("Hi");
    }
  26. 26.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  27. 27.True or false: padding is the line round the box. (a) True (b) False
  28. 28.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  29. 29.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to add colour (d) to leave notes
  30. 30.✍️ Which sign ends each CSS declaration? (a) ; (b) , (c) . (d) :
  31. 31.What is <input type="number"> for? (a) takes only numbers (b) picks a day (c) is for an email address (d) is for one line of words
  32. 32.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>
  34. 34.🔁 How many times does this code print “Hello”?
    for (let i = 1; i <= 3; i++) {
      console.log("Hello");
    }
  35. 35.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) news.html (b) art.html (c) maths.html (d) Maths fun
  36. 36.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it makes text red (d) it loads faster
  37. 37.🌍 What does a web address (URL) tell the browser? (a) your password (b) the page colour (c) where the page is (d) how old you are
  38. 38.🖌️ Where does the text sit on its line?
    h2 {
      text-align: left;
      background-color: yellow;
      font-size: 20px;
      color: blue;
    }
    (a) on the left (b) on the right (c) in the middle
  39. 39.♿ Does this help everyone, or make the page harder to use: use big enough text? (a) helps everyone (b) makes it harder
  40. 40.True or false: JavaScript rounds box corners. (a) True (b) False

Answer key

  1. red
  2. False
  3. False
  4. actions and changes
  5. 4
  6. justify-content
  7. https
  8. False
  9. .js
  10. 4
  11. Contact us
  12. in a new tab
  13. Well done, Riya!
  14. padding
  15. style.css
  16. about.html
  17. False
  18. in the same tab
  19. href
  20. Play again
  21. <li>
  22. False
  23. 3
  24. in a new tab
  25. 6
  26. <
  27. False
  28. Yes
  29. to leave notes
  30. ;
  31. takes only numbers
  32. in a new tab
  33. <h6>
  34. 3
  35. maths.html
  36. it tells its meaning
  37. where the page is
  38. on the left
  39. helps everyone
  40. False

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