+ 1
how do i add a background-image using inline style? suppose i have a image in my d drive named a.jpg ..what is the correct entry??
3 Answers
+ 3
It's better to move or copy the image to the same folder where you have your HTML documents.
<body style="background:url('a.jpg');">
+ 1
Try to avoid inline-style. It's better to use CSS. Create a folder "images" inside your main folder. Then add stylesheet "style.css" link to your HTML file. Insert code below into your "style.css".
.your_block_class{
background-img: url(../images/a.jpg);
}
You can also use id, if you want.
- 1
body{
background:url("a.jpg") ;
}