Monday, 23 February 2015

CAUTION

 One thing to watch out for: when you specify units in CSS, you must leave no spaces between the number of units and unit specification. In other words, 12pt and 100% are valid,  and 12pt and 100%aren’t

There’s another thing that you can be do with the font-size property that’s not possible with the <font> tag: line height. Let’s not possible with the <font> tag: specify line height. Let’s say you want to use double-spaced text on your page. Before CSS, the only way to achieve the effect was to use the <br>in this manner can look truly awful. To set the line height using CSS, you can include it in you font size specification, like this: font-size: 100/200%. In this case, the size of the font is 100%-the default-and the line height is 200% twice the standard line height.

DO

Do specify fonts using CSS rather than the <font> tag.
Do list backup fonts when specifying a font family order to make it more likely that your users will have one of the fonts you specify.

DON’T

Don’t use too many different fonts on the same page.
Don’t use absolute font sizes with CSS if you can help it, because some browsers won’t let users alter the text size if you do so.

<NOBR> AND <WBR>


The <nobr>…..</nobr> elements is the opposite of the <br> tag. The text inside the <nobr> tags always remains on one line, even if it would have wrapped to two more lines without the <nobr>. The ?<nobr> tag is used of words or phrases that must be kept together on one line, but be careful. Long unbreakable lines can look really strange on your page, and if they’re toner than the page width, they might extend beyond the right edge of the screen.

No comments:

Post a Comment