Difference between revisions of "Centering & Formatting Text on Your Web Page"

From TheBestLinux.com
Jump to navigation Jump to search
Line 6: Line 6:
  
 
And here is the resulting line with the style modified with our example:
 
And here is the resulting line with the style modified with our example:
<p style="text-align:center"; "font-size:42px; "color:red" >Here is the text which will be now be centered with a font size of 42 pixels and RED in color.</p>
+
<p style="text-align:center; font-size:42px; color:red" >Here is the text which will be now be centered with a font size of 42 pixels and RED in color.</p>

Revision as of 05:11, 15 December 2022

This is how you can format text on your web page, making it centered, changing the font size and color, and other options. Here is an example of how I change font alignment, size and color on the fly, without having to manage a separate CSS file:

<p style="text-align:center; font-size:42px; fg-color:red;">
Here is the text which will be now be centered with a font size of 42 pixels and green in color.

And here is the resulting line with the style modified with our example:

Here is the text which will be now be centered with a font size of 42 pixels and RED in color.