HTML CSS Reference/CSS Attributes and Javascript Style Properties

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

"font" Example

   <source lang="html4strict">
   

<html> <body>

font font

       Move the mouse over and out to change the font style.

</body> </html>


     </source>
   
  


"font-face" Example

   <source lang="html4strict">
   

<head> <style type="text/css"> @font-face { font-family: Lucida;

            font-style: normal; 
            font-weight: normal; 
            src: url("fontFile.eot")
          }

</style> </head> <body>

Paragraph text

</body> </html>


     </source>
   
  


"font-face" Syntax and Note

   <source lang="html4strict">

Note: Set a downloadable font.


     </source>
   
  


"font-family" Example

   <source lang="html4strict">
   

<html> <body>

    Move the mouse over and out to change the font-family value.

</body> </html>


     </source>
   
  


"font-family" is applied to

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | <basefont> |

| |
|

| |<body> <button> |

| |
|

| | | | |<col> <colgroup> | | |currentStyle <custom> | | |

defaults | | | <dir> |

| |
|

| |

| | |<fieldset> <form> | | |<hn> <html> | | | <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<inputtype="reset"> <input type="submit"> | | |<input type="text"> <isindex> | | | <label> |

| |<legend>
  • | | |<listing> <marquee> | | |<menu>
      | | |

                               |
      |                |runtimeStyle                                               |
      |                |                          <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |style                                                    |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                             
        | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

        "font-family" Possible Values

        <source lang="html4strict"> Possible Values Available font families supported by the browser"s operating system. For example, Times, Helvetica, Zapf-Chancery, Western, Courier, serif, sans-serif, cursive, fantasy, ormonospace.


        </source>



        "font-family" Syntax and Note

        <source lang="html4strict"> Note: Set font family. Syntax:

        element { font-family: value } elementID.style.fontFamily = "value" document.all.elementID.style.fontFamily = "value" // IE only


        </source>



        "font" is applied to

        <source lang="html4strict"> +----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | |

        | |
        <body> |

        | |<button>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |
      |

      | |
      |

      | | <col> | | |<colgroup> <custom> | | |

      defaults | | | <dir> |

      | |
      |

      | |

      | | |<fieldset> <form> | | |<hn> <html> | | | <img> | | |<inputtype="button"> <input type="checkbox"> | | |<input type="file"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <inputtype="submit"> | | |<input type="text"> <isindex> | | | <label> |

      | |<legend>
    1. | | |<listing> <marquee> | | |<menu> <nobr> | | |

        | | |

                                   runtimeStyle                  |
        |                |                                                     |
        |                |<select>                                               |
        |                |                                                |
        |                |                        style                         |
        |                |                                                    |
        |                |                         <tbody>                       |
        |                |                          |
        |                |                                                       |
        |                |
          | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

          "font" Possible Values

          <source lang="html4strict"> Possible Values CSS font constants: caption font used for captioned controls (buttons, drop-downs, and so on) icon font used to label icons menu font for menus and drop-down lists message-box font for dialog boxes small-caption font for labeling small controls status-bar font in the window status bars

          </source>



          "font-size" Example

          <source lang="html4strict">

          <html> <body>

          text.


          Move the mouse pointer to change the font-size value.

          </body> </html>


          </source>



          "font-size" is applied to

          <source lang="html4strict"> +----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | <basefont> |

          | |
          |

          | |<body> <button> |

          | |

        <textarea> | | |<tfoot> | | |<thead>
        |

        | | | | |<col> <colgroup> | | |currentStyle <custom> | | |

        defaults | | | <dir> |

        | |
        |

        | |

        | | |<fieldset> <form> | | |<hn> <html> | | | <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<inputtype="reset"> <input type="submit"> | | |<input type="text"> <isindex> | | | <label> |

        | |<legend>
      1. | | |<listing> <marquee> | | |<menu>
          | | |

                                   |
          |                |runtimeStyle                                               |
          |                |                          <select>                      |
          |                |                                                 |
          |                |                                              |
          |                |style                                                    |
          |                |                                                  |
          |                |<tbody>                                                   |
          |                |                             
            | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

            "font-size" Possible Values

            <source lang="html4strict"> Possible Values absolute Any of the following values: xx-small, x-small, small, medium, large, x-large, xx-large


            relative The font size is relative to the parent element"s font size,values are either larger or smaller length A floating point number followed by a unit designator percentage specifies the size relativeto the parent element"s font size


            </source>



            "font-size" Syntax and Note

            <source lang="html4strict"> Note: Set the font size. Syntax:

            element { font-size: value } elementID.style.fontSize = "value" document.all.elementID.style.fontSize = "value" // IE only


            </source>



            "font-style" Example

            <source lang="html4strict">

            <html> <body>

            Move the mouse pointer to change the font style value.

            </body> </html>


            </source>



            "font-style" is applied to

            <source lang="html4strict"> +----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | <basefont> |

            | |
            |

            | |<body> <button> |

            | |

          |

          | |<textarea> <tfoot> |

          | |
          <thead> | | |
          |

          | | | | |<col> <colgroup> | | |currentStyle <custom> | | |

          defaults | | | <dir> |

          | |
          |

          | |

          | | |<fieldset> <form> | | |<hn> <html> | | | <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<inputtype="reset"> <input type="submit"> | | |<input type="text"> <isindex> | | | <label> |

          | |<legend>
        1. | | |<listing> <marquee> | | |<menu>
            | | |

                                     |
            |                |runtimeStyle                                               |
            |                |                          <select>                      |
            |                |                                                 |
            |                |                                              |
            |                |style                                                    |
            |                |                                                  |
            |                |<tbody>                                                   |
            |                |                             
              | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

              "font-style" Possible Values

              <source lang="html4strict"> Possible Values normal the default italic, IE only oblique IE only


              </source>



              "font-style" Syntax and Note

              <source lang="html4strict"> Note: the font style.

              Syntax:

              element { font-style: value } elementID.style.fontStyle = "value" document.all.elementID.style.fontStyle = "value" // IE only


              </source>



              "font" Syntax and Note

              <source lang="html4strict"> Note: Set the font style properties: font-family, font-style, font-size, font-variant, font-weight, line-height. Syntax:

              element { font: values } elementID.style.font = "value" document.all.elementID.style.font = "values" // IE only


              </source>



              "font-variant" Example

              <source lang="html4strict">

              <html> <body>

              Move the mouse to change the font-variant value.

              </body> <html>


              </source>



              "font-variant" is applied to

              <source lang="html4strict"> +----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | |

              | |
              <body> |

              | |<button>

            |

            | |<textarea> <tfoot> |

            | |
            <thead> | | |
            |

            | |
            |

            | | <col> | | |<colgroup> currentStyle | | |<custom>

            | | |defaults |

            | |<dir>
            | | |
            | | | <fieldset> | | |<form> <hn> | | |<html> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<inputtype="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | |<isindex> | | |<label> <legend> | | |
          1. <listing> | | |<marquee> <menu> | | |

              | | |

                                         runtimeStyle                  |
              |                |                                                     |
              |                |                                                 |
              |                |                                              |
              |                |style                                                    |
              |                |                                                  |
              |                |<tbody>                                                   |
              |                |                             
                | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

                "font-variant" Possible Values

                <source lang="html4strict"> Possible Values normal small-caps.


                </source>



                "font-variant" Syntax and Note

                <source lang="html4strict"> Note: Whether to render in small capital letters for lowercase characters. Syntax:

                element { font-variant: value } elementID.style.fontVariant = "value" document.all.elementID.style.fontVariant = "value" // IE only


                </source>



                "font-weight" Example

                <source lang="html4strict">

                <html> <body>

                Move the mouse to change the font-weight value.

                </body> </html>


                </source>



                "font-weight" is applied to

                <source lang="html4strict"> +----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | |

                | |
                <body> |

                | |<button>

              |

              | |<textarea> <tfoot> |

              | |
              <thead> | | |
              |

              | |
              |

              | | <col> | | |<colgroup> currentStyle | | |<custom>

              | | |defaults |

              | |<dir>
              | | |
              | | | <fieldset> | | |<form> <hn> | | |<html> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<inputtype="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | |<isindex> | | |<label> <legend> | | |
            1. <listing> | | |<marquee> <menu> | | |

                | | |

                                           runtimeStyle                  |
                |                |                                                     |
                |                |                                                 |
                |                |                                              |
                |                |style                                                    |
                |                |                                                  |
                |                |<tbody>                                                   |
                |                |                             
                  | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>

                  "font-weight" Syntax and Note

                  <source lang="html4strict"> Note: boldness or lightness of the font. Syntax:

                  element { font-weight: value } elementID.style.fontWeight = "value" document.all.elementID.style.fontWeight = "value" // IE onlyRelative values:normal (the default)bold,bolderlighter.Constant values:100,200,300 (lighter than normal),400 (normal),500,600 (bolder than normal),700 (bold),800,900 (even bolder).


                  </source>

                |

                | |<textarea> <tfoot> |

                | |
                <thead> | | |