Inline CSS

Below code is an example of ‘inline CSS’, where the styles are defined inside the individual tags.

 
        	1 <!-- css.html -->
2
3 <!DOCTYPE html>
4 <html>
5 <head>
6 <title>CSS Tutorial</title>
7
8 </head>
9 <body>
10
11 <h3 style="color:blue"> Heading 1 </h3>
12 <h3 style="color:blue"> Heading 3 </h3>
13 <h3 style="color:blue"> Heading 3 </h3>
14
15 </body>

In the above code, we have three ‘headings’ with font-color as ‘blue’. Suppose, we want to change the color to red, then we must go to to individual ‘h3’ tag and then change the color. This is easy in this case, but if we have 100 headings in 5 different ‘html’ files, then this process is not very handy. In such cases, CSS can be quite useful as shown in next section.

© Copyright 2025 | FolkLight Studios