← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 369 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  2. 2.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) games.html (c) contact.html (d) Contact us
  3. 3.⚡ What does this code show?
    let name = "Meera";
    console.log("Hello, " + name + "!");
    (a) Hello, Meera! (b) Meera (c) Hello, name! (d) name
  4. 4.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  5. 5.Which of these is safe to do online? (a) share your password (b) post your home address (c) check for https first (d) type a password on http
  6. 6.⚡ What number does this code print?
    let score = 8;
    score = score + 12;
    score = score - 6;
    console.log(score);
  7. 7.True or false: <li> has a closing tag. (a) False (b) True
  8. 8.🔐 Is Mango#Kite29! a strong or a weak password? (a) strong (b) weak
  9. 9.🎯 Which CSS selector matches this element?
    <h1 class="star" id="logo">Hello</h1>
    (a) #star (b) #end (c) .logo (d) #logo
  10. 10.True or false: <style> goes in the body. (a) True (b) False
  11. 11.Which of these is true of <header>? (a) holds the main content (b) sits at the very top (c) sits at the bottom (d) holds the menu of links
  12. 12.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>I love mangoes.</h2>
    <h3>Hello, world!</h3>
    <h3>I love mangoes.</h3>
    <p>My best friend</p>
  13. 13.🔁 What does this code print?
    let score = 40;
    if (score < 20) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  14. 14.📦 In the box model, which part is space outside the border? (a) padding (b) border (c) margin (d) content
  15. 15.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  16. 16.🎨 Which tag holds CSS inside the head? (a) <style> (b) <body> (c) <css> (d) <script>
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
  18. 18.🌈 Which colour of light is strongest in rgb(203, 133, 75)? (a) red (b) green (c) blue
  19. 19.🧩 Which language sets colours and fonts? (a) HTML (b) JavaScript (c) CSS
  20. 20.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
  21. 21.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  22. 22.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  23. 23.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.True or false: to use a strong password is not safe. (a) True (b) False
  25. 25.🚀 Where in index.html does the link to style.css go? (a) after </html> (b) in the head (c) in the footer (d) inside a <p>
  26. 26.⚡ Which JavaScript word repeats code? (a) console.log() (b) if (c) for (d) alert()
  27. 27.📱 What does a media query check? (a) the screen width (b) the time of day (c) the page title (d) the battery level
  28. 28.🎯 Which sign starts an id selector? (a) @ (b) & (c) # (d) .
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Cricket Club (b) body (c) Match report (d) I like to read.
  30. 30.True or false: <li> is an ordered list. (a) True (b) False
  31. 31.📝 What does a password box show instead of letters? (a) emojis (b) numbers (c) dots (d) capital letters
  32. 32.True or false: <a href="a.html">Go</a> goes in index.html. (a) False (b) True
  33. 33.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  34. 34.What does justify-content: flex-start do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
  35. 35.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  36. 36.True or false: the content is the text or picture. (a) True (b) False
  37. 37.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) School news (b) about.html (c) Take the quiz (d) href
  38. 38.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  39. 39.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
  40. 40.🌈 Which colour is #0000ff? (a) white (b) red (c) blue (d) black

Answer key

  1. 2
  2. games.html
  3. Hello, Meera!
  4. to leave notes
  5. check for https first
  6. 14
  7. True
  8. strong
  9. #logo
  10. False
  11. sits at the very top
  12. 4
  13. Play again
  14. margin
  15. <!DOCTYPE html>
  16. <style>
  17. 250
  18. red
  19. CSS
  20. a code editor
  21. <h3>
  22. 6
  23. in the body
  24. False
  25. in the head
  26. for
  27. the screen width
  28. #
  29. Match report
  30. False
  31. dots
  32. True
  33. an element selector
  34. packs boxes at the start
  35. a closing tag
  36. True
  37. School news
  38. in a new tab
  39. <h6>
  40. blue

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