Code Blocks Overview
Code blocks in Tettra pages allow you to feature formatted code. They look like this:
This is a code block.
Here are three common use cases:
Sharing a code snippet
You can share a small code snippet with your team using a code block. Here's an example of a short SQL query in a code block:
SELECT * FROM listings
WHERE host_id=12345678
GROUP BY [columnsī¸]
Making text stand out
A code block can be an alternative to a callout box. Here they are next to each other for comparison:
This is a code block.
This is a callout box.
As a caption for an image
An image will most often be centered in your Tettra page. You can use a code block to insert a caption beneath it, like this:
This is a cheerful pirate ship firing a cannonball.