HTML CSS Reference/HTML Attributes Reference/size

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

"size" Example

    
<HTML>
<head><Title>Example For</Title></head>
<BODY>
<font size="14">Text</font>
<hr size=15 color="red">
   <input type="text" size="100">
      <select size="10">
         <option>option 1</option>
         <option>option 2</option>
         <option>option 3</option>
         <option>option 4</option>
         <option>option 5</option>
         <option>option 6</option>
         <option>option 7</option>
         <option>option 8</option>
      </select>
</BODY>
</HTML>



size is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<basefont>                      <font>                        |
|                |<hr>                            <input type="button">         |
|                |<inputtype="checkbox">          <input type="file">           |
|                |<input type="image">            <inputtype="password">        |
|                |<input type="radio">            <input type="reset">          |
|                |<inputtype="submit">            <input type="text">           |
|                |<select>                        <spacer>                      |
+----------------+--------------------------------------------------------------+



"size" Syntax and Note

Note:
    
This attribute sets the font size in an element block. 
Later versions of Internet Explorer no longer favor this attribute.
In the case of the <input> element, the size represents the element 
width in characters. 
In the case of the <select> element, the size is the rows to be displayed.
    
Syntax:
    
<element size="value"> . . . </element>