Website Building » Squarespace » What Is a Code Block in Squarespace?

What Is a Code Block in Squarespace?

Last updated on December 30, 2022 @ 8:31 pm

A code block in Squarespace is a section of code that is used to add custom functionality to your site. Code blocks can be used to add custom CSS, HTML, JavaScript, and other forms of code to your site.

What is a code block?

A code block in Squarespace is a section of code that is used to add custom functionality to your site.

How do I use a code block?

Code blocks are added to pages and posts using the Code Block content type. To add a Code Block, click the “+” icon, then select “Code Block” from the list of content types.

What are some things I can do with a code block?

There are many things you can do with a code block on your Squarespace site. Some common uses for code blocks include:

  • Adding custom CSS to style your site
  • Adding HTML or JavaScript to create custom functionality
  • Including third-party widgets or applications
  • Inserting raw HTML or CSS into a post or page
PRO TIP: Please be aware that the code block feature in Squarespace can be used to insert malicious code onto your website. Only use code blocks from trusted sources.

How do I style text in a code block?

You can style text in a code block using the <p>, <b> and <u> tags. For example:

This is some red text.

This is some blue text.
This is some green text.

A code block in Squarespace is a section of code that is used to add custom functionality to your site.

You can use a code block to do many things on your Squarespace site including adding custom CSS to style your site, adding HTML or JavaScript to create custom functionality, including third-party widgets or applications, inserting raw HTML or CSS into a post or page. You can style text within a code block using the <code> tag.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.