👉Html ➖ style attribute :-
The style attribute in HTML is used to apply inline styles to individual HTML elements. It allows you to define CSS properties and their corresponding values directly within an HTML tag.
Syntax:-
<tagname style="property:value;">
Property of style:-
1 background-color
2 color
3 font-family
4 font-size
5 text-align
➖Use background-color for background color
ex:--<body style="background-color:red;">
➖Use color for text colors
ex:-<h1 style="background-color:blue;">programmingworld</h1>
➖Use font-family for text fonts
Ex:- <h1 style="color:blue;">programmingworld</h1>
➖Use font-size for text sizes
Ex:- <h1 style="font-family:verdana;">programmingworld</h1>
➖Use text-align for text alignment
Ex:- <h1 style="text-align:center;">programmingworld</h1>
0 Comments