CSS has a lesser-known :target selector to style an element that matches the element linked in the page hash. When someone is linked to https://mailcoach.app/#how-to-send-a-campaign, the target selector can be used to make the title stand out between the rest of the content. We can also display hidden content with the :target selector.

With the :target selector, we can set up a Mailcoach subscribe form with a custom success message.

The :target selector is a great way to display a message without creating a separate confirmation page or relying on JavaScript.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners