Is <div style="width: ;height: ;background: ">
CSS?
For example :
<div style="height:100px; width:100px; background:#000000"></div>
here.
you give css to div of height and width having 100px and background as black.
PS : try to avoid inline-css you can make external CSS and import in your html file.
you can refer here for CSS
hope this helps.
Yes, it is called Inline CSS, Here you styling the div
using some height, width, and background.
Here the example:
<div style="width:50px;height:50px;background color:red">
You can achieve same using Internal or External CSS
2.Internal CSS:
<head>
<style>
div {
height:50px;
width:50px;
background-color:red;
foreground-color:white;
}
</style>
</head>
<body>
<div></div>
</body>
3.External CSS:
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div></div>
</body>
style.css /external css file/
div {
height:50px;
width:50px;
background-color:red;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With