HTML Paragraph Bold and Italic Tags
This article will cover how to use HTML paragraph, bold, and italic tags.
Github repo
https://github.com/EntryLevelDeveloperTraining/html-workshop
Paragraph Tag
The paragraph tag is useful for quickly adding some margin and line breaks to your HTML webpage denoting a paragraph. If you didn't use a paragraph tag the text would all be together making it very hard to read.
The paragraph tag is very simple:
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Atque repellendus dolores maiores,
voluptate ipsum illum, assumenda quis similique deleniti veritatis odio minus quos nulla? Fuga a nulla aliquam reiciendis nobis.
</p>
Bold Tag
The bold tag is useful for quickly adding some boldness to your text. This makes certain words easier to read.
The bold tag is very simple:
This <b>word</b> will be bold
Output:
This word will be bold
Italic Tag
The Italic tag is useful for quickly adding some italics to your text. This is useful for technical words putting an emphasis on your word.
The Italic tag is very simple:
This <i>word</i> will be italic
Output:
This word will be italic
HTML 5 Tags for Bold and Italics
According to the HTML 5 specification the b and i tags should only be used as a last resort when no other tags is available.
HTML 5 has some different tags you can use.
Strong Tag
This <strong>word</strong> will be bold
Output:
This word will be bold
Emphasis Tag
This <em>word</em> will be italic
Output:
This word will be italic
- strong-this is the tag to make things bold
- em-this is the tag to make things italic
Conclusion
HTML is a markup language that we can use to markup our text on our webpage to make things easier to read, making the website look great.
In the next article we will go over the anchor tags to link to another webpage.