Chapter 3B
(This unit covers changing
Font’s color through in-line styling)
As I told you earlier, you can use in-line style attribute not
only with <p> but with many other tags as well.
Let’s take an example through heading tag. We will change
the font color in heading.
The style attribute for changing font color is very much
similar to the syntax we use in previous chapter for changing font size. The only
thing we need to change is its attribute (i.e font-size) and its value (i.e.
20px) from previous syntax with new attribute (i.e color) and its value (i.e. red) respectively.
For E.g.
For better understanding lets do the changes we need in the code.
Click on the Image to Enlarge |
The above example changes the color of font from default
(i.e. black) to Blue.
Let's do the changes in above mentioned example only but in the paragraph section.
Click on the image to enlarge |
In the above example, we changed the paragraph's font size to 20px and color to red at once through in-line styling.
For any query related to this topic,please leave comment.
Do not spam as it will be removed.
Do not spam as it will be removed.
0 comments:
Post a Comment