html - How do you use one class for multiple tags? -


i want use 1 class 2 different tags. have declare <h1 class="line"> , <p class="line"> ??? , in css .line , change both then? please help. thanks

you need declare class within css:

.line {     background-color: red; } 

and can apply class html elements:

<tag1 class="line" /> <tag2 class="line" /> 

Comments

Popular posts from this blog

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -

java - the value of local variable is not used -