← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 716 · 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 does this code print?
    let age = 3;
    if (age < 7) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  2. 2.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  3. 3.🖌️ Which CSS property colours behind the text? (a) font-family (b) text-align (c) font-size (d) background-color
  4. 4.📦 In the box model, which part is space inside the border? (a) padding (b) border (c) content (d) margin
  5. 5.📱 Responsive design means a page ___. (a) is only for laptops (b) has no pictures (c) never changes (d) fits every screen
  6. 6.What is <input type="radio"> for? (a) is for an email address (b) lets you pick only one (c) is for one line of words (d) hides what you type
  7. 7.⚡ What number does this code print?
    let a = 33;
    let b = 9;
    console.log(a + b);
  8. 8.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  9. 9.🌈 Which colour is #ffffff? (a) bright green (b) red (c) magenta (d) white
  10. 10.True or false: <th> gives the table a title. (a) False (b) True
  11. 11.🛡️ Online: is it safe to type a password on http? (a) safe (b) not safe
  12. 12.🎯 Which CSS selector matches this element?
    <h1 class="red" id="hero">Hello</h1>
    (a) #red (b) .hero (c) #hero (d) #top
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) Cricket is fun. (d) Our school trip
  14. 14.🧩 Which language lays out the page? (a) JavaScript (b) CSS (c) HTML
  15. 15.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.⚡ Which JavaScript word shows a pop-up box? (a) if (b) for (c) alert() (d) console.log()
  17. 17.Which of these is a closing tag? (a) </li> (b) <title> (c) <h1> (d) <b>
  18. 18.What does justify-content: center do? (a) puts boxes in the middle (b) equal gaps, none at ends (c) packs boxes at the start (d) packs boxes at the end
  19. 19.⚡ Where does console.log() show its output? (a) in the console (b) in the address bar (c) on the printer (d) on the title bar
  20. 20.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  21. 21.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    (a) My best friend (b) Our school trip (c) I love mangoes.
  22. 22.⚡ What number does this code print?
    let coins = 13;
    coins = coins + 20;
    coins = coins - 8;
    console.log(coins);
  23. 23.🧩 Which language shows a pop-up message? (a) JavaScript (b) HTML (c) CSS
  24. 24.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) { } (d) < >
  25. 25.🚀 What is the home page file of a website usually called? (a) main.png (b) home.css (c) start.js (d) index.html
  26. 26.🔍 Which is the odd one out? (a) shows a pop-up message (b) checks a quiz answer (c) puts a picture on a page (d) changes the page live
  27. 27.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  28. 28.🌈 In #d20000 the red part is the hex number d2. What is it as a normal number?
  29. 29.What does justify-content: flex-end do? (a) puts boxes in the middle (b) packs boxes at the end (c) equal gaps, none at ends (d) packs boxes at the start
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  31. 31.Which of these does JavaScript do? (a) checks a quiz answer (b) adds space around boxes (c) changes the text size (d) gives the page structure
  32. 32.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  33. 33.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  34. 34.✍️ Which sign goes between a property and its value? (a) - (b) = (c) : (d) ;
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h5>? (a) <h5> (b) <h6> (c) <h4> (d) <h1>
  36. 36.🔍 Which is the odd one out? (a) saves our .html files (b) stores a website’s files (c) shows line numbers (d) is where we type code
  37. 37.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  38. 38.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Contact us (b) href (c) Visit the site (d) https://example.com
  39. 39.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  40. 40.⚖️ What colour is the text of this element?
    <h2 class="star" id="logo">Hi</h2>
    CSS:
    .star { color: red; }
    h2 { color: yellow; }
    (a) black (b) blue (c) yellow (d) red

Answer key

  1. teen
  2. Yes
  3. background-color
  4. padding
  5. fits every screen
  6. lets you pick only one
  7. 42
  8. <!--
  9. white
  10. False
  11. not safe
  12. #hero
  13. Our school trip
  14. CSS
  15. an opening tag
  16. alert()
  17. </li>
  18. puts boxes in the middle
  19. in the console
  20. src
  21. I love mangoes.
  22. 25
  23. JavaScript
  24. { }
  25. index.html
  26. puts a picture on a page
  27. Yes
  28. 210
  29. packs boxes at the end
  30. <h1>
  31. checks a quiz answer
  32. Yes
  33. a web browser
  34. :
  35. <h1>
  36. stores a website’s files
  37. a web browser
  38. Contact us
  39. weak
  40. red

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