
Sass Tutorial: SCSS, Mixins, Modules, and Exercises
12/05/2024
Advanced HTML and CSS Practice Exams
17/05/2024When you add Google reCAPTCHA v3 to a website, its badge normally appears on the page. Here is what the badge does, when Google permits you to hide it, and how to do so with CSS.
1. What is Google reCAPTCHA?
Google reCAPTCHA helps protect websites against spam and automated abuse. Some reCAPTCHA v2 challenges ask visitors to select images containing buses, roads, or traffic lights. Those challenges are one signal the service can use to distinguish ordinary visitors from automated requests.
reCAPTCHA v3 takes a different approach. Instead of presenting an image challenge, it runs in the background. It returns a risk score for an action based on the signals available to the service. Site owners decide how to respond to that score.
Removing the visual challenge can make it easier for visitors to complete a task. They can submit a form without first having to solve an image puzzle.
Integrations often show a badge in the lower-right corner. That raises a practical question: can you hide the badge while keeping the protection and attribution in place?
2. Advantages and drawbacks of Google reCAPTCHA v3
Version 3 runs in the background. For an action such as submitting a form, the integration obtains a score and can use it to decide whether to accept the action or ask for another check.
The advantage is a smoother experience. Visitors can continue with an action such as checking out or completing a contact form without pausing for an image challenge.
Because there is no visible prompt, website administrators need another way to assess how well the integration is working. Review scores and real outcomes before changing the threshold, so legitimate requests still go through.
The integration also loads and executes third-party resources and processes signals from the visit. Consider how it affects privacy and measure its performance on the devices your visitors actually use, especially older ones.
3. Can you hide the reCAPTCHA v3 badge?
Yes. The official Google documentation allows it when reCAPTCHA branding remains visible in the user flow. Keep the notice and its links where the visitor encounters the protected action.
4. What notice should you display?
Add clear wording explaining that reCAPTCHA protects the site and linking to Google’s privacy policy and terms. Here is an example:
This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.
Put the notice next to the protected form or control, where visitors can see it before submitting. Consult the reCAPTCHA FAQ for Google’s example.
5. How to hide the badge with CSS
Google documents the following CSS rule for hiding the badge:
.grecaptcha-badge {
visibility: hidden;
}
The recommended property is visibility: hidden. It hides the badge visually and leaves the integration active.
- Layout:
visibility: hiddenpreserves an element’s layout box if the element participates in the normal flow. A fixed-position badge is already outside that flow. - Attribution: The visible notice in the user flow is what satisfies Google’s branding condition. Hiding the badge in CSS by itself does not provide that notice.
Other approaches are less predictable.
Using display: none
- Layout: An element styled with
display: nonegenerates no layout box. Google’s documented approach usesvisibility: hidden. - Attribution: Any method that hides the badge still requires clear, visible attribution.
Changing its position
- Overlaps: Moving the badge off-screen or into another corner can cover controls at some screen widths.
- Maintenance: Positioning overrides can be harder to maintain across theme changes, devices, and layout breakpoints.
You can therefore hide the badge using the documented rule if you show the reCAPTCHA notice in the protected user flow. Test the form after applying the CSS.