Jump to content

Changing font size for half of a sentence - second half different color

Recommended Posts

Hello I am curious the best way to make a sentence with a different font size than the normal body text size, and with another part of the sentence in a different color, like gray -  Do i add a code block? seems like an easy thing yet I have looked around a lot and not quite finding the simple answer.  Also other text on the page using all the different template given text in text blocks.  Thanks 

Link to comment
  • Replies 1
  • Views 433
  • Created
  • Last Reply

Hi @newbie1892

Yes, a Code Block is the way to go. By default, any text you put into a Code Block will take the site-wide paragraph style, but you can override this by wrapping the text you want to change with span tags, like so:

<span style="font-size: 20px; color: #898989;">
Your Text Here
</span>

You can change the font size and colour to your liking.

Also important to mention that when you're entering text in a Code Block you need to put in line breaks manually. To do that you put br tags where you want the lines to break, like this:

<span style="font-size: 20px; color: #898989;">
  Paragraph 1
 <br>
 <br>
  Paragraph 2
</span>

 

Subscribe for Squarespace Tutorials 👉 https://www.youtube.com/mrjohnocp

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.