HTML I Tutorial

G:hackHTMLmyHTML-Tutorial13- i�1.png

The <i> elements stands for “italic” and we use it to italicize a letter/ word/ sentence or an entire paragraph. It’s another way of bringing attention to a text.

For example:

<!DOCTYPE html>
<html>
<title> Learning HTML is fun 🙂 </title>
<head>
</head>
<body >
<h1>Simple paragraph</h1>
<p>A simple <b>paragraph</b> is comprised of <b>three</b> major components.<br> <b>The first sentence</b>, which is often a declarative sentence, is called the <i>“topic sentence”</i>. <br>It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
<hr>
</body>
</html>

Note: so far we have used elements like <b> and <i> within the body of other elements like <p> element.

This means for those elements that have opening and closing tags like <p> </p> or <body> </body> we can use other html elements.

For example:

<!DOCTYPE html>
<html>
<title> Learning HTML is fun 🙂 </title>
<head>
</head>
<body >
<i>
<h1>Simple paragraph</h1>
<p>A simple <b>paragraph</b> is comprised of <b>three</b> major components.<br> <b>The first sentence</b>, which is often a declarative sentence, is called the “topic sentence.” <br>It introduces the topic of the paragraph, setting its tone and mood. The next few sentences elaborate, explain, and exemplify the topic introduced in it.</p>
</i>
<hr>
</body>
</html>

As the result shows, the entire paragraph and its headline have italic style.