HTML styles are used to change the appearance of HTML elements. Using styles, you can control colors, fonts, sizes, alignment, spacing, and much more.
style attribute is used to add CSS styles directly to an HTML element.
The style attribute allows you to apply CSS properties directly inside an HTML tag.
<p style="color:red;"> Welcome to Soopro Pathshala </p>
The CSS background-color property defines the background color of an HTML element.
<body style="background-color:skyblue;"> <h1>This is Heading</h1> </body>
The CSS color property changes the text color.
<h2 style="color:red;"> Welcome to Soopro Pathshala </h2>
The CSS font-family property specifies the font style of text.
<p style="font-family:Verdana;"> This is my paragraph </p>
The CSS font-size property defines the size of text.
<p style="font-size:160%;"> This is a paragraph. </p>
The CSS text-align property controls horizontal alignment.
<h1 style="text-align:center;"> Centered Heading </h1>
Which attribute is used for inline CSS?