Formatting Text with HTML

Página 5

Text formatting is one of the main functions of HTML, allowing developers to create visually appealing and well-organized web pages. Through HTML tags, it is possible to format the text in several ways, such as changing the font size, text color, adding bold, italics, underlining, among other options. To change the font size, for example, we can use the tag and specify the desired size through the "size" attribute. For example, to set the font size to 14 pixels, we can use the following tag: My text with font size 14px To change the text color, we can use the tag again, but now specifying the color through the "color" attribute. For example, to set the text color to red, we can use the following tag: My text in red color To add boldness to the text, we can use the or tag. Both tags are equivalent and can be used in the same way. For example: My text in bold To add italics to the text, we can use the or tag. Both tags are equivalent and can be used in the same way. For example: My text in italics To add underlining to text, we can use the tag. For example: My underlined text In addition to these options, it is also possible to use other HTML tags to format the text, such as the tag to create superscript text, the tag to create subscript text, the tag to create strikethrough text, among others. It is important to remember that, although text formatting is a useful tool to make web pages more attractive, it must be used sparingly and appropriately, so as not to compromise the readability and accessibility of pages. It is recommended to use CSS styles to format text more consistently and efficiently.

Now answer the exercise about the content:

You are right! Congratulations, now go to the next page

You missed! Try again.

Next page of the Free Ebook:

6Inserting images in HTML

Earn your Certificate for this Course for Free! by downloading the Cursa app and reading the ebook there. Available on Google Play or App Store!

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text