← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 646 · 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.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
  2. 2.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
  3. 3.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  5. 5.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  6. 6.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
  7. 7.True or false: <ol> shows bullet points. (a) False (b) True
  8. 8.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  9. 9.Which colour pair is easy to read? (a) blue on purple (b) yellow on white (c) red on green (d) black on white
  10. 10.True or false: HTML makes headings and lists. (a) True (b) False
  11. 11.🖌️ Which CSS property picks the font style? (a) color (b) font-weight (c) font-family (d) text-align
  12. 12.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  13. 13.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  14. 14.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="fruit"> Papaya
      <input type="radio" name="fruit"> Banana
      <input type="radio" name="fruit"> Guava
      <input type="radio" name="fruit"> Litchi
    </form>
  15. 15.True or false: in <img>, src sets how tall it is. (a) True (b) False
  16. 16.🌍 What does a web address (URL) tell the browser? (a) your password (b) how old you are (c) the page colour (d) where the page is
  17. 17.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Good morning!</h4>
    <h2>Hello, world!</h2>
  18. 18.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  19. 19.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
  20. 20.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png
  21. 21.Which of these goes in the head? (a) <h1> (b) <title> (c) <img> (d) <ul>
  22. 22.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) script.js (d) style.css
  23. 23.✍️ What value is given to border in this rule?
    h2 {
      font-weight: bold;
      padding: 8px;
      border: 2px solid;
    }
    (a) italic (b) border (c) 300px (d) 2px solid
  24. 24.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) style.css (b) index.html (c) script.js
  25. 25.✍️ Which sign ends each CSS declaration? (a) , (b) : (c) . (d) ;
  26. 26.🎯 Which element does the selector #intro style? (a) <h2 class="intro"> (b) <li class="big"> (c) <h2 id="intro"> (d) <h2 id="main">
  27. 27.🔗 Where does this link open?
    <a href="contact.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <b>My pets</b>
    line 2: <h3>I love mangoes.</h3>
    line 3: <h2>Rain today
    (a) line 1 (b) line 3 (c) line 2
  29. 29.🔗 Where does this link open?
    <a href="about.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  30. 30.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the first one (d) the later one
  31. 31.🖌️ What colour is behind the letters?
    h1 {
      background-color: orange;
      color: yellow;
      text-align: right;
      font-size: 12px;
    }
    (a) green (b) orange (c) yellow
  32. 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
  33. 33.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  34. 34.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
  35. 35.True or false: HTTPS shows the page to you. (a) False (b) True
  36. 36.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  37. 37.Which of these is margin? (a) a solid or dotted edge (b) space inside the border (c) the line round the box (d) the gap to other boxes
  38. 38.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) opens web pages for us
  39. 39.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 25px;
      border: 4px solid black;
      margin: 20px;
    }
  40. 40.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .css (d) .png

Answer key

  1. when if is false
  2. a code editor
  3. has a closing tag
  4. <h2>
  5. to leave notes
  6. width
  7. False
  8. True
  9. black on white
  10. True
  11. font-family
  12. Yes
  13. -->
  14. 1
  15. False
  16. where the page is
  17. 3
  18. <a href="about.html">
  19. opens it in a new tab
  20. fort.jpg
  21. <title>
  22. script.js
  23. 2px solid
  24. index.html
  25. ;
  26. <h2 id="intro">
  27. in the same tab
  28. line 3
  29. in a new tab
  30. the later one
  31. orange
  32. a slash /
  33. No
  34. <ul>
  35. False
  36. <!--
  37. the gap to other boxes
  38. opens web pages for us
  39. 188
  40. .css

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