Inline Styles

In the inline styles, you can apply a style to specific elements on the Web page. To create and apply inline styles, you need to add style attribute to HTML tags. This type of style is useful when you want to define specific styles for individual elements present on a Web page.

Let’s do the following steps to create inline style in an HTML document:


<!DOCTYPE html>
<html>
<head>
    <title> Inline Styles</title>
</head>
<body>
    <h1>Example of Inline style Sheet</h1>
    <hr />
    <p style=”font-size: x-large; color: #ff9201”>
    CSS is a Cascading Style Sheet that is used to create styles
    By using various ways. Now we are using Inline Styles. This method is useful
    For defining specific styles.</p>
    <center>
    <p style=”font-size: large; color:#ff0000”>
    I am written in RED!!</p>
    <img src=”folder/arrow.jpg” /><br />
    <p style=”font-family: Georgia; font-size: large; color: #239006”>
    Moving round and round……. Rock N Roll……..</p>
    </center>
</body>
</html>

Save the document with the name InlineStyles.html and open on browser.