Answer:
some text in any colour other than black.<html> </body> |
Full Topic
Two method are used to add image as background
- Using the Background attribute (Html Tag)
- Using an Internal Style Sheet
1. Using Background Attribute
Syntax:-
<Body background="jpgfilename.extension">
If jpg image not stored in same directory of html file then we have to write full address of jpg filename.
<Html> |
2.Using an Internal Style Sheet
Syntax:-
<style >
body {
background-image : url('img_girl.jpg') ;
background-repeat : no-repeat ;
background-attachment : fixed ;
background-size : cover ;
}
</style >
<!DOCTYPE html> <html> <head> <style> body { background-image: url('img_girl.jpg'); background-repeat: no-repeat; background-attachment: fixed; background-size: cover; } </style> </head> <body> <h2>Background Cover</h2> <p>Set the background-size property to "cover" and the background image will cover the entire element, in this case the body element.</p> </body> |
For text color we can write in body text like following
<h3 style="color:Tomato;">Hello World</h3> |
No comments:
Post a Comment