skip to Main Content

I tried

<p color="primary">foo</p>

and

<p style="color: primary">foo</p>

but neither works. How do I make my text colour primary?

2

Answers


  1. Chosen as BEST ANSWER

    As per James Ashok's comment:

    <p class="text-primary">foo</p>
    

  2. instead of

    <p style="color: primary">foo</p>
    

    try this

    <p style="color: primary;">foo</p>
    

    or you can use something like this:

    <style>
        .primary-color {
            color: primary;
        }
    </style>
    
    <p class="primary-color">foo</p>
    

    how ever if you have any custom color code you have to replace it like this

    .primary-color {
        color: #ffffff; /* Replace #ff0000  */
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search