Tuesday, 13 October 2015

How to Set a Background Image in HTML

<html>
<head> heading of the documents.
<title>Page Title</title>
 </head>
<body background="location of image\name of the image.format of image">

body part of documents....
 
</body>
</html>

Details:-

The background attribute specifies a background image for a document.

Document:-
<html>
<head>set background image of document.
<title>background image</title>
</head>
<body background="C:\Users\acer\Desktop\fish.jpg">

<h1>Hello world!</h1>
<p>The background attribute is not supported HTML5.</p>

</body>
</html>
Here:-
location/path of image:C:\Users\acer\Desktop\fish.jpg
image name:fish.jpg
format of image: .jpg
the format of image also .gif, .png, .bmp, etc..

Wednesday, 7 October 2015

how to set background color of page in html

Document 1:-
< html >
< head >set background color red.
< title > set background color< /title >
< /head >
< body bgcolor="red" >
Hello world !!!!!!!!!!!!!!

< /body >
< /html >


Details:-
< body bgcolor="red" > The color of background is red, which is the result of bgcolor attribute. 
Document 2:-
< html >
< head >set background color red.
< title > set background color< /title >
< /head >
< body bgcolor="#FF0000" >
Hello world !!!!!!!!!!!!!!

< /body >
< /html >

Details:-
< body bgcolor="#FF0000" > we also use the color code like bgcolor="#FF0000".

how to design a simple web page in html

< html >
< head >My first document
< title >simple page< /title >
< /head >
< body >
hello world......
< /body >
< /html >

Details :-
< html > The < html > and < /html >tags are used to mark the beginning and end of an HTML document.
< head > The HEAD tag is used to define the document header.
< title > The TITLE tag contains your document title and identifies its content in global context.the title tag is typically displayed in the title bar at the top of the browser window , but not inside the window itself.
< body >  which contains the content of your document's.the body tag define the document's body.