Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

FRONT END

(Html)
LECTURE-5
Today’s Agenda

How to work with background

How to print special characters


Impt Attributes Of Body Tag

 The <body> tag has following important attributes:


1. bgcolor : used to set the Background Color

<body bgcolor=“blue” >


OR
<body bgcolor=“#0000FF” >

For getting names of all colors , visit:


 https://www.w3schools.com/colors/colors_names.asp
Impt Attributes Of Body Tag

2. text : used to set the text color

<body text=“crimson” >


OR
<body text=“#DC143C” >

For getting names of all colors , visit:


 https://www.w3schools.com/colors/colors_names.asp
Impt Attributes Of Body Tag

3. background : used to set the background image


<body background=“mypic.jpg” >

An important point to understand here is that the image specified


in the “background” tiles itself i.e. it repeats itself to fill the entire
page.

To overcome this we use CSS


Impt Attributes Of Body Tag

4. link : used to set the color of unvisited links

<body link=“green” >


This changes the color of all of the non-visited links on our page to
green.
Impt Attributes Of Body Tag

5. alink : used to set the color of active links

<body alink=“maroon” >


This changes the color of all active links, which is a link that has
just been clicked on by a user's mouse on our page, to maroon.
Impt Attributes Of Body Tag

6. vlink : used to set the color of visited links

<body vlink=“yellow” >


This changes the color of all visited links, on our page, to yellow.
The <center> Tag

The HTML <center> tag is used to center-align HTML elements.

Syntax:
<body>
<center>
<!– other tags and data - - >
</center>
</body>
Printing Special Characters

Since HTML itself uses certain characters for its markup, so


normally browser will not display them.

But HTML allows us to display these characters.


In order to do this, we use entities.

Entities are written in the following format:


&name;
OR
&numeric_code;
Printing Special Characters

Some commonly used entities are:


&amp;
For & character
&lt;
For < character
&gt;
For > character
&quot;
For " character
&nbsp;
This is a space when we want more than one space between
things
Printing Special Characters

For a complete list of all special characters , visit the following


page:

http://www.degraeve.com/reference/specialcharacters.php
End Of Lecture

For any queries mail us @: scalive4u@gmail.com


Call us @ : 0755-4271659, 9826686245

Agenda for Next Lecture:


1. Using HTML Tables

You might also like