Embedded Pens put code and previews on your site.
When you're demonstrating something about the web, there is nothing better than showing people the real code and the real output of that code. The proof is in the pudding, they say.
Embedded Pens are perfect for:
- Blog Posts
- Reduced Test Cases
- Isolated Demos
Embedded Pens can be editable.
Just like the Editor on CodePen itself! The preview is updated as you type. This is great for encouraging your visitors to play with your code. They don't have to leave your site to start learning and experimenting.
Among other things, this is feature is great for documentation or for demos where people are expected to customize the code for their needs.
Editable Embeds are a PRO feature.
You have total style control over Embedded Pens. Make them match your look.
Embedded Pens use themes. Themes control all the styles and colors in use. That way Embedded Pens don't have to look like CodePen, they can look like you. They can match your brand and your preferences.
Even better: when the look of your site changes, it's no problem. Just update the theme and all your Embedded Pens using that theme update immediately.
All users have one theme. PRO users get unlimited themes and the ability to apply Custom CSS to themes, giving you 100% design control, including the ability to hide the Tab Bar.
You control what people see in embeds.
Wanna show just the preview? No problem. How about just the code? Sure. Split between both? That's a great way to show off the power of code.
It really depends on a Pen-by-Pen basis what makes the most sense to show. Our embeds allow you to customize that easily. Just click which tabs you want active by default.
There is even an
postMessage API for changing tabs, if you need to get even more interactive.
You can embed any Pen on CodePen.
Just click the Embed button in the footer of the editor and it will pop up a screen that gives you the code you need and allows you to customize things like what tabs are visible and the height.
Private Pens are embeddable too.
WordPress, Medium, Ello, Discourse...