HubSpot CMS for Developers II certification answers

This file contains all possible real exam questions with 100% correct and verified answers. HubSpot CMS for Developers II (Best Practices). Free updates included. Save your time.





Below you’ll find some selected questions from the latest real certification exam. You can get an idea about the exam format and prepare for it smarter. Need all exam questions with answers? Consider downloading our file.

Creating a user interface that is consistent across pages adheres to which WCAG principle?

  • Perceivability
  • Operability
  • Understandability
  • Robustness

Providing text alternatives for non-text content adheres to which WCAG principle?

  • Perceivability
  • Operability
  • Understandability
  • Robustness

True or false? Comprehensive knowledge of the WCAG is necessary before beginning to implement web accessibility best practices.

  • True
  • False

True or false? Every element should have alternative text.

  • True
  • False

True or false? If your website doesn’t have automatically detectable accessibility issues, it might still have accessibility barriers.

  • True
  • False

Select all that apply. What are some web accessibility best practices you should account for near the beginning of a project?

  • Creating large enough clickable areas in prototypes
  • Designing copy and buttons with sufficient color contrast
  • Testing all of your project’s custom modules for accessibility
  • Being thoughtful about the tab order of your site

Select all that apply. When performing manual keyboard testing on your page, what should you check for?

  • That the appropriate elements receive focus
  • That images have alternative text
  • That focused elements have an outline or other visual indicator so they can be easily identified
  • That the tab order makes intuitive sense

Select all that apply. Which elements should receive focus as you tab through a web page?

  • button elements
  • anchor elements
  • h1 elements
  • input elements

Select all that apply. Which of the following are HTML semantic elements?

  • span
  • main
  • header
  • nav

Select all that apply. Which of the following is an example of a web accessibility optimization that also benefits most of your users?

  • Using generic link text like “click here”
  • Using sufficient color contrast between foreground text and the background
  • Removing the outline from focused elements
  • Developing a well-organized user interface


Passing exams is not a workout. Multiple attempts won’t make you stronger.

Save your time with our answer-sheets. Get certified in minutes.



Which of the following is NOT a common accessibility error found on web pages?

  • Missing h4 elements
  • Missing form input labels
  • Missing alternative text for images
  • Low contrast text

Which of the following is NOT a web accessibility best practice?

  • Including a skip to content link
  • Removing the outline from focused elements using CSS
  • Using landmark elements
  • Including labels for form inputs

Writing valid HTML adheres to which WCAG principle?

  • Perceivability
  • Operability
  • Understandability
  • Robustness

Consider the line of code below. If you were to load a script in this way, what would be the result? {{ require_js(get_asset_url("./path/to/file.js"), { async: true }) }}

  • The script would be added to the head of the document with an async attribute.
  • The script would be added before the closing body tag with a defer attribute.
  • The script would be added to the head of the document with a defer attribute.
  • The script would be added before the closing body tag with an async attribute.

Fill in the blank: _____________ refers to how long it takes the browser to take your site’s files and paint the pixels to the page.

  • Loading performance
  • First Input Delay
  • Time to Interactive
  • Rendering performance

Fill in the blank: _______ is the process through which all unnecessary characters are removed from a file.

  • Minification
  • Fetching
  • Caching
  • Deferring

Fill in the blank: Add the ________ attribute to your script to tell the browser to execute it after construction of the DOM.

  • defer
  • preload
  • async
  • integrity

Fill in the blank: Adding width and height attributes to images helps reduce _________________.

  • First Input Delay
  • Total Blocking Time
  • Cumulative Layout Shift
  • Time to Interactive

The ____________ is the browser’s representation of the page’s styles.

  • First Contentful Paint
  • DOM
  • render tree
  • CSSOM

Fill in the blank. Defer loading of non-critical CSS by adding ______ as an argument in your require_css function call.

  • { defer: true }
  • { position: footer }
  • { type: defer }
  • { async: true }

If your site has consistently poor Total Blocking Time scores, which approach should you take to improve this metric?

  • Remove all videos from your site that are 1MB or larger
  • Optimize images and use srcset and sizes attributes to provide the browser multiple image options depending on the user’s device
  • Self-host fonts instead of fetching them from a third party
  • Reduce the total amount of JavaScript loaded on your site while also efficiently loading the site’s JavaScript

Select all that apply. Which of the following are examples of render-blocking resources?

  • CSS files
  • Large video files
  • Font files
  • JavaScript files

Select all that apply. What can you do to optimize images within a custom module?

  • Set the image’s loading attribute to “lazy,” by default
  • Add width and height attributes to the image
  • Use the resize_image_url function to resize the image
  • Use srcset and sizes attributes

Select all that apply. What is First Input Delay?

  • A measure of interactivity
  • Another term for Time to Interactive
  • A measure of loading performance
  • A Core Web Vital

What is the final step of the Critical Rendering Path?

  • Layout
  • Paint
  • Interactivity
  • Construction of the render tree

What is the first step of the Critical Rendering Path?

  • Construction of the CSSOM
  • Parsing of the HTML and construction of the DOM
  • Calculating the position and styles of each element
  • Sending a GET request to the server for the page’s HTML

Select all that apply. Which of the following are Core Web Vitals?

  • Total Blocking Time
  • First Input Delay
  • First Contentful Paint
  • Cumulative Layout Shift

Which of the following is most likely to block page interactivity?

  • Inline CSS
  • Large video files
  • Unoptimized images
  • Heavy JavaScript execution

Which of the following is NOT a step in the Critical Rendering Path?

  • Paint
  • Layout
  • Creation of the render tree
  • First Input Delay

Fill in the blank: Use the __________ tag to include multiple CSS partial files within a single CSS file.

  • include
  • require_css
  • scope_css
  • extends

Select all that apply. How can you help content creators more easily work with modules?

  • Use a description of the elements in the module to name it
  • Include help text that describes the module
  • Name a module using its purpose (e.g., “Sign up module”)
  • Include default content for required module fields

In the CMS Boilerplate, what is the filename of the common template used as the foundation for all page templates?

  • layout.html
  • index.html
  • home.html
  • base.html

True or false? All themes must contain at least 10 section templates.

  • True
  • False

True or false? You can add a brand setting token to a theme’s fields.json file to allow content editors to edit its value.

  • True
  • False

What would you use to access the tertiary brand color in a theme’s fields.json file?

  • brandSettings.colors[2]
  • brandSettings.TertiaryColor
  • brandSettings.colors[3]
  • brandSettings.tertiaryColor

Select all that apply. When should you create a section template instead of a module?

  • When you want to create a fixed layout page area for content editors to use
  • When you have multiple page elements organized in a specific layout
  • When you want to provide maximum flexibility to content editors
  • When you want to create a full-width page area

Select all that apply. Where can you access a brand logo that you’ve set in your account’s brand settings?

  • Within HTML + HubL files
  • Within CSS + HubL files
  • Within a module’s fields.json file
  • Within a theme’s fields.json file

Select all that apply. Which of the following fields should you include in your theme’s fields.json file?

  • Color and font controls for forms
  • Global color fields
  • Global font fields
  • Color and font controls for buttons

Select all that apply. Which of the following best describes modules?

  • Good for reorganizing into custom layouts
  • Atomic
  • Span less than the full width of the page
  • Full-width, fixed layout elements

Which of the following is NOT a system template?

  • Blog listing page template
  • 404 template
  • Password prompt template
  • Search results template

Which of the following is NOT a valid brand logo attribute?

  • brandSettings.primaryLogo.alt
  • brandSettings.primaryLogo.url
  • brandSettings.primaryLogo.width
  • brandSettings.primaryLogo.src

Select all that apply. Which of the following module elements would be a good candidate for a style field?

  • Text color
  • An image with alternative text
  • A button link
  • A background image

Which of the following section template annotations will help a content editor easily visualize a section in the page editor?

  • label
  • description
  • templateType
  • screenshotPath

Which of the following would be NOT be an appropriate class name to use in a theme called “Blue Horizons”?

  • bh-button
  • blue-horizons-header
  • button
  • bh-header

Select all that apply. Which style fields have a generated .css property?

  • Border
  • Gradient
  • Width
  • Background image

Within a module, where should you place instance-specific styles?

  • Within the module.css portion of the module
  • Within the module.html portion of the module
  • Within the module.js portion of the module
  • Within the module’s meta.json file

Fill in the blank: Google recommends a font size of at least _______ on at least 60% of the text on your page.

  • 14px
  • 16px
  • 12px
  • 18px

Fill in the blank: Google recommends that tap targets should be at least ___________ apart from each other.

  • 8px
  • 10px
  • 12px
  • 16px

Fill in the blank: If you want a page’s new URL to appear in search results, use _____________.

  • a temporary redirect
  • structured data
  • a permanent redirect
  • your website’s sitemap

Fill in the blank: Sitemaps are _______ files that provide search engines information about the structure of your site.

  • HTML
  • JSON-LD
  • JavaScript
  • XML

Fill in the blank: The primary function of a robots.txt file is_______________.

  • to prevent pages from appearing in search results
  • to tell search engines about which of your site’s pages you’d like them to crawl
  • to prevent your site from being overloaded with requests by crawlers
  • to control exactly which pages appear in search results

Fill in the blank. If you want a page that’s temporarily down to still appear in search results for some time, use _____________.

  • a permanent redirect
  • your site’s robots.txt file
  • the noindex meta tag
  • a temporary redirect

Select all that apply: In order to account for mobile-first indexing, you should:

  • Create a mobile-friendly website.
  • Use the same content on your mobile site as your desktop site.
  • Maintain separate and different versions of your mobile and desktop sites.
  • Use the same meta tags on both the desktop and mobile versions of your site.

True or false: Using structured data guarantees that Google will make a rich snippet for your page.

  • True
  • False

Select all that apply. What can you use sitemaps for?

  • To stop content from being crawled and indexed
  • To tell search engines about what pages and files you think are important on your site
  • To help search engines find and understand media content and news articles
  • To control what pages appear in search results and the order in which they appear

What effect will this line in robots.txt have on Google’s crawling behavior? # Disallow: /

  • It will disallow crawling of every page and resource on the site
  • It will disallow crawling of the home page only
  • It will allow crawling of the home page only
  • It will not have any effect on crawling

Select all that apply. What is a canonical URL?

  • Something that’s useful if you have a single page accessible by multiple URLs
  • The URL to the duplicate version of a main pillar page
  • The URL to the version of a page that should be crawled and indexed
  • Something that’s useful if you have multiple pages with similar content

Select all that apply. When might you use a redirect?

  • When moving your site to a new domain
  • When you’ve moved a page to a new URL
  • When you have multiple URLs for your site
  • When you need to prevent a page from appearing in search results

Select all that apply. Which of the following will prevent a page from appearing in Google’s search results?

  • Adding a noindex meta tag to the page
  • Disallowing crawling of the page in robots.txt
  • Password-protecting the page
  • Omitting the page’s meta title and description

Scenario: Your colleague has told you that they’d like a landing page to not appear in search results. You notice that this landing page URL is already disallowed in robots.txt. What should you do to guarantee the page doesn’t appear in Google’s search results?

  • Add a noindex meta tag to the page
  • Remove the page’s URL from the robots.txt file and add a noindex meta tag to the page
  • Nothing. Because the page URL is already disallowed in robots.txt, it can never appear in Google’s search results
  • Remove the meta title and description from the page so that Google can’t display it in SERPs.

To make it easier for individuals using assistive technology to navigate your page, use _________ to organize the page’s content.

  • sufficient color contrast
  • non-semantic elements
  • landmarks
  • alternative text

Fill in the blank: Use a _________ class to hide elements visually while keeping them accessible to screen readers.

  • h4
  • sr-only
  • header
  • form-label

The WCAG are broadly divided into four principles. Which of the following is NOT one of those principles?

  • Operable
  • Perceivable
  • Comprehensible
  • Understandable

True or false? Automated testing is sufficient to test for appropriate use of alternative text.

  • True
  • False

Which of the following is NOT an element of manual accessibility testing?

  • Using a browser extension to audit your page
  • Keyboard testing
  • Zooming in on your page using the browser’s native zooming feature
  • Screen reader testing

Consider this scenario: You are loading a script (script 1) on your page which two other scripts rely on to function (scripts 2 and 3). All of these scripts can be safely executed after construction of the DOM. Which of the following approaches would work when loading these scripts? Select all that apply.

  • Load all of the scripts asynchrously so they don’t block DOM construction while the browser fetches them, but make sure to include script 1 first in the HTML.
  • Load script 1 normally (without an async or defer) attribute and load scripts 2 and 3 with the defer attribute.
  • Load all 3 scripts with the defer attribute, making sure to include script 1 first in the HTML.
  • It doesn’t matter. The scripts can be executed in any order.

Fill in the blank. Many browsers support native image lazy-loading using the _________ attribute.

  • defer
  • async
  • preload
  • loading
  • 3 seconds
  • 5 seconds
  • 2.5 seconds
  • 1 second

Select all that apply. What is Cumulative Layout Shift?

  • A Core Web Vital
  • A measure of loading performance
  • A measure of interactivity
  • A measure of visual stability

What is Largest Contentful Paint?

  • A measure of how long it takes the browser to load and render the largest element visible in the viewport
  • A measure of how long it takes the browser to render the first piece of DOM content after a user navigates to your page
  • A measure of visual stability
  • Both A & C

Which HubL function can you use to control the size of the images that appear on your website?

  • require_js
  • resize_image_url
  • require_css
  • get_asset_url

Fill in the blank: When a boolean field controls a major layout change, use a _________.

  • field group
  • checkbox
  • content field
  • toggle switch

True or false? Sections provide a built-in way to set a background image.

  • True
  • False

Select all that apply. Where can you access a brand color that you’ve set in the account’s brand settings?

  • Within an HTML + HubL file
  • Within a CSS + HubL file
  • Within a module’s fields.json file
  • Within a theme’s fields.json file

A ____________ status code indicates a temporary redirect.

  • 200
  • 301
  • 302
  • 404

Fill in the blank: Google’s main crawler is known as __________.

  • Google Spider
  • Searchbot
  • the Google Crawler
  • Googlebot

Fill in the blank: Your page must undergo_________, in order for Google to view any JavaScript-generated content.

  • rendering
  • indexing
  • ranking
  • crawling

Select all that apply. When it comes to SEO, developers are usually responsible for:

  • Some elements of technical SEO.
  • Some elements of off-page SEO.
  • Some elements of on-page SEO.
  • Implementing structured data.
  • JSON
  • Microdata
  • JSON-LD
  • RDFa

Which of the following is NOT a component of how a web page ends up in search results?

  • Rendering
  • Navigating
  • Indexing
  • Crawling

Creating a form that can be completed and submitted using the keyboard only adheres to which WCAG principle?

  • Robustness
  • Perceivability
  • Understandability
  • Operability

True or false? Part of making a form input accessible is including include a label for the input.

  • True
  • False

Fill in the blank: Use the ________ statement to use the same base template across multiple page templates.

  • include
  • extends
  • set
  • require_html

Fill in the blank: Google displays structured data in SERPs as _________.

  • featured snippets
  • a blog post schema
  • a featured image
  • rich results
  • View our course catalog
  • Learn more
  • Fill out our contact form
  • Click here

Select all that apply. Which of the following make page navigation more efficient for those using assistive technology?

  • A skip to content link
  • A valid heading hierarchy
  • Landmarks
  • Including labels for form controls

Fill in the blank: The ___________ is a combination of both the DOM and CSSOM.

  • render tree
  • Largest Contentful Paint
  • Cumulative Layout Shift
  • Critical Rendering Path

Which file does the CMS Boilerplate use to apply the styles set in the theme’s settings?

  • main.css
  • fields.css
  • theme-overrides.css
  • _layout.css
  • nav
  • main
  • header
  • section