Setting italic text in a webpage is another way to stylise texts. As we have already discussed, in a HTML Webpage to achieve certain result, we are required to use respective tag. Similarly, to set text as italic stylised text, we are required to use italic tag.
Italic tag – ‘<i></i>’. Italic stylised texts begins with open italic tag and ends with close italic tag. Italic tag has closing tag also.
When to use italic tag in a html webpage?
In certain situation, we may want to provide extra information related to certain information. In such scenario we can stylise the text as italic. By setting the style of the text as italic, the reader, viewer or user can easily understand it is extra information which is not important but describes the present information further in detail.
What does italic tag do in a html webpage?
When a browser comes across italic tag wrapped around text or texts, it sets the style of the wrapped text or texts into italic.
How to use italic tag in a HTML Webpage?
Lets take previous webpage example which we have created in previous chapter.
<title>This is a sample webpage</title>
<meta name=”content” description=”this is a sample webpage for practice purpose.”/>
This is a sample webpage. This webpage is for practice purpose. I have successfully developed the webpage.
Lets style ‘sample webpage’ as italic.
Steps to use italic tag in a HTML Webpage:
- Decide the beginning point. Here in the example, just before ‘sample’ is the beginning point. Place open italic tag.
This is a <i>sample webpage. This webpage is for practice purpose. I have successfully developed the webpage.
- Decide the end point. Here in the example, just after ‘webpage’ is the end point. Place close italic tag.
This is a <i>sample webpage</i>. This webpage is for practice purpose. I have successfully developed the webpage.
- Now save the file. Open it in a browser. The output would be as below.
If you can notice, then you could see the ‘sample webpage’ text in the example is set to italic.