There are two ways to style text in HTML using the < p >, < b > and < u > tags. The first way is to use inline CSS.
Inline CSS is added to the HTML document using the style attribute within specific HTML tags. For example, to make text bold, you would use the < b > tag like this:
This text is bold
To make text italic, you would use the < i > tag like this:
This text is italic
And to underline text, you would use the < u > tag like this:
This text is underlined
The second way to style text in HTML is to use an external CSS file. External CSS files are linked to HTML documents using the link tag. The link tag has a few different attributes, but the two that are most important for our purposes are the href attribute and the rel attribute.
The href attribute tells the browser where to find the external CSS file, and the rel attribute tells the browser what type of file it is. For our purposes, we will use a value of “stylesheet” for the rel attribute. Here is an example of how you would link an external CSS file to an HTML document:
Once you have added the link tag to your HTML document, you can start adding CSS rules to your external CSS file. For example, if you wanted all of the text on your website to be black, you could add this rule to your styles.css file:
* {color: black;}