Docsity

CWD-001 Certified Web Developer Exam, Exams of Technology

Toggle sidebar
bg1
CWD-001 Certified Web Developer Exam
Question 1. Which protocol is primarily used for secure communication over
the web?
A) HTTP
B) FTP
C) HTTPS
D) SMTP
Answer: C
Explanation: HTTPS (HyperText Transfer Protocol Secure) uses SSL/TLS to
encrypt data between the client and server, ensuring secure communication
over the web, unlike HTTP which is unencrypted.
Question 2. What does a URL primarily consist of?
A) Protocol, domain name, path, query string
B) IP address, port, hostname
C) Server name, port, resource type
D) Domain, subnet, protocol
Answer: A
Explanation: A URL (Uniform Resource Locator) generally includes the
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download CWD-001 Certified Web Developer Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which protocol is primarily used for secure communication over the web? A) HTTP B) FTP C) HTTPS D) SMTP Answer: C Explanation: HTTPS (HyperText Transfer Protocol Secure) uses SSL/TLS to encrypt data between the client and server, ensuring secure communication over the web, unlike HTTP which is unencrypted. Question 2. What does a URL primarily consist of? A) Protocol, domain name, path, query string B) IP address, port, hostname C) Server name, port, resource type D) Domain, subnet, protocol Answer: A Explanation: A URL (Uniform Resource Locator) generally includes the

protocol (e.g., http), domain name, optional path, and query string, which together specify the location of a resource on the web. Question 3. Which layer of web architecture handles the presentation and user interface? A) Back-end server B) Client-side (front-end) C) Database layer D) Network infrastructure Answer: B Explanation: The client-side or front-end handles the user interface and presentation layer, responsible for displaying content and capturing user interactions. Question 4. Which HTML5 semantic element is most appropriate for containing navigational links? A) B) C) D)

Explanation: The dot (.) selector targets elements with a specific class, e.g., .classname. Question 7. In the CSS box model, which part is directly affected by the padding property? A) Content B) Border C) Margin D) Inside the element's content area, outside the content Answer: D Explanation: Padding is the space between the content and the border, increasing the size of the element's clickable or visible area without affecting the border or margin. Question 8. Which CSS property is used to create a flexible container that distributes space among items? A) display: block B) float C) flex D) grid

Answer: C Explanation: The display: flex property creates a flex container that enables flexible layouts, distributing space among items efficiently. Question 9. Which media query applies styles for screens with a maximum width of 768px? A) @media (min-width: 768px) B) @media (max-width: 768px) C) @media (width: 768px) D) @media (device-width: 768px) Answer: B Explanation: The query @media (max-width: 768px) applies styles when the viewport width is 768 pixels or less, useful for responsive design. Question 10. Which JavaScript data type is used to store multiple values in an ordered list? A) Object B) Array C) String D) Function

Answer: B Explanation: The onclick event occurs when a user clicks on an element. Question 13. Which JavaScript feature allows for handling asynchronous operations more straightforwardly than callbacks? A) Promises B) Closures C) Modules D) Functions Answer: A Explanation: Promises provide a cleaner, more manageable way to handle asynchronous code, avoiding callback hell. Question 14. Which syntax is introduced in ES6 for defining functions with a shorter form? A) function keyword B) Arrow functions (=>) C) lambda functions D) def keyword Answer: B

Explanation: Arrow functions (=>) provide a concise syntax for writing functions in ES6 and later versions. Question 15. Which attribute is used in HTML to specify the character encoding of the document? A) B)
Explanation: The font-size property specifies the size of the font used in the text. Question 19. Which property is used in CSS to create a smooth transition effect between property changes? A) animation B) transition C) transform D) keyframes Answer: B Explanation: The transition property enables smooth changes between property values over a specified duration. Question 20. Which JavaScript method is used to add an event listener to an element? A) attachEvent() B) addEventListener() C) bind() D) registerEvent() Answer: B

Explanation: addEventListener() attaches an event handler to an element without overwriting existing handlers. Question 21. Which JavaScript method converts a JSON string into a JavaScript object? A) JSON.stringify() B) JSON.parse() C) Object.assign() D) parseInt() Answer: B Explanation: JSON.parse() converts a JSON-formatted string into a JavaScript object, facilitating data manipulation. Question 22. Which HTTP method is used to submit data to be processed to a specified resource? A) GET B) POST C) PUT D) DELETE Answer: B

Explanation: XSS involves injecting malicious scripts into webpages viewed by other users, potentially compromising security. Question 25. Which server software is commonly used for hosting static websites? A) Apache B) Nginx C) IIS D) All of the above Answer: D Explanation: Apache, Nginx, and IIS are all capable of hosting static websites. Question 26. Which version control system is most widely used for collaborative web development? A) SVN B) Git C) Mercurial D) CVS Answer: B

Explanation: Git is the most popular distributed version control system, supporting collaboration through repositories like GitHub. Question 27. Which CSS property is used to hide an element visually but keep it accessible for screen readers? A) display: none B) visibility: hidden C) opacity: 0 D) clip-path: inset(50%) Answer: D Explanation: Using clip-path: inset(50%) visually hides content but keeps it accessible to screen readers, unlike display: none which removes it from accessibility tree. Question 28. Which HTML attribute is essential for making a form accessible for screen readers? A) action B) method C) aria-label D) name

Answer: A Explanation: The element provides metadata such as character encoding, viewport settings, and description. Question 31. Which CSS property is used to control the stacking order of overlapping elements? A) z-index B) stack-order C) position D) float Answer: A Explanation: z-index determines the stack order of overlapping elements, with higher values appearing on top. Question 32. Which JavaScript feature allows for encapsulating variables and functions to avoid polluting the global namespace? A) Modules B) Closures C) Callbacks D) Prototypes

Answer: A Explanation: JavaScript modules encapsulate code, preventing global namespace pollution and supporting modular development. Question 33. Which HTML attribute specifies the URL of the external CSS file? A)
Answer: B Explanation: The element creates an ordered list, typically numbered. Question 37. Which CSS property is used to set the spacing between lines of text? A) letter-spacing B) word-spacing C) line-height D) text-indent Answer: C Explanation: The line-height property controls the amount of space above and below inline elements, affecting line spacing. Question 38. Which HTML element is used to embed a video in a webpage? A) B) C) D) Answer: B

Explanation: The element embeds video content, allowing controls and multiple source formats. Question 39. Which CSS property is used to set the background color of an element? A) color B) background-color C) bg-color D) fill Answer: B Explanation: The background-color property specifies the background fill color of an element. Question 40. Which JavaScript method is used to remove the last element from an array? A) pop() B) shift() C) splice() D) slice() Answer: A