tailieunhanh - giáo trình HTML5 và CSS3 từng bước phần 9

Tham khảo tài liệu 'giáo trình html5 và css3 từng bước phần 9', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Formatting Text 333 Note The Masthead division is not very tall and that s okay for now. We ll fix that later. 7. Above the Code pane click the tab to switch the view to the associated CSS file. In that view notice the following The tab appears as . The asterisk means that there are unsaved changes to the file. The code that places the background image in the Masthead division is in the CSS file not in the HTML document itself. Division-level formatting is placed in the external style sheet by default if present. X CLEAN UP Leave the page and the Web site open in Expression Web for the next exercise. Formatting Text As you know from earlier chapters there are many ways to format text. Here s a quick review You can use direct formatting in which an individual block of text receives certain formatting. For example you might make a word bold in a paragraph by using the b tag as follows This is a b great b party. You can create a span and then apply formatting to the text within the span such as shown here p This is a span style font-size 13px great span party. You can place a style in the opening tag for a certain paragraph or other block of text. For example you might specify a certain color for a paragraph s text as shown in the following p style color green This is a great party. p 334 Chapter 17 You can create a style that refers to the tag used for that text block. For example you could create a style for the p tag that formats all list items a certain way. This style can be placed in either an internal or external style sheet such as this p font-family Verdana Arial sans-serif font-size 13px You can define formatting for a new class in a style sheet as in the following .tangent font-family Verdana Arial sans-serif font-size 13px And then you can assign the class to certain tags within the document like this p class tangent This is a great party. p When you apply formatting in Expression Web the application chooses an appropriate .