HTML: Style Attribute

The style attribute is used to set the style of an HTML element. In HTML5, the style attribute can be used on any HTML element. Syntax: –

style=“property1: property1-value; property2: property2-value;” Where property is CSS property and Property-value is CSS value.

<html>
	<head>
		<title>Hello CSS</title>
	</head>
	<body>
	<h1 style= color:blue  font-size: 45em; >
                   I am Heading
        </h1>
	<p style= color:rgb(38,226,85) font-size: 40px; > 
                  I am 1st Para
        </p>
	<p>I am second Paragraph</p>
	</body>
</html>
vikashdev k
Latest posts by vikashdev k (see all)
Tagged : / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x