XHTML/ CSS - Styling More Than One Element
There are multiple ways of doing things in programming, and the main thing is it works. Instead of styling each element one at a time, you can style multiple elements using the same CSS block of code. (i.e. h2 {background-color: red; }, instead h2, h3 {background-color: red})
You can also use the <span> tag within your element to identify only a certain part that you want changed.
<p> Hello this is a <span> paragraph </span> and only the word paragraph is changed. </p>
By creating a span {} element in the CSS code you can change the <span> element while leaving the rest of the paragraph untouched.
https://www.youtube.com/watch?v=veKHw125UJs&index=23&list=PLC1322B5A0180C946
You can also use the <span> tag within your element to identify only a certain part that you want changed.
<p> Hello this is a <span> paragraph </span> and only the word paragraph is changed. </p>
By creating a span {} element in the CSS code you can change the <span> element while leaving the rest of the paragraph untouched.
https://www.youtube.com/watch?v=veKHw125UJs&index=23&list=PLC1322B5A0180C946
Comments