28.2.1. How to format text in HTML

To format a text in bold, you can use the <b> tag (deprecated in XHTML, use CSS instead, see Section 14.12, Section 28.3!). We recall that in HTML in most cases you have to open and close the tag. Thus, the code

<b>Hello</b> World

means that the word "Hello" shall be in bold face, while the rest of the sentence will be in normal face, since the <b> tag was closed with </b> immediately after the word "Hello". Other formatting tags are:

But how how can we change not only the face, but also the colour, the size and the font? For this, the <font> tag comes to our help (also deprecated in XHTML, use CSS instead, see Section 14.12, Section 28.3!). Let's take a concrete example and analyze it:

<font color="#FF0000" size="2">Hello World</font>

The code assigns some values to attributes of the font tag, that will apply to the "Hello World" text:


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO