HTMLCodeBlockElement
Code block custom element with syntax highlighting and copy button.
It is recommended that the following CSS be loaded for before JavaScript works
With escaped text
Source
Result
With the textarea element
Source
Note: The textarea element cannot be included in the content of the textarea element. If you want to include it, please use HTML Entity for the tag.
Result
Playground
Let's paste these in conosole to run JS on this page.
Hello world
This is sample markup.