You can define the font-style, font-weight, font-variant, font-size and font-family all at once.
Value: font-style, font-weight, font-variant, font-size and font-family
<p style="font: italic bold 20px Verdana;">Sample Text</p>
font-family
You can choose which font family to use. You can put other font-family alternatives just in case the first font-family is not available in the user’s system. In our example below, if Arial is not available in the user’s system fonts, then it will use Helvetica . You can use many other generic fonts. They will be prioritized according to their order.
Value: font name
Output:
font-size
used for setting the size of the font
Possible Values:
xx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger
length
percentage
Output:
font-style
Used for setting the style of the font
Value: normal, italic, oblique
Output:
font-variant
Used for setting fonts to small caps or in normal format
<p style="font-variant: small-caps;">Sample Text</p>
Output:
font-weight
Used for setting the weight of the font
Possible Values:
normal
bold
bolder
lighter
100
200
300
400
500
600
700
800
900
Output:
color
Used for setting the color of a text. The color value may be a color name: (blue, red, etc.), a hexadecimal number:(#ff00ff, #333443) or an RGB color: (rgb(255,255,000), rgb 122,234,123).
Value: color
Output:
direction
Used for setting the text direction
Possible Values: ltr, rtl
ltr (left to right) default
rtl (right to left)
Output:
line-height
Used for setting the spacing between lines.
normal
number
length
percentage
<p style="line-height: 30px;">
Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph Sample Paragraph
</p>
Output:
letter-spacing
Used for adjusting the space between letters
Possible Values: normal, length
Output:
text-align
Used for setting the text alignment
Possible Values:
left
right
center
justify
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph Sample Paragraph
</p>
<p style="text-align: justify;">
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
</p>
<p style="text-align: left;">
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
</p>
<p style="text-align: right;">
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
</p>
Output:
text-decoration
Used for adding decoration to texts
Possible Values:
none
underline
overline
line-through
blink
Output:
text-indent
Used for indenting the first line of a text
Possible Values: length, percentage
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
Sample Paragraph Sample Paragraph
</p>
Output:
text-transform
Used for controlling text display
Possible Values:
none
capitalize
uppercase
lowercase
Output:
white-space
Used for controlling white spaces
normal
pre
nowrap
<p style="white-space: pre;">
Sample Text
Sample Text Sample
Text Sample Text Sample Text</p>
Output:
word-spacing
Used to control the spacing between words
<p style="word-spacing: 10px;">Sample Text Sample Text</p>
Output:
Nuk ka komente:
Posto një koment