BACKGROUND & COMMENT
1.BACKGROUND
CAN BE CHANGED WITH COLOURS
2.
BACKGROUND CAN BE CHANGED WITH IMAGES
CHANGING
OF HTML BACKGROUND WITH COLOURS:-
SYNTAX:
<BACKGROUND BGCOLOR=”COLOUR VALUE”>
HERE
‘BGCOLOR’ IS THE ATTRIBUTE OF <BACKGROUND> TAG
COLOUR
VALUE CAN BE PURE ‘COLOUR NAME’ OR ‘HEXADECIMAL VALUE OF COLOUR’ OR ‘COLOUR VALUE IN BGB TERMS’.
EXAMPLE
OF FORMAT OF COLOUR VALUE IN COLOUR NAME:-
<BACKGROUND BGCOLOR=”PINK”>
EXAMPLE
OF FORMAT OF COLOUR VALUE IN HEXADECIMAL:-
<BACKGROUND BGCOLOR=”#f1f1f1”>
EXAMPLE
OF FORMAT OF COLOUR VALUE IN RGB:-
<BACKGROUND BGCOLOR=”rgb(0,10,155)”>
CODING FOR THE EXAMPLE OF COLOUR VALUE
IN COLOUR NAME:-
<HTML>
<HEAD>
<TITLE>..........</TITLE>
</HEAD>
<BODY BGCOLOR="PURPLE">
<BR><BR><BR><BR><BR><BR>
<CENTER>
<FONT
COLOR="RED" SIZE=7>
<P>IT
IS AN EXAMPLE</P>
</FONT>
</CENTER>
</BODY>
</HTML>
RESULT:-
HERE
HTML BACKGROUND COLOUR IS ‘PURPLE’.
CODING FOR THE EXAMPLE OF COLOUR VALUE
IN HEXADECIMAL:-
<HTML>
<HEAD>
<TITLE>HEXADECIMAL
COLOUR</TITLE>
</HEAD>
<BODY BGCOLOR="#ffff11">
<BR><BR><BR><BR><BR><BR>
<CENTER>
<FONT
COLOR="PURPLE" SIZE=7>
<P>IT
IS A HEXADECIMAL COLOUR EXAMPLE</P>
</FONT>
</CENTER>
</BODY>
</HTML>
RESULT:-
HERE
HEXADECIMAL COLOUR VALUE IS USED.
CODING FOR THE EXAMPLE OF COLOUR VALUE
IN RGB:-
<HTML>
<HEAD>
<TITLE>HEXADECIMAL
COLOUR</TITLE>
</HEAD>
<BODY BGCOLOR="#rgb(114,155,0)">
<BR><BR><BR><BR><BR><BR>
<CENTER>
<FONT
COLOR="RED" SIZE=7>
<P>IT
IS A RGB COLOUR EXAMPLE</P>
</FONT>
</CENTER>
</BODY>
</HTML>
RESULT:-
HERE
RGB CLOUR FORMAT IS USED.
CHANGING OF BACKGROUND USING IMAGES:-
IN
THIS CASE ‘BACKGROUND’ATTRIBUTE OF <BODY> TAG IS USED WHERE URL OR ADDRESS OF
THE IMAGE IS GIVEN.
FORMAT:-
<BODY BACKGROUND=”IMAGE ADDRESS OR URL”>
EXAMPLE OF CHANGING HTML BACKGROUND
USING IMAGE:-
CODING:-
<HTML>
<HEAD>
<TITLE>IMAGE
BACKGROUND</TITLE>
</HEAD>
<BODY
BACKGROUND="G:\v.jpg">
</BODY>
</HTML>
RESULT:-
HERE
BACKGROUND IS CHANGED USING IMAGE.
COMMENT TAG:-
NOW
I’II DISCUSS ABOUT ANOTHER TAG WHICH IS ‘COMMENT’
TAG. GENERALLY ‘COMMENTS’ ARE WRITTEN INSIDE
THE CODING FOR PROGRAMMERS’ BENEFITS TO REALISE THE CODING AFTER SOME TIME OR
SOME DAYS OR WHENEVER AGAIN WHEN SAME PROGRAM OR SAME TYPE OF PROGRAM IS NEEDED.
HTML
COMMENTS ARE USED BETWEEN <!----COMMENTS ….> TAG.
WHICH IS WRITTEN AS A COMMENT INSIDE THE CODING WILL NOT BE DISPLAYED IN THE
RESULT.
FORMAT:-
<! …..COMMENT ……>
EXAMPLE:
CODING:-
<HTML>
<HEAD>
<TITLE>CMMENT
EXAMPLE</TITLE>
</HEAD>
<BODY
BGCOLOR="CYAN">
<! IT IS A COMMENT>
<BR><BR><BR><BR><BR><BR>
<CENTER>
<FONT
COLOR="RED" SIZE=7>
<P>IT
IS AN EXAMPLE FOR COMMENT</P>
</FONT>
</CENTER>
</BODY>
</HTML>
RESULT:-
HERE
COMMENT IS NOT DISPLAYED IN THE RESULT.
No comments:
Post a Comment