css code: how to change word font to a line of text

Adding different font to a line of text:


Have you ever admired a website with a stylish script font and a catchy tagline? Wondering how to achieve that same look for your Squarespace site? This is the code you've been waiting for!
Here's how to add bold text to a specific section on your Squarespace website:
  1. Navigate to the page containing the text you want to modify.
  2. Enter the page editor.
  3. Click on the text block.
  4. Highlight the desired text.
  5. Select the "bold" style option.
This will make the highlighted text appear bold, similar to the stylish script fonts you might have seen on other websites.
Then, copy and paste the code below into the CSS editor box:
/*DIFFERENT FONT ON LINE OF TEXT*/
h1 strong {
  font-weight: normal;
  font-family: maragsa !important;
  }
Make it yours!
  • Target element: Change **h1 text property** (currently highlighted in bold) to the element you want to style. This can be h1, h2, h3, or p.

Font change: Replace **font family** (currently highlighted) with the name of your desired font.

Previous
Previous

css code: Highlighted text effect

Next
Next

Why We Design Websites With Squarespace