• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Creating Style Sheets

Now that you’ve seen some of the theory of style sheets, let’s move on to the elements and attributes that actually enable you to put style sheets to use. That includes a quick discussion of the different methods you can use to implement styles:

  • The style attribute Using the style attribute for various XHTML elements, you can add style to an individual element or container.

  • Defining element styles— Using special style definitions, you can define elements—such as <p>, <blockquote>, <h3>, and so on—so that they have a particular styling on the entire page, or even throughout your Web site. If you’d like every paragraph to use a particular font, for instance, you can create a style sheet definition that does that.

  • Defining element classes Finally, you can create new classes that are styled, and elements can be assigned particular classes. If you create a particular class of <p> element that is red text, for instance, you can then use that class definition when you’re creating a red paragraph on your page. Other paragraphs (or other elements) can be styled differently, if desired.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint