3.6. Block Divisions
You may sometimes want to format a large block of text in a similar fashion but in a way that is different from other block(s) in the same document. For example, you might want to set apart a quote so that it appears in a different style than the text around it.
You could change the format of the paragraphs manually or you could set them off in their own block using the division tag (<div>).
Using the <div> TagThe use of the <div> tag is straightforward. Simply place the tags around sections of text you want to treat as a special division. Source The following shows a few paragraphs of text, surrounding a quote that should be set off in a different format. <p>Despite recent setbacks, Acme Inc still intends on releasing its super- duper gaming console on Tuesday. Company CEO Morgan Webb had this to say:</p> <div class="quote"><p>“Although the company has seen better times, we are confident that the release of the new system will prove our continued strength in the market. I'm sure that our customers--who have waited patiently for the X22-B12--will not be disappointed.</p> <p>The release of multiple games and the launch of our online servers will further increase our lead over the competition. At the next industry event we will also be launching a new controller interface that will leave gamers breathless.”</p></div> <p>Although Acme has not released a single product in over four years, the new X22-B12 console holds the promise of revolutionizing ... |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.