Skip link
Skip link with default arguments
Input
p To view the skip link component, tab to this example --- or click inside this example and press tab.
= govuk_skip_link
<p>To view the skip link component, tab to this example --- or click inside this example and press tab.
</p>
<%= govuk_skip_link %>
Output
To view the skip link component, tab to this example — or click inside this example and press tab.
Skip to main content<p>
To view the skip link component, tab to this example --- or click inside this example and press tab.
</p>
<a class="govuk-skip-link" data-module="govuk-skip-link" href="#main-content">
Skip to main content
</a>
Skip link with custom target and text
Input
p To view the skip link component, tab to this example --- or click inside this example and press tab.
= govuk_skip_link(href: "#some-other-id", text: "Jump to the important bits")
<p>To view the skip link component, tab to this example --- or click inside this example and press tab.
</p>
<%= govuk_skip_link(href: "#some-other-id", text: "Jump to the important bits") %>
Output
To view the skip link component, tab to this example — or click inside this example and press tab.
Jump to the important bits<p>
To view the skip link component, tab to this example --- or click inside this example and press tab.
</p>
<a class="govuk-skip-link" data-module="govuk-skip-link" href="#some-other-id">
Jump to the important bits
</a>