0% found this document useful (0 votes)
3 views

HTML 2

html

Uploaded by

sumitroy8372
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

HTML 2

html

Uploaded by

sumitroy8372
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Font Face:-

We can set any font as we like using face attribute.


 Default font face is Times New Roman.
Example:- <font face=“ALGERIAN”> computer </font>
Result:- computer
Font Colour:-
We can set any font colour using color attribute.
 We can specify any colour as we like by colour name or hexadecimal
code for that colour.
Example:- <font color=“Green”> computer science </font>
Result:- computer science
HTML Images:-
we can insert image in our webpage by using <img> tag.
****Syntax for image tag:-
<img src=“image URL” attr_name=“attr_value”........more attributes/>
Page 1
Page 2
Linking Documents:-
A link is specified using the <a> element. This element is called Anchor Tag as well.
Anything between the opening <a> tag and the closing </a> tag becomes part of
the link and a user can click that part to reach to the linked document.
****Syntax for hyperlink:-
<a href=“document URL” attr_name= “attr_value”.....more attributes/>
Example:-
<a href=“http://www.google.com”> Google </a>
<a href=“http://www.yahoo.com”> Yahoo </a>
<a href=“http://www.hotmail.com”> Hotmail </a>
Result:- Google Yahoo Hotmail

What are the different types of list in HTML?


Ans:- there are two types of list in HTML:-
•Unordered List
•Ordered List Page 3
Unordered List:-
An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
Example:-
<ul>
<li>Darjeeling</li>
<li>Kurseong</li>
</ul>
Result:
•Darjeeling
•Kurseong

Ordered List:-
An Ordered list starts with the <ol> tag. Each list item starts with the <li> tag.
Example:-
<ol>
<li>Darjeeling</li>
<li>Kurseong</li>
</ol>
Result:
1. Darjeeling
2. Kurseong

Page 4
HTML Tables:-
Tables are very useful to arrange in HTML and they are used very
frequently by almost all web developers. Tables are just like spreadsheets and they
are made up of rows and columns.

********What are the different Table Tags?


<table>:-To create table in HTML <table> tag is used.
<tr> :- A row is contained inside a <tr> tag. Which stands for table row.
<td> :- Each cell is written inside the row element using <td> tag. Which stands
for table data.
<th> :- Table heading can be defined using <th> element. Which stands for
table heading.

Page 5
Example:-
<table border=“1”>
<tr>
<td> Country</td>
<td> Capital </td>
</tr>
<tr>
<td> India </td>
<td> New Delhi </td>
</tr>
</table>
Result:-

Country Capital
India New Delhi

Page 6
Different table attributes:-
cell padding:- cell padding represents the distance between cell borders and
the content within.

cell spacing:- Cell spacing defines the width of the border.

Colspan:- It is used to merge two or more columns into a single column.

Rowspan:- It is used to merge two or more rows into a single row.

Bgcolor:- we can set background colour for whole table or just for one cell.

Background:- we can set background image for whole table or just for one cell.

Page 7

You might also like