2 minutes to learn CSS inline style

Inline style
style definition: used to assist in beautifying HTML, so that the effect of higher color pages, more easily attract users. You can set the style attribute rich color, background, layout, etc. for the website.

style attribute tag Tags used to help define the inline style, line style format illustrated, style used as a marker, as an internal write format: key: value; data object to indicate a specific style.

<div style="color: red;">
    Hello World !
</div>

However, in many cases the tag, if a large number of stacked line style in a page, the page will be so cumbersome redundancy, the following example:

<div style="width: 100px; height: 100px; color: red; 
background-color: green; font-size: 20px; font-weight: bold; 
line-height: 20px; text-align: center;">
大量堆积内嵌样式
</div>

Guess you like

Origin blog.51cto.com/14436164/2418324
Recommended