![]() | Web Design / HTML |
More About CSSMore About CSSMore About CSSYour First Style Sheet Using Cascading Style Sheets or CSSCSS is Easier Than You ThinkAs HTML becomes more and more a description of the content of Web pages and less the look and feel, you need a tool to describe how your pages should look. That's where Cascading Style Sheets (CSS) come in. CSS is not hard, in some ways it's almost easier than HTML. The trickiest part is remembering the many different choices you have to choose from. Let's start with a simple style sheet that includes some of the more common styles. Fonts and CSSThe most common adjustment to Web pages is to the fonts on the page. You can change the color, style, size, and face of your fonts, and you can do it all with CSS. Creating a Style SheetThe first key to writing a style sheet is to decide what you want your text to look like. You should decide the color, the font, the style and so on. You also need to decide what the different styles should be for the different tags, headings, and so on. My Proposed Styles
These are the CSS elements that can change the font. Examples for how to use the CSS property are included in italics:
Once you've decided on the styles you want, you need to write your style sheet. Place the following in the <head> of your HTML document: <style type="text/css"> The first three of the above styles will be set by using the tags: <p></p>, <h1></h1>, and <h2><h2>. The final style notation is used with the class attribute. Since it is a notation that would be on text within a paragraph, but not a separate paragraph, it would usually be used with the <span></span> tag. Paste the following HTML into the document with the above CSS: <p> The styles set by the first tag will be inherited by any tag that is within it. This is why we don't have to redefine the font color or size for the note. More About CSSMore About CSSMore About CSS |
Las Vegas on a BudgetFind a BargainHotel DealsCheap EatsFree AttractionsEntertainment for Less |
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


