← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 243 · 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 number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + i;
    }
    console.log(total);
  2. 2.🖌️ How big is the text, in px?
    h2 {
      background-color: blue;
      color: purple;
      text-align: right;
      font-size: 20px;
    }
  3. 3.🔍 One closing tag is missing. Which one?
    <strong>Fun facts
    <h3>Hello, world!</h3>
    <h2>Our school trip</h2>
    (a) </i> (b) </h2> (c) </h3> (d) </strong>
  4. 4.💪 Which flexbox property picks row or column? (a) flex-direction (b) justify-content (c) display: flex (d) align-items
  5. 5.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  6. 6.🖌️ How big is the text, in px?
    p {
      font-size: 16px;
      background-color: black;
      color: orange;
      text-align: right;
    }
  7. 7.📝 Which tag gives a form box a name you can click? (a) <hr> (b) <label> (c) <h1> (d) <title>
  8. 8.🌍 What do we call the computer that stores a website? (a) a mouse (b) a keyboard (c) a printer (d) a server
  9. 9.🌍 What is the protocol in this URL?
    https://kids.example.org/news/today.html
    (a) http (b) /news/today.html (c) https (d) kids.example.org
  10. 10.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
  11. 11.✍️ CSS declarations go inside which brackets? (a) { } (b) ( ) (c) [ ] (d) < >
  12. 12.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) Cricket is fun. (c) The red kite
  13. 13.What does justify-content: flex-start do? (a) puts boxes in the middle (b) packs boxes at the end (c) packs boxes at the start (d) equal gaps, none at ends
  14. 14.📱 max-width: 600px applies when the screen is ___. (a) exactly 1000px (b) 600px or narrower (c) 600px or wider (d) turned off
  15. 15.⚡ Which JavaScript word makes a new variable? (a) alert() (b) let (c) for (d) console.log()
  16. 16.⚡ Which tag holds JavaScript in a page? (a) <script> (b) <style> (c) <js> (d) <code>
  17. 17.📱 What does a media query check? (a) the battery level (b) the time of day (c) the screen width (d) the page title
  18. 18.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>I love mangoes.</h2>
    <p>Rain today</p>
  19. 19.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
  20. 20.🌈 Which colour is rgb(255, 0, 0)? (a) cyan (b) blue (c) red (d) yellow
  21. 21.🚀 Which file should this code go in: <img src="cat.png"> (a) style.css (b) script.js (c) index.html
  22. 22.🎨 What does CSS stand for? (a) Creative Sheet System (b) Cascading Style Sheets (c) Colourful Site Styles (d) Computer Style Sheets
  23. 23.📊 Where do <td> cells go? (a) inside a <tr> (b) inside a <li> (c) inside the <head> (d) inside a <p>
  24. 24.True or false: the server stores the site’s files. (a) True (b) False
  25. 25.Which of these has a closing tag? (a) <img> (b) <hr> (c) <p> (d) <meta>
  26. 26.🌈 Which colour of light is strongest in rgb(14, 11, 179)? (a) blue (b) green (c) red
  27. 27.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  28. 28.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 610px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  29. 29.🧭 Which semantic tag holds the main content? (a) <header> (b) <aside> (c) <nav> (d) <main>
  30. 30.Which of these is an empty tag? (a) <ul> (b) <p> (c) <br> (d) <li>
  31. 31.True or false: padding is space outside the border. (a) False (b) True
  32. 32.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    (a) Cricket is fun. (b) Our school trip (c) Good morning!
  33. 33.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
  34. 34.True or false: <a> goes in the body. (a) True (b) False
  35. 35.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) <head>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Our school trip (b) I love mangoes. (c) Rain today (d) Cricket is fun.
  37. 37.Which of these is true of <main>? (a) holds a side box of tips (b) holds one blog post (c) is the page’s key part (d) sits at the very top
  38. 38.⚖️ What colour is the text of this element?
    <p class="big" id="logo">Hi</p>
    CSS:
    .big { color: blue; }
    p { color: green; }
    #logo { color: purple; }
    (a) yellow (b) green (c) purple (d) blue
  39. 39.True or false: alert(score); goes in index.html. (a) False (b) True
  40. 40.⚡ What number does this code print?
    let coins = 24;
    coins = coins + 6;
    coins = coins - 5;
    console.log(coins);

Answer key

  1. 21
  2. 20
  3. </strong>
  4. flex-direction
  5. <ol>
  6. 16
  7. <label>
  8. a server
  9. https
  10. weak
  11. { }
  12. Rain today
  13. packs boxes at the start
  14. 600px or narrower
  15. let
  16. <script>
  17. the screen width
  18. 2
  19. an id selector
  20. red
  21. index.html
  22. Cascading Style Sheets
  23. inside a <tr>
  24. True
  25. <p>
  26. blue
  27. a slash /
  28. 70
  29. <main>
  30. <br>
  31. False
  32. Good morning!
  33. <h5>
  34. True
  35. <!DOCTYPE html>
  36. Our school trip
  37. is the page’s key part
  38. purple
  39. False
  40. 25

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