Skip to main content
20240603
Inspiring
June 7, 2021
Question

How to use colors in editing

  • June 7, 2021
  • 2 replies
  • 162 views

I edit html file on DW. I open a file and edit it on Design view. Suppose I type a word "red" How can I choose the color of the font? 

This topic has been closed for replies.

2 replies

Nancy OShea
Community Expert
Community Expert
June 7, 2021

Or if you use Bootstrap, use one of the built-in contextual classes on your paragraph or heading tag.

 

<h2 class="text-danger">This heading is red</h2>

 

Bootstrap contextual classes:

  • primary
  • secondary
  • danger
  • success
  • warning
  • info
  • light
  • dark

https://getbootstrap.com/docs/4.0/components/list-group/#contextual-classes

 

Contextual colors come from your Bootstrap Theme (SASS, mixins & variables).

https://getbootstrap.com/docs/4.0/getting-started/theming/

 

Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
June 7, 2021

Font colors are set using CSS.

In your external style sheet, create a new class...

.redtext {

color:red;
}

Then, in your Code or Design View, highlight the text and hit Ctrl/Cmnd + T to wrap the text in a set of span tags...

<span>the text you want to turn red</span>

You then apply the redtext class to the span tag...

<span class="redtext">the text you want to turn red</span>