Using more than one CSS property : You can use more than one CSS property and value in a style attribute. All you have to do is use a semi-colon (;) to separate them.
Your browser will read all of the CSS properties and Here we’ve used two CSS properties apply them to your HTML element, so you can use as many as you need.
<body> <div style="background-color: lightblue; float: right;"> Hello world. We have used two CSS properties. </div> </body>
Sample output of above code:
Hello world. We have used two CSS properties.
The code Explained:
<!--Here we’ve used two CSS properties-->
Above code snippet is an HTML comment code and does not get processed, it is used for documentation of code.
Look at how we can change both the background colour and position of a
< div >!