- Headings
- Paragraphs
- Line breaks and horizontal rules
- Preformatted text
HTML Formatting Text refers to the way you can control the visual appearance of text and content on a web page using HTML tags. Here are some of the commonly used HTML tags for formatting text:
Headings :-
Headings are used to define the headings of a webpage. HTML has six levels of headings, ranging from H1 to H6, with H1 being the most important and H6 being the least important. Here is an example of how to use headings in HTML code:
Paragraphs :-
HTML paragraphs are used to break the content into smaller, readable chunks. To create a paragraph in HTML, use the <p> tag, like so:
<p>This is a paragraph of text. </p>
Line breaks and horizontal rules :-
HTML allows you to create line breaks and horizontal rules to visually separate content. A line break is created using the <br> tag, while a horizontal rule is created using the <hr> tag. Here's an example:
Preformatted text :-
HTML also allows you to display preformatted text, such as code snippets, using the <pre> tag. This preserves the original formatting of the text, including spaces and line breaks. Here's an example:
By using these HTML tags for formatting text, you can improve the readability and appearance of your webpage.
The next topic we will cover in this blog is "Links and Navigation." This includes learning how to create links in HTML, how to link to email addresses, how to link to other pages and sites, how to add navigation menus, and how to use anchor links. By mastering these techniques, you'll be able to create effective navigation on your website, making it easy for users to find the content they're looking for.
0 Comments
We love hearing from our viewers! Your comment is important to us. ❤️