Overview
A code block is formatted text within a container.
Sample element
Demos
View a live version of this element to see how it can be customized.
<rh-code-block>
<script type="text/text">Error: Error creating network Load Balancer: AccessDenied: User:
arn:aws:sts::970xxxxxxxxx:assumed-role/ManagedOpenShift-Installer-Role/163xxxxxxxxxxxxxxxx is
not authorized to perform: iam:CreateServiceLinkedRole on resource:
arn:aws:iam::970xxxxxxxxx:role/aws-service-role/elasticloadbalancing.amazonaws.com/
AWSServiceRoleForElasticLoadBalancing</script>
</rh-code-block>
<script type="module">
import '@rhds/elements/rh-code-block/rh-code-block.js';
</script>
<rh-code-block>
demo in a new tabWhen to use
- When you need to highlight a block of code while maintaining the formatting
Related elements or patterns
Feedback
To give feedback about anything on this page, contact us.
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit