giáo trình HTML5 và CSS3 từng bước phần 9
Số trang: 23
Loại file: pdf
Dung lượng: 768.28 KB
Lượt xem: 14
Lượt tải: 0
Xem trước 3 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
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ả
Nội dung trích xuất từ tài liệu:
giáo trình HTML5 và CSS3 từng bước phần 9 333 Formatting Text 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 default.css tab to switch the view to the associated CSS file . In that view, notice the following: ●● The tab appears as default .css* . 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 . 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 tag, as follows: This is a greatparty. ●● You can create a span, and then apply formatting to the text within the span, such as shown here: This is a great 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: This is a great party.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 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: This is a great party. When you apply formatting in Expression Web, the application chooses an appropriate formatting method based on its internal rules . These rules take into consideration the type of formatting being applied and the size of the block to which it is being applied . If you don’t like the method that Expression Web selects, you can edit the code manually . In this exercise, you will apply text formatting in several ways, resulting in several types of tags and attributes being created in the code . SET UP Start in Expression Web, with the Web site still open from the previous exercise. 1. In the Page Content division, in the Design pane, type the following text: Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root systems and healthy foliage, with prices as low as $29.99. 2. In the Code pane, enclose the paragraph you just typed in and tags . Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root systems and healthy foliage, with prices as low as $29.99. Note When you type in the Code pane, Expression Web automatically adds a tag following it. Cut this tag (Ctrl+X is one way) and then paste it (Ctrl+V) at the end of the paragraph. 3. Select the sentence Fruit trees are now in stock!, and then click B ( the bold button) on the toolbar, or press Ctrl+B . The selected text is enclosed in a tag pair . Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root sys- tems and healthy foliage, with prices as low as $29.99. 4. In the Styles pane (lower-right), on the Manage Styles tab, click #page_content to select that division . 335 Formatting Text 5. In the Properties pane (lower-left), click the CSS Pr ...
Nội dung trích xuất từ tài liệu:
giáo trình HTML5 và CSS3 từng bước phần 9 333 Formatting Text 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 default.css tab to switch the view to the associated CSS file . In that view, notice the following: ●● The tab appears as default .css* . 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 . 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 tag, as follows: This is a greatparty. ●● You can create a span, and then apply formatting to the text within the span, such as shown here: This is a great 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: This is a great party.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 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: This is a great party. When you apply formatting in Expression Web, the application chooses an appropriate formatting method based on its internal rules . These rules take into consideration the type of formatting being applied and the size of the block to which it is being applied . If you don’t like the method that Expression Web selects, you can edit the code manually . In this exercise, you will apply text formatting in several ways, resulting in several types of tags and attributes being created in the code . SET UP Start in Expression Web, with the Web site still open from the previous exercise. 1. In the Page Content division, in the Design pane, type the following text: Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root systems and healthy foliage, with prices as low as $29.99. 2. In the Code pane, enclose the paragraph you just typed in and tags . Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root systems and healthy foliage, with prices as low as $29.99. Note When you type in the Code pane, Expression Web automatically adds a tag following it. Cut this tag (Ctrl+X is one way) and then paste it (Ctrl+V) at the end of the paragraph. 3. Select the sentence Fruit trees are now in stock!, and then click B ( the bold button) on the toolbar, or press Ctrl+B . The selected text is enclosed in a tag pair . Fruit trees are now in stock! We have just received a large shipment of peach, pear, apple, and plum trees with sturdy root sys- tems and healthy foliage, with prices as low as $29.99. 4. In the Styles pane (lower-right), on the Manage Styles tab, click #page_content to select that division . 335 Formatting Text 5. In the Properties pane (lower-left), click the CSS Pr ...
Tìm kiếm theo từ khóa liên quan:
kỹ thuật html5 và css3 thủ thuật máy tính bí quyết lập trình thiết kế giao diện web thế kế wordpress mẹo tin họcTài liệu liên quan:
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 319 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 307 0 0 -
Sửa lỗi các chức năng quan trọng của Win với ReEnable 2.0 Portable Edition
5 trang 216 0 0 -
Giáo trình Bảo trì hệ thống và cài đặt phần mềm
68 trang 209 0 0 -
Tổng hợp 30 lỗi thương gặp cho những bạn mới sử dụng máy tính
9 trang 206 0 0 -
Phần III: Xử lý sự cố Màn hình xanh
3 trang 206 0 0 -
UltraISO chương trình ghi đĩa, tạo ổ đĩa ảo nhỏ gọn
10 trang 204 0 0 -
Sao lưu dữ liệu Gmail sử dụng chế độ Offline
8 trang 203 0 0 -
Hướng dẫn cách khắc phục lỗi màn hình xanh trong windows
7 trang 202 0 0 -
Giáo Trình tin học căn bản - ĐH Marketing
166 trang 198 0 0