• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 11. Using Style Sheets > Creating CSS Selector Styles for Tag Combinatio...

Creating CSS Selector Styles for Tag Combinations

CSS selector styles also enable you to format combinations of tags—tags that appear within other tags. In this lesson, for example, you want to give text paragraphs within a table a different format than the other paragraphs on the page. Since you already created a style for the <p> tag, the paragraphs within the table currently reflect that formatting. Place the cursor in a paragraph within the table, and you will see by looking at the HTML code that there are <td> tags for the table cell and <p> tags for the paragraphs within the cell. The tag selector at the bottom left of the document window shows the hierarchy of the code: <body><table><tr><td><p>—body, table, table row, table cell, and paragraph, respectively.

In this exercise, you will create a style that changes only the formatting of the paragraphs within the table cells so they look different from the rest of the paragraphs on the page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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