HTML Formatting
HTML formatting elements are used to control the appearance of text on a web page. They can be used to make text bold, italic, underlined, or to change its color.
Some of the most common HTML formatting elements include:
- <b> element: This element makes text bold.
- <i> element: This element makes text italic.
- <u> element: This element underlines text.
- <font> element: This element allows you to specify the font, size, and color of text.
- <span> element: This element is a generic container for formatting.
Task
Add an i element in between the text My Portfolio of the h1 element run the code to see the results and experiment with the code to get used to it.
Best Practices for HTML Formatting
Here are some best practices for using HTML formatting elements:
- Use formatting elements sparingly. Too much formatting can make your web page look cluttered and unprofessional.
- Use formatting elements to highlight important information. For example, you could use bold to highlight the title of a document or italic to highlight a quotation.
- Use consistent formatting throughout your web page. This will help your web page look more professional and polished.
- Use CSS to control the appearance of your text. CSS is a more powerful way to control the appearance of text than HTML formatting elements.