← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 348 · 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.True or false: HTTPS scrambles data on its way. (a) True (b) False
  2. 2.♿ Does this help everyone, or make the page harder to use: skipping heading levels? (a) makes it harder (b) helps everyone
  3. 3.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 3;
    }
    console.log(total);
  4. 4.True or false: in <img>, height shows if the image fails. (a) True (b) False
  5. 5.🚀 Which file should this code go in: body { margin: 0; } (a) index.html (b) script.js (c) style.css
  6. 6.⚡ What does this code show?
    let name = "Meera";
    alert("Well done, " + name + "!");
    (a) Well done, name! (b) Well done, Meera! (c) Meera (d) name
  7. 7.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<main>”? (a) <main> (b) <header>
  8. 8.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  9. 9.🌈 Which colour is rgb(255, 0, 0)? (a) black (b) yellow (c) red (d) blue
  10. 10.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) art.html (b) Art corner (c) news.html (d) maths.html
  11. 11.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  12. 12.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <strong> (d) <\strong>
  13. 13.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) https://example.com (b) href (c) Maths fun (d) Visit the site
  15. 15.⚖️ What colour is the text of this element?
    <h2 class="star" id="end">Hi</h2>
    CSS:
    #end { color: white; }
    #end { color: red; }
    (a) yellow (b) red (c) blue (d) white
  16. 16.True or false: the URL scrambles data on its way. (a) False (b) True
  17. 17.✍️ What value is given to border in this rule?
    #top {
      font-size: 20px;
      border: 2px solid;
      color: red;
      background-color: yellow;
    }
    (a) italic (b) border (c) 300px (d) 2px solid
  18. 18.🖌️ Which CSS property makes the text bold? (a) text-align (b) color (c) font-size (d) font-weight
  19. 19.🧩 Which language puts a picture on a page? (a) HTML (b) JavaScript (c) CSS
  20. 20.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  21. 21.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.🌐 Which one turns HTML into a page? (a) a web server (b) a code editor (c) a web browser
  23. 23.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a slash / (d) a hash #
  24. 24.Which of these does JavaScript do? (a) puts a picture on a page (b) checks a quiz answer (c) gives the page structure (d) makes a link
  25. 25.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Rain today (c) Hello, world! (d) My best friend
  26. 26.🔐 Is Chai$Cup_19x a strong or a weak password? (a) weak (b) strong
  27. 27.⚡ Which JavaScript word shows a pop-up box? (a) console.log() (b) if (c) let (d) alert()
  28. 28.🎯 How many elements on a page should have the same id? (a) 2 (b) any number (c) 5 (d) 1
  29. 29.True or false: <ul> is an empty tag. (a) False (b) True
  30. 30.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) space-between (c) center (d) flex-end
  31. 31.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) games.html (c) About us (d) Contact us
  32. 32.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it loads faster (c) it tells its meaning (d) it adds pictures
  33. 33.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
  34. 34.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
  35. 35.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 80px;
      padding: 10px;
      border: 3px solid black;
      margin: 5px;
    }
  36. 36.Which of these has a closing tag? (a) <input> (b) <p> (c) <meta> (d) <img>
  37. 37.🔁 How many numbers does this code print?
    for (let i = 0; i < 7; i = i + 3) {
      console.log(i);
    }
  38. 38.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  39. 39.🌈 Which hex code is blue? (a) #00ff00 (b) #ff00ff (c) #0000ff (d) #ff0000
  40. 40.🚀 Where in index.html does the link to style.css go? (a) in the footer (b) inside a <p> (c) after </html> (d) in the head

Answer key

  1. True
  2. makes it harder
  3. 24
  4. False
  5. style.css
  6. Well done, Meera!
  7. <header>
  8. 1
  9. red
  10. maths.html
  11. No
  12. </strong>
  13. <img>
  14. Visit the site
  15. red
  16. False
  17. 2px solid
  18. font-weight
  19. HTML
  20. 2
  21. has a closing tag
  22. a web browser
  23. a slash /
  24. checks a quiz answer
  25. I love mangoes.
  26. strong
  27. alert()
  28. 1
  29. False
  30. space-between
  31. About us
  32. it tells its meaning
  33. <html>
  34. a code editor
  35. 116
  36. <p>
  37. 3
  38. F
  39. #0000ff
  40. in the head

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