Professional Documents
Culture Documents
XHTML Tables
In this lecture, we will discuss:
More Simple Formatting, The Old Way (useful HTML4)
Bold, Italic, Text size, Monospaced Fonts; etc
Tables
Simple Tables
Combining Tables
Stacking and Nesting Tables
Controlling Cell Space
Spanning Cells
Basic (X)HTML Formatting (2)
Later, we will learn Cascading Style Sheets (CSS) for formatting.
This separates formatting from content…
However, for very simple formatting, CSS is a lot of work.
For this, a few HTML alternatives may be recommended…
That are still allowed in XHTML...
These include methods for:
1. Making text Bold or Italic;
We used the strong element for this, already.
2. Changing text Size;
3. Using a ‘monospaced’ font;
4. Using pre-formatted text;
5. Quoting text; and,
6. Creating sub-scripts and super-scripts;
We saw this last lecture.
Making text Bold or Italic
The standard HTML way to make text bold is via the b element:
This is explicit bold formatting.
<b>text</b> text.
The standard HTML way to make text italic is via the i element:
As above, this is explicit italic formatting.
<i>text</i> text.
<big>text</big> text
<small>text</small> text
<tt>text</tt> text
However, you may use the pre element to render text ‘as is’:
i.e., With all line-breaks, spacing, etc…
This is called pre-formatted text.
Example:
<pre>this has extra spaces</pre> this has extra spaces
Note the side-effect: you also get a monospaced font.
This is mainly useful if you want to display code…
Where line-to-line text alignment may be important.