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.
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.
When a browser comes across italic tag wrapped around text or texts, it sets the style of the wrapped text or texts into italic.
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:
This is a <i>sample webpage. This webpage is for practice purpose. I have successfully developed the webpage.
This is a <i>sample webpage</i>. This webpage is for practice purpose. I have successfully developed the webpage.
If you can notice, then you could see the ‘sample webpage’ text in the example is set to italic.