Chapter 1
Chapter 1
4. What is the primary difference between frontend and backend web development?
- A) Frontend deals with database management, while backend deals with the
browser interface.
- B) Frontend involves server-side logic, while backend focuses on user
interactions.
- C) Frontend is browser-related, while backend focuses on applications and
databases on the server.
- D) There is no difference; they are the same.
---
---
13. Which of the following is a measure to improve accessibility for visually impaired
users?
- A) Add captions to videos
- B) Use semantic HTML and logical content order
- C) Ensure buttons are large and clickable
- D) Optimize site performance
14. What is the purpose of site performance optimization?
- A) To reduce page load time and improve user experience
- B) To make the site accessible for screen readers
- C) To increase CSS and HTML compatibility
- D) To minimize JavaScript usage
---
---
23. Which element displays whitespace exactly as it is typed into the source
document?
- A) `<pre>`
- B) `<code>`
- C) `<p>`
- D) `<blockquote>`
---
30. How would you create a link that opens in a new tab?
- A) Add `target="_new"`
- B) Add `target="_blank"`
- C) Add `rel="external"`
- D) Add `target="new"`
---
---
37. Which property would you use to change the text color in CSS?
- A) `font-color`
- B) `text-color`
- C) `color`
- D) `background-color`
---
Here’s an expanded set of **additional multiple-choice questions** covering more
chapters:
---
42. How would you create a table cell that spans two columns?
- A) Add `rowspan="2"` to the `<td>` element
- B) Add `colspan="2"` to the `<td>` element
- C) Add `span="2"` to the `<tr>` element
- D) Add `columns="2"` to the `<table>` element
---
47. Which attribute is used to specify that a form field must be filled out before
submission?
- A) `required`
- B) `validate`
- C) `mandatory`
- D) `checked`
---
49. What is the purpose of the `controls` attribute in the `<video>` tag?
- A) It adds playback controls to the video player.
- B) It defines the video source file.
- C) It specifies the aspect ratio of the video.
- D) It makes the video autoplay.
---
52. Which property would you use to center text horizontally in CSS?
- A) `align`
- B) `justify-content`
- C) `text-align`
- D) `vertical-align`
---
53. Which color model uses percentages for red, green, and blue values?
- A) RGB
- B) HEX
- C) HSL
- D) CMYK
---
56. Which property is used to specify the space inside an element’s border?
- A) `padding`
- B) `margin`
- C) `border-spacing`
- D) `width`
---
59. Which value of the `position` property ensures the element always stays in the
same place relative to the viewport?
- A) `relative`
- B) `absolute`
- C) `static`
- D) `fixed`
---
63. Which property defines the space between rows in a CSS grid layout?
- A) `grid-gap`
- B) `row-gap`
- C) `gap`
- D) `grid-row-spacing`
---
66. Which CSS unit is commonly used in media queries to define breakpoints?
- A) `px`
- B) `em`
- C) `rem`
- D) `%`
---
A
B
A
A
B
A
A
B
A
A
B
C
C
B
B
A
D
B
D
B
A
B
B
A
A
B
A