0

How to add color to the html 5 <td> data?

for eg:

<td>{ this.props.item.status }</td> 

Here I have to highlight status with some color.

Could anyone help me out on this?

4

1 Answer 1

0

You can use style tag in order to add style to your element:

    let tdStyle = {
        color: 'white',
    }
    <td style={tdStyle}>{ this.props.item.status }</td>

You can check official documentation here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.