MATERI HTML #3 - TAG PENDUKUNG TEKS
Table of Contents
Introduction
In this tutorial, we will explore various text support tags in HTML, such as underline, bold, and italic. These tags enhance the presentation of text on a webpage, making it visually appealing and easier to read. Understanding how to implement these tags will help you improve your web development skills and create more engaging content.
Step 1: Using the Bold Tag
The bold tag is used to emphasize important text. In HTML, you can use either the <strong>
tag or the <b>
tag.
-
Using
<strong>
: This tag indicates that the text is of strong importance.<strong>This text is important and bold.</strong>
-
Using
<b>
: This tag simply makes the text bold without conveying any additional importance.<b>This text is just bold.</b>
Practical Tip: Use <strong>
for text that needs emphasis in meaning, while <b>
is suitable for styling purposes only.
Step 2: Using the Italic Tag
The italic tag is used to italicize text, which can indicate emphasis or denote a different tone.
-
Using
<em>
: This tag is used for emphasizing text, suggesting that it should be read differently.<em>This text is emphasized and italicized.</em>
-
Using
<i>
: This tag simply italicizes the text without implying emphasis.<i>This text is italicized.</i>
Common Pitfall: Ensure you use <em>
for emphasis to improve accessibility, as screen readers recognize it as emphasized text.
Step 3: Using the Underline Tag
The underline tag is used to underline text, which can indicate links or important points.
-
Using
<u>
: This tag underlines the text.<u>This text is underlined.</u>
Real-World Application: Use underlining sparingly, as it can confuse users into thinking the text is a hyperlink.
Step 4: Combining Text Tags
You can combine different text formatting tags for enhanced styling.
<p>This is a <strong>bold</strong> and <em>italic</em> text that is also <u>underlined</u>.</p>
This example demonstrates how to emphasize text using multiple tags to achieve a combined effect.
Conclusion
In this tutorial, we covered essential text support tags in HTML, including bold, italic, and underline. These tags play a crucial role in improving the readability and aesthetic of your web content.
Next steps:
- Practice using these tags in your HTML projects.
- Explore more advanced CSS techniques to further enhance text styling.
By mastering these basic tags, you'll be well on your way to creating visually appealing web pages.