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.

		<title>Hello CSS</title>
	<h1 style= color:blue  font-size: 45em; >
                   I am Heading
	<p style= color:rgb(38,226,85) font-size: 40px; > 
                  I am 1st Para
	<p>I am second Paragraph</p>
Tagged : / / / / / /

HTML: Style Tag

The <style> tag is used to declare style sheets within the head of  HTML document. Inside the <style> element you specify how HTML elements should render in a browser. Each HTML document can contain multiple <style> tags.

mediamedia_querySpecifies what media/device the media resource is optimized for
scopedscopedSpecifies that the styles only apply to this element’s parent element and that element’s child elements
typetext/cssSpecifies the media type of the <style> tag
	<body style="background-color: rgb(180, 221, 67);">
	<h1 style="text-align: center;">Style tag</h1>
	<p style="margin-bottom: auto;">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, nobis.</p>
	<p style="color: blue;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Fuga, eligendi?</p>
Tagged : / / / / / / /