The style of an HTML element, can be applied with the style attribute.
<tagname style="property:value;">...</tagname>
The property is a CSS property. The value is a CSS value.
The CSS color property defines the color of text for an HTML element.
<body style="color: blue">
<p>This a paragraph tag</p>
</body>
<h2 style="color:crimson">SET inline style to change color of this heading</h2>
<p style="color: blueviolet">SET inline style to change color of paragraph text</p>
The CSS Background-color property defines the background color of an HTML element.
<body style="background-color: blue">
<p>This a paragraph tag</p>
</body>
<h2 style="background-color:crimson">SET inline style to change background color of this heading</h2>
<p style="background-color: blueviolet">SET inline style to change background color of paragraph text</p>
The CSS font-size property defines the font-size of an Text.
<body style="font-size:23px">
<p>This a paragraph tag</p>
</body>
<p style="font-size:15px">Change font text to 15px</p>
<p style="font-size:20px">Change font text to 20px</p>
<p style="font-size:25px">Change font text to 25px</p>
<p style="font-size:30px">Change font text to 30px</p>
The CSS text-align property defines the alignment of an Text.
<body style="text-align:center">
<p>This a paragraph tag</p>
</body>
<h2 style="text-align: right">Change text alignment to right</h2>
<h2 style="text-align: center">Change text alignment to center</h2>
<h2 style="text-align: left">Change text alignment to left</h2> <!-- left is by default-->
Share TDB SCHOOL
Share this E-Learning Website on social media platforms with your friends and followers