• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress Blocks

WordPress Blocks

WordPress Blocks Reference

  • Home
  • Blocks
  • Plugins
  • Sitemap
  • Blog
  • Block news
  • About
Home / Blocks / Code – code snippets
Display code snippets that respect your spacing and tabs.

Use the Code block to display code snippets that respect your spacing and tabs.

Screenshot

Please set featured image

Example

<?php
echo ‘Hello from the code block’;

Notes

  • See also Preformatted

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Published: January 12, 2019 | Last updated: January 12, 2019

Information

Block type name: core/code
Variation name:
Documentation:
Plugin ref: Gutenberg
Block categories: formatting
Block keywords:
Block classification: Static
Block letters: C,S

Footer

WordPress Blocks Reference
WordPress Blocks
WordPress Blocks Reference

WordPress version: 5.6

Gutenberg version: 8.4.0

WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  blocks.wp-a2z.org
© Copyright WordPress Blocks Reference 2019-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites