How to use multiple style properties in a single HTML element ? For example if I want to us background color and text color properties in a single heading, then what will be the syntax ?
You can just continue on a new line within the brackets:
.className{
background-color: black;
color: white;
}
For example
<!DOCTYPE html>
<html>
<head></head>
<body>
<h1 style="color:green;">This is a heading</h1>
</body>
</html>
Now how to use another style in the same heading?
I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.
Note that inline styles are considered a bad practice, but it works the same as with a separate stylesheet. You can just add new styles separated with a semicolon:
<h1 style="color:green; background-color:black">This is a heading</h1>
Thank you very much…