HTML TEXT formatting
Previous: HTML HEAD element
To make the HTML pages more attractive we use different page layouts, colors and pictures. An important role in the web page formatting is the usage of the appropriate text format, size and color.
Fixed size or floating text size
We say that a fixed text size is used in one web page, when its size is preset in pixels and it is not possible for the visitor to change the display text size using his/her Internet Explorer settings (Text size: Largest, Larger, Medium, Smaller, Smallest).
The web designers often use fixed text size in order to prevent the user from changing the page format and layout. However the new web browsers implement features like "Page : Zoom : xxx%" in Internet Explorer and "Text Size : Increase / Decrease " in Mozilla Firefox that zoom the complete web page or increase and decrease the text font regardless how the web page is build.
HTML TEXT formatting tags
| Text example | Text HTML code |
| this is not formated text | this is not formated text |
| this is strong text | <strong>this is strong text</strong> |
| this is strong red text | <strong><font color="red">this is strong red text</font></strong> |
| this text has emphasis | <em>this text has emphasis</em> |
|
center aligned text
|
<div align="center">center aligned text</div> |
Heading 1 formatted text |
<h1>Heading 1 formatted text</h1> |
Heading 2 formatted text |
<h2>Heading 2 formatted text</h2> |
| text superscript text | text <sup>superscript text</sup> |
| text subscript text | text <sub>subscript text</sub> |
| text size + 1 | <font size="+1">text size + 1</font> |
| text size - 1 | <font size="-1">text size - 1</font> |
| text size 1 | <font size="1">text size 1</font> |
| text font definition | <font face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">text font definition </font> |
text list:
|
text list: |

