ASP.NET Font Property
the Style control
Definition and Usage
The Font property is used to set or return the font of the control.
Syntax
webcontrol id=" id " font- subproperty = "value" runat="server" /> The following example sets the font of a Button control: Demo Example » Set the Button control's font (with declaration and script)Font sub-properties
Value
Description
Bold
The bold sub-property. Possible values are: TRUE or FALSE.
Italic
The italic sub-property. Possible values are: TRUE or FALSE.
Name
The font name property (e.g. "Verdana" or "Arial"). When you set this property, the Names property is automatically updated with a single-element array holding the value of the Name property.
Names
An array of font names. When you set this property, the Name property is automatically updated using the first element of the array.
Strikeout
The strike-through sub-property. Possible values are: TRUE or FALSE.
Underline
The underline sub-property. Possible values are: TRUE or FALSE.
Size
The font size sub-property. Specifies the font size.
Example
Try it - Demo
the Style control