10.07.2017 Views

246996016-HTML5-Step-by-Step

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

334 Chapter 17<br />

●<br />

You can create a style that refers to the tag used for that text block. For example,<br />

you could create a style for the tag that formats all list items a certain way.<br />

This style can be placed in either an internal or external style sheet, such as this:<br />

p {font-family: “Verdana”, “Arial”, sans-serif; font-size: 13px}<br />

●<br />

You can define formatting for a new class in a style sheet, as in the following:<br />

.tangent {font-family: “Verdana”, “Arial”, sans-serif; font-size: 13px}<br />

●<br />

And then you can assign the class to certain tags within the document, like this:<br />

This is a great party.<br />

When you apply formatting in Expression Web, the application chooses an appropriate<br />

formatting method based on its internal rules. These rules take into consideration the<br />

type of formatting being applied and the size of the block to which it is being applied. If<br />

you don’t like the method that Expression Web selects, you can edit the code manually.<br />

In this exercise, you will apply text formatting in several ways, resulting in several types of<br />

tags and attributes being created in the code.<br />

SET UP Start in Expression Web, with the Web site still open from the previous<br />

exercise.<br />

1. In the Page Content division, in the Design pane, type the following text:<br />

Fruit trees are now in stock! We have just received a large shipment of<br />

peach, pear, apple, and plum trees with sturdy root systems and healthy<br />

foliage, with prices as low as $29.99.<br />

2. In the Code pane, enclose the paragraph you just typed in and tags.<br />

Fruit trees are now in stock! We have just received a large shipment of<br />

peach, pear, apple, and plum trees with sturdy root systems and healthy<br />

foliage, with prices as low as $29.99.<br />

Note When you type in the Code pane, Expression Web automatically adds a <br />

tag following it. Cut this tag (Ctrl+X is one way) and then paste it (Ctrl+V) at the<br />

end of the paragraph.<br />

3. Select the sentence Fruit trees are now in stock!, and then click B ( the bold button)<br />

on the toolbar, or press Ctrl+B.<br />

The selected text is enclosed in a tag pair.<br />

Fruit trees are now in stock! We have just received a<br />

large shipment of peach, pear, apple, and plum trees with sturdy root systems<br />

and healthy foliage, with prices as low as $29.99.<br />

4. In the Styles pane (lower-right), on the Manage Styles tab, click #page content to<br />

select that division.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!