ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

05-CSS Inline

Inline CSS is the most powerful out of the three types: external, internal, and inline. It means that by using this you can override styles that are stated in external or internal.

 

On the other hand, inline CSS divert away from the true intention of CSS, to separate design from content, so use it carefully.

 

Example:

<div style=”background: blue; color: white;”>
A background and font color using inline CSS
</div>

 

Result

A background and font color using inline CSS

 

Another example:

<div style=”background: url(http://itsourcecode.com/wp-content/uploads/2015/10/bgimage.png); height:170px; width:330px; align:center”>
</div>

 

Result

 bgimage

 

 

Facebook Comments

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!