Web Design

(Nancy Kaufman) #1

132


Group Elements with Divs .......................................


3 After the closing tag of the
last element in the group,
type </div>.

1 In your editor, open a page
that contains an embedded
style sheet.
2 Within the body of your
document, type <div>
before the first element you
want to include in the group.

Group Elements with Divs


T


here may be times when you have a group of block elements that you need to style together.
For example, the banner area at the top of your page may be made up of one or more images, a

heading, and a set of links for your primary navigation. You can apply styles to these tags together


by grouping them with the

tag. Like the tag,
does not have any default


formatting properties, and exists to allow you to logically group other tags into sections and then


apply styles accordingly.


2


3


1