Sams Teach Yourself CSS in 10 Minutes
Applying the <blockquote> Element
The <blockquote> element is often used to indent text. However, it should not be used for this purpose. It should only be used to mark up long quotations that consist of block level content. For this lesson, you will need a quotation and a source or author for the quotation. These two items will be marked up as paragraphs and then placed inside a <blockquote>. The paragraph that contains the source information will be given a source class. A class is used in this case because you might want to have more than one <blockquote> on a page. Additional information about the source, such as a web address, can be added to the <blockquote> using the cite attribute as shown in Listing 13.1. Listing 13.1. HTML Code Containing the Markup for a Quotation
<blockquote cite="http://www.sitename.com/quote/smith.htm"> <p> Lorem ipsum dolor... </p> <p > John Smith </p> </blockquote>
To style the <blockquote> and its content, you will use three selectors:
The selectors are shown in Listing 13.2. Listing 13.2. CSS Code Showing the Selectors for Styling the <blockquote>
blockquote {...} blockquote p {...} blockquote p.source {...} |
Категории