Welcome to Bucaro TecHelp!

Bucaro TecHelp
HTTPS Encryption not required because no account numbers or
personal information is ever requested or accepted by this site

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Grouped Selectors

A CSS style sheet consists of rules that define how html elements should be displayed on a webpage. Each rule consists of one or more selectors, one or more properties, and one or more values that each property should be set to.

With a grouped selector You can associate multiple selectors with a single set of rules. The grouped selector shown below sets style rules for multiple headline elements.

h1, h2, h3, h4
{
font-family: verdana;
font-weight: bold;
color:blue;
}

h1
{
font-size: 20px;
}

h2
{
font-size: 18px;
}

h3
{
font-size: 16px;
}

<h1>H1 Text</h1>

<h2>H2 Text</h2>

<h3>H3 Text</h3>

Note that even though the upper grouped selector sets style rules for multiple headline elements, below that, single element selectors set different style rules for each headline element. When a style rule is set several times for a single element, a rule for a property set lower in the code overrides a rule for the same property higher in the code. Also rules set lower in the cascade override rules set higher in the cascade. That's why an inline rule overrides all previously set rules for the same property.

More CSS Quick Reference:
• Vertical Align an Element
• Set the Text Color
• position:absolute
• Set the Background Color
• Set a Background Image's Position
• Set the Text Decoration
• Set Text Justification
• Set an Element's Float
• Set the Type of Bullet Used in List
• Set an Element's Overflow

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro



Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2024 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268