Web Programming with HTML, XHTML, and CSS Second Edition- P2

Web Programming with HTML, XHTML, and CSS Second Edition- P2: Điều này bắt đầu hướng dẫn nhận xét HTML và cũng giới thiệu đến bạn bằng cách sử dụng XHTML cho cấu trúc của một trang web và cascading style sheets (CSS) để kiểm soát như thế nào một tài liệu sẽ xuất hiện trên một trang web. Bạn se tìm hiểu làm thế nào để tận dụng lợi thế của các tính năng mới của các trình duyệt trong khi đảm bảo rằng các trang của bạn vẫn làm việc ở cũ, nhưng phổ biến, các trình duyệt. Bằng. | Chapter 1 Creating Structured Documents The align attribute has been replaced with the text-align property in CSS and the ability to float blocklevel elements as you will see in Chapter 7 . The align attribute is covered in more detail in Appendix I. Creating Paragraphs Using the p Element The p element offers another way to structure your text. Each paragraph of text should go in between an opening p and closing p tag as in this example p Here is a paragraph of text. p p Here is a second paragraph of text. p p Here is a third paragraph of text. p When a browser displays a paragraph it usually inserts a new line before the next paragraph and adds a little bit of extra vertical space as in Figure 1-8. Figure 1-8 The p element can carry all of the universal attributes and the deprecated align attribute align class id style title dir lang xml lang Creating Line Breaks Using the br Element Whenever you use the br element anything following it starts on the next line. The br element is an example of an empty element where you do not need opening and closing tags because there is nothing to go in between them. The br element has a space between the characters br and the forward slash. If you omit this space older browsers will have trouble rendering the line break whereas if you miss the forward slash character and just use br it is not valid XHTML. Most browsers allow you to use multiple br elements to push text down several lines and many designers use two line breaks between paragraphs of text rather than using the p element to structure text as follows Paragraph one br br Paragraph two br br Paragraph three br br 21 Chapter 1 Creating Structured Documents While this creates a similar effect to using the paragraph element if you do not use the p element itself for each paragraph then the document is no longer describing where each paragraph starts and finishes. Furthermore in Strict XHTML the br element can be used only within what are known as .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
2    70    2    29-04-2024
100    80    3    29-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.