A
A
Alexander2018-02-11 11:07:39
JavaScript
Alexander, 2018-02-11 11:07:39

How to style html tag?

You need to add style to. Despite the fact that you need to add it not in css, but directly in the html tag

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Tsvetkov, 2018-02-11
@AleksandrB

element.style.color = "red";
element.style.background = "green";

or
element.style.cssText = "color:red;background:green";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question