Đang chuẩn bị liên kết để tải về tài liệu:
XML Step by Step- P15
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
XML Step by Step- P15:Extensible Markup Language, or XML, is currently the most promising language for storing and exchanging information on the World Wide Web. Although Hypertext Markup Language (HTML) is presently the most common language used to create Web pages, HTML has a limited capacity for storing information. In contrast, because XML allows you to create your own elements, attributes, and document structure, you can use it to describe virtually any kind of information from a simple recipe to a complex database | Chapter 8 Displaying XML Documents Using Basic Cascading Style Sheets 251 whether the child elements are block or inline block and inline elements are described in the earlier section Setting the display Property. The text-align property affects the alignment of the text within the text content area. By default the text content area extends across almost the entire width of the browser window. However as you ll learn in the next chapter in Setting Box Properties you can modify both the width and the position of an element s text content area. You can assign text-align one of the following three keyword values left. Aligns each line at the left. Assume for example that you apply the following rule to the XML document of Listing 8-4 in addition to the other rules shown in the style sheet in Listing 8-3 except the background-image setting which I removed for clarity POEM text-align left The poem would be aligned like this Basic Cascading Style Sheets 8 right. Aligns each line at the right. For example the following rule aligns the poem to the right as shown in the figure POEM text-align right 252 XML Step by Step center. Centers each line horizontally. For example the following rule centers the entire poem as you can see in the figure POEM text-align center Chapter 8 Displaying XML Documents Using Basic Cascading Style Sheets 253 Setting the text-indent Property You can use the text-indent property to indent the first line of an element s text. You can assign text-indent any of the kinds of size values described in the sidebar Specifying Size Values on page 227. For example the following rule indents the first line of a VERSE element by three times the height of its font VERSE text-indent 3em Here s how a VERSE element would look It is in his walk the carriage of his neck the flex of his waist and knees dress does not hide him Alternatively you can specify the indentation as a percentage of the total width of the element s text. For example this rule indents the first