← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 552 · 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.🚀 Which file should this code go in: .box { padding: 8px; } (a) style.css (b) script.js (c) index.html
  2. 2.✍️ Which sign ends each CSS declaration? (a) . (b) ; (c) : (d) ,
  3. 3.📝 Which input type picks a day? (a) number (b) date (c) radio (d) submit
  4. 4.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <u>Good morning!</u>
    <em>Hello, world!
    (a) </em> (b) </h1> (c) </small> (d) </u>
  5. 5.🖌️ What colour is behind the letters?
    p {
      background-color: yellow;
      color: purple;
      font-size: 28px;
      text-align: right;
    }
    (a) orange (b) yellow (c) purple
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <strong>Our school trip</strong>
    line 2: <p>The red kite</p>
    line 3: <b>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <em>My best friend
    line 2: <p>Fun facts</p>
    line 3: <h2>Good morning!</h2>
    (a) line 2 (b) line 1 (c) line 3
  8. 8.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Maths fun (b) contact.html (c) Visit the site (d) href
  9. 9.Which of these is true of <footer>? (a) sits at the bottom (b) is the page’s key part (c) holds a news story (d) holds a side box of tips
  10. 10.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) script.js (c) index.html
  11. 11.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.
    <i>Fun facts</i>
    <small>My pets</small>
    (a) </small> (b) </i> (c) </h3> (d) </b>
  12. 12.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  13. 13.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  14. 14.⚡ What number does this code print?
    let a = 10;
    let b = 9;
    console.log(a * b);
  15. 15.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
  16. 16.Which of these is not safe to do online? (a) post your home address (b) use a nickname in games (c) use a strong password (d) log out on shared PCs
  17. 17.🔁 How many times does this code print “Hello”?
    for (let i = 1; i < 6; i++) {
      console.log("Hello");
    }
  18. 18.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) </head> (d) </body>
  19. 19.📦 In the box model, which part is the line round the box? (a) padding (b) content (c) border (d) margin
  20. 20.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  21. 21.⚡ What number does this code print?
    let a = 52;
    let b = 10;
    console.log(a - b);
  22. 22.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
  23. 23.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  24. 24.Which of these is true of a web browser? (a) answers page requests (b) shows pages from the web (c) shows line numbers (d) sends pages over the net
  25. 25.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the first one (c) neither (d) the shorter one
  26. 26.True or false: <article> holds extra side notes. (a) True (b) False
  27. 27.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + 2;
    }
    console.log(total);
  28. 28.🔒 Is the connection to this address scrambled (encrypted)?
    http://www.example.net/index.html
    (a) No (b) Yes
  29. 29.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  30. 30.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  31. 31.🔍 One closing tag is missing. Which one?
    <h1>Rain today
    <em>My pets</em>
    <h3>Cricket is fun.</h3>
    (a) </h1> (b) </em> (c) </h3> (d) </u>
  32. 32.Which of these is not safe to do online? (a) share your password (b) use a nickname in games (c) keep passwords secret (d) tell a trusted adult
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="box" id="main">Hi</h2>
    CSS:
    .box { color: yellow; }
    .box { color: orange; }
    (a) orange (b) yellow (c) red (d) blue
  34. 34.✍️ What is the selector in this CSS rule?
    li {
      color: red;
      font-size: 20px;
    }
    (a) body (b) li (c) 20px (d) color
  35. 35.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Fun facts</p>
    <h4>I love mangoes.</h4>
  36. 36.📝 Which input type takes only numbers? (a) text (b) submit (c) email (d) number
  37. 37.True or false: HTTPS sends the page back. (a) False (b) True
  38. 38.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  39. 39.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) </html>
  40. 40.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. style.css
  2. ;
  3. date
  4. </em>
  5. yellow
  6. line 3
  7. line 1
  8. Visit the site
  9. sits at the bottom
  10. script.js
  11. </b>
  12. a line across the page
  13. Yes
  14. 90
  15. </h2>
  16. post your home address
  17. 5
  18. <!DOCTYPE html>
  19. border
  20. an opening tag
  21. 42
  22. strong
  23. No
  24. shows pages from the web
  25. the later one
  26. False
  27. 8
  28. No
  29. a web browser
  30. Yes
  31. </h1>
  32. share your password
  33. orange
  34. li
  35. 2
  36. number
  37. False
  38. <ul>
  39. </html>
  40. an empty tag

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