CMS Developer Practice Exam, Exams of Technology

This practice exam assesses a learner’s ability to build and maintain content management system (CMS) applications, focusing on templates, modules, API integrations, data modeling, security, and user management. The test covers backend development concepts, customization techniques, third-party extension handling, CMS architecture understanding, and performance optimization. Candidates must demonstrate both foundational and advanced CMS development skills relevant to modern digital ecosystems.

Typology: Exams

2025/2026

Available from 01/08/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 90

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMS Developer Practice Exam
**Question 1.** Which HTML5 element is most appropriate for marking up a navigation menu?
A) `<section>`
B) `<nav>`
C) `<article>`
D) `<aside>`
Answer: B
Explanation: The `<nav>` element semantically represents a set of navigation links, improving
accessibility and SEO.
**Question 2.** In CSS, which selector has the highest specificity?
A) `.class`
B) `#id`
C) `element`
D) `*`
Answer: B
Explanation: ID selectors (`#id`) have higher specificity than class (`.class`) and element
selectors.
**Question 3.** Which Flexbox property aligns items vertically in the crossaxis?
A) `justify-content`
B) `align-items`
C) `flex-direction`
D) `order`
Answer: B
Explanation: `align-items` controls alignment along the crossaxis (vertical when `flex-direction`
is row).
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

Partial preview of the text

Download CMS Developer Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which HTML5 element is most appropriate for marking up a navigation menu? A) <section> B) <nav> C) <article> D) <aside> Answer: B Explanation: The <nav> element semantically represents a set of navigation links, improving accessibility and SEO. Question 2. In CSS, which selector has the highest specificity? A) .class B) #id C) element D) * Answer: B Explanation: ID selectors (#id) have higher specificity than class (.class) and element selectors. Question 3. Which Flexbox property aligns items vertically in the cross‑axis? A) justify-content B) align-items C) flex-direction D) order Answer: B Explanation: align-items controls alignment along the cross‑axis (vertical when flex-direction is row).

Question 4. What does the CSS grid-template-columns: repeat(3, 1fr); rule do? A) Creates three columns of equal width B) Creates three rows of equal height C) Sets three fixed‑pixel columns D) Generates three auto‑sized columns Answer: A Explanation: repeat(3, 1fr) creates three columns each taking one fraction of the available space. Question 5. Which media query targets devices with a viewport width of 768 px or less? A) @media (max-width: 768px) B) @media (min-width: 768px) C) @media (width: 768px) D) @media (orientation: portrait) Answer: A Explanation: max-width applies the styles when the viewport is up to the specified width. Question 6. In Sass, what does the @extend directive do? A) Imports another file B) Mixes in a set of properties C) Inherits the styles of a selector D) Declares a variable Answer: C Explanation: @extend makes a selector inherit the styles of another selector, reducing duplication. Question 7. Which JavaScript keyword creates a block‑scoped variable?

Question 10. Which HTTP status code indicates that the client must authenticate to gain network access? A) 200 B) 301 C) 401 D) 403 Answer: C Explanation: 401 Unauthorized signals that authentication is required and has failed or not been provided. Question 11. In a RESTful API, which HTTP method is conventionally used to partially update a resource? A) GET B) POST C) PUT D) PATCH Answer: D Explanation: PATCH applies partial modifications, whereas PUT replaces the entire resource. Question 12. Which JSON data type is NOT valid? A) String B) Number C) Date D) Boolean Answer: C Explanation: JSON supports strings, numbers, objects, arrays, booleans, and null; it has no native date type.

Question 13. Which Git command creates a new branch called feature and switches to it? A) git branch feature B) git checkout feature C) git checkout - b feature D) git merge feature Answer: C Explanation: git checkout - b <branch> creates and checks out the new branch in one step. Question 14. In a traditional (coupled) CMS, where does the presentation layer reside? A) In a separate front‑end application B) Within the same system that stores content C) On a CDN only D) As a headless API endpoint Answer: B Explanation: Coupled CMSs combine content storage, business logic, and rendering in one platform. Question 15. Which of the following best describes a headless CMS? A) It uses PHP templates for rendering B) It provides only an API for content delivery C) It stores content in a relational database only D) It requires a specific theme framework Answer: B Explanation: A headless CMS decouples content management from presentation, exposing content via APIs.

A) To define output folder B) To list external libraries C) To specify the initial file(s) for bundling D) To configure dev server Answer: C Explanation: The entry point tells Webpack where to start building the dependency graph. Question 20. Which of the following is a benefit of using a CSS preprocessor like Sass? A) Automatic image compression B) Runtime JavaScript execution C) Variables and nesting in stylesheets D) Server‑side rendering of CSS Answer: C Explanation: Sass introduces variables, nesting, mixins, and functions that simplify stylesheet authoring. Question 21. Which HTTP header controls caching behavior on the client side? A) Authorization B) Cache-Control C) Content-Type D) User-Agent Answer: B Explanation: Cache-Control directives (e.g., max‑age, no‑cache) tell browsers how to cache responses. Question 22. In a CMS, what does the term “object caching” refer to? A) Caching static HTML files on disk

B) Storing database query results in memory C) Caching CSS and JavaScript bundles D) Caching images in the browser Answer: B Explanation: Object caching keeps the results of expensive operations (like DB queries) in memory for faster reuse. Question 23. Which of the following is a common technique to prevent XSS attacks? A) Using SELECT * in SQL queries B) Escaping output with htmlspecialchars() C) Disabling cookies D) Enabling directory indexing Answer: B Explanation: Escaping HTML special characters before output mitigates reflected and stored XSS. Question 24. Which hashing algorithm is recommended for storing passwords in modern PHP applications? A) MD B) SHA C) bcrypt (password_hash) D) CRC Answer: C Explanation: bcrypt (via password_hash) provides a strong, adaptive hash suitable for passwords. Question 25. What does the rel="canonical" link element tell search engines? A) The page is mobile‑friendly

A) git pull --rebase B) git merge --no-ff C) git fetch D) git cherry-pick Answer: A Explanation: git pull --rebase rebases local commits onto the fetched branch, avoiding a merge commit. Question 29. What is the purpose of the robots.txt file? A) Define site navigation menus B) Instruct crawlers which URLs to allow or disallow C) Store user passwords securely D) Provide CSS resets Answer: B Explanation: robots.txt tells search engine bots which parts of the site they may or may not crawl. Question 30. Which HTML attribute enables lazy loading of images in modern browsers? A) loading="lazy" B) defer="true" C) async="true" D) preload="auto" Answer: A Explanation: The loading="lazy" attribute defers image loading until the image is near the viewport.

Question 31. In PHP, which function is used to safely prepare a SQL statement with placeholders? A) mysqli_query() B) pdo->prepare() C) mysql_connect() D) exec() Answer: B Explanation: PDO::prepare() creates a prepared statement, allowing bound parameters to prevent SQL injection. Question 32. Which of the following best describes “inheritance” in OOP? A) Restricting access to class members B) Defining methods that have the same name in different classes C) Creating a new class that reuses, extends, or modifies behavior of a parent class D) Instantiating multiple objects from the same class Answer: C Explanation: Inheritance allows a subclass to inherit properties and methods from a parent class. Question 33. What does the CSS property object-fit: cover; do to an <img> element? A) Stretches the image to fill its container, ignoring aspect ratio B) Scales the image to fill the container while preserving aspect ratio, cropping excess C) Centers the image without scaling D) Hides the image if it exceeds container size Answer: B Explanation: object-fit: cover scales the image to fill the container, maintaining aspect ratio and cropping overflow.

Explanation: async allows the script to be fetched in parallel and executed as soon as it’s downloaded, not halting HTML parsing. Question 37. Which HTTP header is used to indicate the content type of the response body? A) Content-Disposition B) Content-Type C) Accept D) User-Agent Answer: B Explanation: Content-Type tells the client how to interpret the response payload (e.g., text/html, application/json). Question 38. In a CMS that uses a relational database, which table typically stores user role definitions? A) users B) posts C) roles or user_roles D) options Answer: C Explanation: Role tables map role identifiers to permissions and are separate from user data. Question 39. Which of the following is a best practice for securing a CMS installation? A) Disabling HTTPS to improve speed B) Keeping core, themes, and plugins up to date C) Using default admin username “admin” D) Granting all users administrator rights

Answer: B Explanation: Regular updates patch known vulnerabilities, reducing the attack surface. Question 40. What does the npm install command do in the context of a CMS theme’s asset pipeline? A) Compiles Sass files B) Installs Node.js dependencies listed in package.json C) Deploys the site to production D) Generates a sitemap.xml Answer: B Explanation: npm install reads package.json and installs required Node packages locally. Question 41. Which of the following is a common cause of “white screen of death” in PHP‑based CMSs? A) Missing <!DOCTYPE html> declaration B) A fatal PHP error with error display disabled C) Incorrect CSS selector syntax D) Unoptimized image sizes Answer: B Explanation: When a fatal error occurs and display_errors is off, the script stops outputting anything, resulting in a blank page. Question 42. In a CMS, what is a “hook” primarily used for? A) Storing large binary files B) Modifying or extending core functionality without altering core files C) Defining database schema D) Managing user sessions

C) Editing wp-config.php D) Changing the database collation Answer: B Explanation: register_post_type() registers a new content type with WordPress, handling rewrite rules and UI integration. Question 46. In Drupal, which configuration entity stores site-wide settings such as site name and email? A) node.type B) system.site C) user.role D) block.block Answer: B Explanation: system.site holds core site configuration values. Question 47. What does the Content Security Policy (CSP) header help mitigate? A) SQL injection B) Cross‑site scripting (XSS) and data injection attacks C) DDoS attacks D) Server misconfiguration Answer: B Explanation: CSP restricts the sources from which a page can load resources, reducing XSS vectors. Question 48. Which of the following is a technique to reduce the size of JavaScript files for production? A) Adding more console.log statements

B) Using whitespace indentation C) Minification (e.g., via UglifyJS) D) Commenting out code without removing it Answer: C Explanation: Minifiers remove whitespace, comments, and shorten variable names to shrink file size. Question 49. In a CMS theme, which folder typically contains reusable UI components such as headers and footers? A) /assets B) /templates or /partials C) /uploads D) /config Answer: B Explanation: Template partials store snippets like header.php, footer.php, allowing inclusion across pages. Question 50. Which of the following is a primary benefit of using a CDN for static assets? A) Reducing server CPU usage by handling PHP execution B) Shortening latency by serving files from locations near the user C) Automatically generating SEO meta tags D) Enabling server‑side rendering of JavaScript Answer: B Explanation: CDNs cache static files on edge servers worldwide, delivering them faster to end users. Question 51. Which PHP function is used to start a session and store user‑specific data?

Question 54. In JavaScript, what does the event.preventDefault() method do? A) Stops the propagation of the event to parent elements B) Prevents the default browser action associated with the event C) Cancels all other event listeners on the element D) Forces the event to fire synchronously Answer: B Explanation: preventDefault() stops the browser’s default handling (e.g., following a link or submitting a form). Question 55. Which of the following HTTP status codes indicates that the resource has been moved permanently? A) 200 B) 301 C) 302 D) 404 Answer: B Explanation: 301 Moved Permanently tells clients and search engines that the URL has changed permanently. Question 56. In a CMS, what is the purpose of a “slug”? A) To store binary data B) To define a human‑readable URL segment for a piece of content C) To encrypt user passwords D) To manage database transactions Answer: B Explanation: A slug is a URL‑friendly string derived from a title, used in permalinks.

Question 57. Which of the following is a recommended method for handling large file uploads in a CMS? A) Storing them directly in the database as BLOBs B) Using a dedicated file storage service (e.g., S3) and storing references in the database C) Encoding them in base64 and saving in a text field D) Embedding them in HTML comments Answer: B Explanation: Offloading large files to object storage improves scalability and performance; the CMS stores the file URL. Question 58. Which of these is a valid way to declare a constant in PHP? A) $CONST_NAME = 'value'; B) define('CONST_NAME', 'value'); C) const CONST_NAME = 'value'; (inside a function) D) let CONST_NAME = 'value'; Answer: B Explanation: define() creates a global constant; const works only at class scope or top‑level, not inside functions. Question 59. Which of the following is a primary advantage of using GraphQL over REST for content delivery? A) Fixed endpoints for all data B) Ability to request exactly the fields needed, reducing over‑fetching C) Simpler caching mechanisms D) No need for authentication Answer: B