Skip to content

Combining parameters

How do you change the appearance of text on a web page?

All of the above parameters (attributes and tags) related to text can be combined. For example, if you input the following in an editor:

<p style="text-align: center"><span style="font-size: large; color: red"><b><i><u>
This is some text
</u></i></b></span></p>

You will get:

This is some text


Notice that you should close the tags in the reverse order in which you opened them. This means you first close the tag that was opened last (in our example, it's <u>), and finally, close the tag that was opened first (in this case, <p>).

Additionally, the values of the style="..." attribute related to the same tag (in our example, it's the <span> tag) can be combined by listing them one after another, separated by semicolons (in our example, the values are: "font-size: large; color: red"). The order of entering both attribute values and tags (opening tags) is arbitrary.

Questions and Answers