Developer Ramon Sanchez has something to say ?
Welcome to the scripmaual the database where you an find anything from Css menus to javascript script's and more scripting language. This week we have placed nore css menus that are very simple to integrate ... Check them out »

Advertise your Product on scriptmanual ?
Get your product known with a special format always on top of all categories join the scriptmanual advertiser network. We offer cheap prices for all advertiser's ..get real results... Read more >>

CSS FONT PROPERTIES

Css font properties allow you to change the font family, boldness, size, and the style of a text. You probably already knew how to make text bold or underlined, but did you know you could resize your font using percentages? . Basically Css gives you great control over the way your text is displayed.

Property :: Description :: Values ::
Font A shorthand property for setting all of the properties for a font in one declaration. font-style font-variant , font-weight , font-size/line-height, font-family , caption, icon , menu , message-box , small-caption , status-bar
Font - family A prioritized list of font family names and/or generic family names for an element. font-style , family-name , generic-family
Font-size Sets the size of a font. xx-small , x-small , small , medium , large , x-large , xx-large , smaller , larger , length , %
{ Font-size-adjust: Any Value ; } Specifies an aspect value for an element that will preserve the x-height of the first-choice font none , number
Font-stretch Condenses or expands the current font-family. normal , wider , narrower , ultra-condensed , extra-condensed , condensed , semi-condensed , semi-expanded , expanded , extra-expanded , ultra-expanded
Font-style Sets the style of the font. normal , italic , oblique
Font-variant Displays text in a small-caps font or a normal font. normal , small-caps
Font-weight Sets the weight of a font. normal , bold , bolder , lighter , 100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900
CSS Syntax

The CSS syntax is made up of three parts: a selector, a property and a value:

selector {property: value}

The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value. The property and value are separated by a colon, and surrounded by curly braces:

body {color: black}

Note: If  the value is multiple words, put quotes around the value:

p {font-family: "sans serif"}

Note: If you wish to specify more than one property, you must separate each property with a semicolon. The example below shows how to define a center aligned paragraph, with a red text color:

p {text-align:center;color:red}

To make the style definitions more readable, you can describe one property on each line, like this:

p
{
text-align: center;
color: black;
font-family: arial
}
Grouping

You can group selectors. Separate each selector with a comma. In the example below we have grouped all the header elements. All header elements will be displayed in green text color:

h1,h2,h3,h4,h5,h6 
{
color: green
}
Class Selector

With the class selector you can define different styles for the same type of HTML element.

Say that you would like to have two types of paragraphs in your document: one right-aligned paragraph, and one center-aligned paragraph. Here is how you can do it with styles:

p.right {text-align: right}
p.center {text-align: center}

You have to use the class attribute in your HTML document:

<p class="right">
This paragraph will be right-aligned.
</p>
<p class="center">
This paragraph will be center-aligned.
</p>

Note: To apply more than one class per given element, the syntax is:

<p class="center bold">
This is a paragraph.
</p>

Was this article & Examples Helpful ?

If so you can help us bring this and more to become available for you at anytime. You can help us by donating any amount or Sharing & Following Us.. P.S Web hosting cost us alot of money..

Business Services

Graphics Design

  • Business CardsBusiness Cards
    Just $35 per card. Order / More Info »
  • Logo DesignLogo Design
    Just $55 per logo. Order / More Info »
  • Company BrochureCompany Brochure
    Just $65 each. Order / More Info »
  • Website Listing inWebsite Listing in 2,000 Directories
    Just $35 each. Order »
  • Party / Events Flyers DesignParty / Events Flyers Design
    Just $55 each. Order »
  • Advertisement Units Design & Flash AdsAdvertisement Units Design & Flash Ads
    Leaderboard (728 x 90) - $95
    Banner (468 x 60) - $40
    Skyscraper (120x600) - $125
    Skyscraper2 (160x600)- $130
    Half Banner (234x60) - $75

    Order Now » We can design your custom
    Ad banners in days.
  • Social Buttons For Websites
    Just $55. More Info »
    ~ Example below ~

Follow Us

Website Design queens ny Linked In NYWDS.com

Developer's Tip

  • Ramon Sanchez
    TIP: # 256 | Meta Tags
    When adding META TAGS make sure you dont over Repeat the keywords it wont help with SEO.Keep it Simple dont overdue it...