Contoh Soal Quiz HTML Dan CSS Beserta Jawabannya

HTML dan CSS Quiz - Kali ini kita akan membahas soal quiz html dan css beserta jawabannya:



A. HTML Quiz

1.  What does HTML stand for?
Jawaban: Hyper Text Markup Language

2. Who is making the Web standards?
Jawaban: The World Wide Web Consortium

 
3. Choose the correct HTML element for the largest heading:
Jawaban: <h1>

4. What is the correct HTML element for inserting a line break?
Jawaban:  <br>

5. What is the correct HTML for adding a background color?
Jawaban: <body style="background-color:yellow;">

6. Choose the correct HTML element to define important text.
Jawaban: <strong>

7. Choose the correct HTML element to define emphasized text.
Jawaban: <em>

8. What is the correct HTML for creating a hyperlink?
Jawaban: <a href="http://www.w3schools.com">W3Schools</a>

9. Which character is used to indicate an end tag?
Jawaban: /

10. How can you open a link in a new tab/browser window?
Jawaban: <a href="url" target="_blank">

11. Which of these elements are all <table> elements?
Jawaban: <table><tr><td>

12. Inline elements are normally displayed without starting a new line.
Jawaban: True

13. How can you make a numbered list?
Jawaban: <ol>

14. How can you make a bulleted list?
Jawaban: <ul>

15. What is the correct HTML for making a checkbox?
Jawaban: <input type="checkbox">

16. What is the correct HTML for making a text input field?
Jawaban: <input type="text">

17. What is the correct HTML for making a drop-down list?
Jawaban: <select>

18. What is the correct HTML for making a text area?
Jawaban: <textarea>

19. What is the correct HTML for inserting an image?
Jawaban: <img src="image.gif" alt="MyImage">

20. What is the correct HTML for inserting a background image?
Jawaban: <body style="background-image:url(background.gif)">

21. An <iframe> is used to display a web page within a web page.
Jawaban: True

22. HTML comments start with <!-- and end with -->
Jawaban: True

23. Block elements are normally displayed without starting a new line.
Jawaban: False

24. Which HTML element defines the title of a document?
Jawaban: <title>

25. Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?Jawaban: alt

26. Which doctype is correct for HTML5?
Jawaban: !DOCTYPE html>

27. Which HTML element is used to specify a footer for a document or section?
Jawaban: <footer>

28. In HTML, you can embed SVG elements directly into an HTML page.
Jawaban: True

29. What is the correct HTML element for playing video files?
Jawaban: <video>

30. What is the correct HTML element for playing audio files?
Jawaban: <audio>

31. The HTML global attribute, "contenteditable" is used to:
Jawaban: Specify whether the content of an element should be editable or not

32. In HTML, onblur and onfocus are:
Jawaban: Event attributes

33. Graphics defined by SVG is in which format?
Jawaban: XML

34. The HTML <canvas> element is used to:
Jawaban: draw graphics

35. In HTML, which attribute is used to specify that an input field must be filled out?
Jawaban: required

36. Which input type defines a slider control?
Jawaban: range

37. Which HTML element is used to display a scalar measurement within a range?
Jawaban: <meter>

38. Which HTML element defines navigation links?
Jawaban: <nav>

39. In HTML, what does the <aside> element define?
Jawaban: Content aside from the page content

40. Which HTML element is used to specify a header for a document or section?
Jawaban: <header>

B. CSS Quiz

1. What does CSS stand for?
Jawaban: Cascading Style Sheets

2. What is the correct HTML for referring to an external style sheet?
Jawaban: <link rel="stylesheet" type="text/css" href="mystyle.css">

3. Where in an HTML document is the correct place to refer to an external style sheet?
Jawaban: In the <head> section

4. Which HTML tag is used to define an internal style sheet?
Jawaban: <style>

5. Which HTML attribute is used to define inline styles?
Jawaban: style

6. Which is the correct CSS syntax? 
Jawaban: body {color: black;}

7. How do you insert a comment in a CSS file?
Jawaban:  /* this is a comment */

8. Which property is used to change the background color? 
Jawaban: background-color

9. How do you add a background color for all <h1> elements?
Jawaban: h1 {background-color:#FFFFFF;}

10. Which CSS property is used to change the text color of an element? 
Jawaban: color

11. Which CSS property controls the text size? 
Jawaban: font-size

12. What is the correct CSS syntax for making all the <p> elements bold? 
Jawaban: p {font-weight:bold;}

13. How do you display hyperlinks without an underline? 
Jawaban: a {text-decoration:none;}

14. How do you make each word in a text start with a capital letter?
Jawaban: text-transform:capitalize

15. Which property is used to change the font of an element?
Jawaban: font-family

16. How do you make the text bold? 
Jawaban: font-weight:bold;

17. How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

Jawaban: border-width:10px 1px 5px 20px;

18. Which property is used to change the left margin of an element? 
Jawaban: margin-left

19. When using the padding property; are you allowed to use negative values? 
Jawaban: No

20. How do you make a list that lists its items with squares? 
Jawaban: list-style-type: square;

21. How do you select an element with id "demo"?
Jawaban: #demo

22. How do you select elements with class name "test"? 
Jawaban: .test

23. How do you select all p elements inside a div element? 
Jawaban: div p

24. How do you group selectors? 
Jawaban: Separate each selector with a comma

25. What is the default value of the position property?
Jawaban: static

Itulah contoh soal quiz html dan css, semoga membantu dan bermanfaat.