HTML CSS Reference/CSS Attributes and Javascript Style Properties/ important

Материал из Web эксперт
Перейти к: навигация, поиск

"!important" Example

    
<html>
<head>
<style type="text/css">
p { 
     font-size: 12pt !important; 
     font-style: italic 
}
</style>
</head>
<body>
<p>the style sheet.</p>
</body>
</html>



"!important" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <address>                     |
|                |<b>                             <big>                         |
|                |<blockquote>                    <body>                        |
|                |<caption>                       <center>                      |
|                |<cite>                          <code>                        |
|                |<col>                           <colgroup>                    |
|                |<dd>                            <dfn>                         |
|                |<dir>                           <div>                         |
|                |<dl>                            <dt>                          |
|                |<em>                            <form>                        |
|                |<hn>                            <html>                        |
|                |<i>                             <img>                         |
|                |<input>                         <input type="button">         |
|                |<input type="checkbox">         <input type="file">           |
|                |<input type="hidden">           <input type="image">          |
|                |<inputtype="password">          <input type="radio">          |
|                |<input type="reset">            <inputtype="submit">          |
|                |<input type="text">             <kbd>                         |
|                |<label>                         <legend>                      |
|                |<li>                            <listing>                     |
|                |<marquee>                       <menu>                        |
|                |<ol>                            <p>                           |
|                |<pre>                           <s>                           |
|                |<samp>                          <select>                      |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |<sub>                           <sup>                         |
|                |<table>                         <tbody>                       |
|                |<td>                            <textarea>                    |
|                |<tfoot>                         <th>                          |
|                |<thead>                         <tr>                          |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"!important" Syntax and Note

Note:
Adds more importance to a declaration.