Java web development using hibernate, jsp and servlets, 2007

Page 192

180

Web Development with Java

Figure 6.6 A page that uses a style sheet, as seen in a browser.

Next is an example of a page that uses the above style sheet. Notice how the specific td tag is specified by <td class=“under”> or <td class=“left”>. <html> <head> <title>Test page for CSS</title> <link REL=“stylesheet” TYPE=“text/css” HREF=“test.css”> </head> <body> This is some text that is not included in a paragraph. It should be centred across the page. <p> This is the text for the paragraph. It should be italicised and aligned to the right side of the page. <table border> <tr> <td>Normal Text</td> <td>is not centred. It is not centred because tables have a default alignment of left, so the centre of the body does not cascade. It has a bold <b class=“warning”>warning</b>. </td> </tr> <tr> <td class=“under”>In a TD: under</td> <td class=“under”>is underlined and right aligned</td> </tr> <tr>


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.