WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted Fonts - Part 2 Thu Oct 21, 2010 5:41 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
Fonts - Part 2
Learn CSS - part 6


Fonts - part 2
Here is a list (like in lesson number 5) of what we are going through.

• Font-family
• Font-size
• Font-style
• Font-variant
• Font-weight
• Mergin of a font

Font-family
The font is as your surely had figured out, just the font we wich to write with, it could be Arial, Times New Roman, Helvetica or Baskerville.

You should also notice, taht the Generic-family in the Font-family is the same. A Generic-family is actually a group of identical fonts. It's a good idea to write the Generic-family type as a possibily, it would then be much easier for the client to read which font we are "calling".

Here is a quick list of the Generic-familys.

serif: Times New Roman, MS Georgia, Garamond.
sans-serif: Arial, Helvetica, Trebuchet, Verdana, Futura, Gill Sans.
cursive: Zapf-Chancery, Caflisch Script.
fantasy: Critter, Cottonwood, Western.
monospace: Courier, MS Courier New, Prestige, Andele Mono.

This is what a code could look like, if we add it to the stylesheet.
Code:
p {
font-family: Times, "New Century Schoolbook", serif;
}

As shown are the fonts serperated with a comma. It's usefull for the browser because it's making it a lot easier for the client to find.

Font-size
By using the Font-size property, can we chose the size of the text. It can be done my using a lot of values after the "default-value" that are a number. Normally aare we using pixels, procent or em, but here is the full list of what there can be usefull.

The relative values:
• em (ems)
• ex (x-height)

The absolute values:
px (pixels) in (inches) cm (centimeter) mm (millimeter) pt (points) pc (picas) % (procent)

Font-style
By using the Font-style can we use following values: normal, italic, oblique. You can surely guess what they each do.

Font-variant
The Font-variant decide it the text should be shown normal or in small-caps. The normal is (as said) normal and the small-caps is big letters written with a small size.

Font-weight
The Font-weight decides how bold the text should be, here is a list of possibilities.

• normal
• bold
• bolder
• lighter
• 100
• 200
• 300
• 400
• 500
• 600
• 700
• 800
• 900

Mergin of a font
We now have learned alot of the font. We got the Font-family, size, style, variant, weight etc.
I've written an example so we can take a look at our final result.
Code:
p {
font-style: italic;
font-weight: bold;
font-size: 1em;
font-family: Times, "New Century Schoolbook", serif;
}
But to make this much easier to look at, can we write it together in one long property/value.
Code:
p {
font: italic bold 1em Times, "New Century Schoolbook", serif;
}
Notice! It's important to mergin the fonts properties in following sequence.
[Font-style] [-variant] [-weight] [-size] [-family]

We are done with the fonts right now, in the next lesson are we looking at the backgroundcolor.

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.

http://woops.dk

2Accespted Re: Fonts - Part 2 Thu Oct 21, 2010 5:44 pm

ankillien

ankillien
Administrator
Administrator
Detailed and very well explained tutorial Smile

3Accespted Re: Fonts - Part 2 Thu Oct 21, 2010 7:53 pm

Matti

Matti
Registered Member
Registered Member
Yeah... i always want to know this with fonts Very Happy Nice tut UD

http://csshelp.forumotion.net/

4Accespted Re: Fonts - Part 2 Thu Oct 21, 2010 8:47 pm

Unknown Data

Unknown Data
Registered Member
Registered Member
Thanks everyone! Very Happy

http://woops.dk

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum