| Chapter 1 A very common way to use CSS and some people don't even realize it, is to use the style attribute. It goes inside the element's tag, and sets certain properties for the area that the element covers. Here is an example style attribute. <div style="font-weight:bold; text-decoration:underline; color:#FC49E3">Hey There</div>That code would render this segment. Hey There Now I'll go over how the code works. First you have a <div> tag, but you could have any tag like that (<span>, <a>, and so on). Then, you include the style attribute inside the tag. Inside the style attribute is a list of styles and their settings (assigned using colons), separated by semicolons. So, the basic outline of a style attribute is as follows. <tagName style="styleName:styleValue; nextStyleName:nextStyleValue">Text to conform to style</tagName> So, now you see how the style attribute is set up. To find out all about the style names and values, look at Appendix A.
|