HTML MARQUEE:
Syntax:
<marquee></marquee>
Description:
The HTML <marquee> element is used to insert a scrolling area of text.
Example:
<marquee>This text will scroll from right to left</marquee>
Syntax:
<marquee></marquee>
Description:
The HTML <marquee> element is used to insert a scrolling area of text.
Example:
<marquee>This text will scroll from right to left</marquee>
HTML TABLES:
SYNTAX:
<table><tr><td></td></tr></table>
DESCRIPTION:
The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.
The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells.
Table Heading:
<table><tr><th></th></tr></table>
Table heading can be defined using <th> tag.
This tag will be put to replace <td> tag, which is used to represent actual data cell.
EXAMPLE:
<table border="1">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
OUTPUT:
Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2
Cellpadding and Cellspacing Attributes:
There are two attribiutes called cellpadding and cellspacing which will be used to adjust the white space in table cells.
The cellspacing attribute defines the width of the border, while cellpadding represents the distance between cell borders and the content within a cell.
Example:
<body>
<table border="1" cellpadding="5" cellspacing="5">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>AAA</td>
<td>50000</td>
</tr>
<tr>
<td>BBBB</td>
<td>70000</td>
</tr>
</table>
</body>
OUTPUT:
Name Salary
AAA 50000
BBB 70000
Table Height and Width:
We can set a table width and height using width and height attributes.
We can specify table width or height in terms of pixels or in terms of percentage of available screen area.
<body>
<table border="1" width="400" height="150">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
HTML FRAMES:
HTML frames are used to divide your browser window into multiple sections where each section can load a separate HTML document.
A collection of frames in the browser window is known as a frameset
DESCRIPTION:
Creating Frames:
To use frames on a page we use <frameset> tag instead of <body> tag.
The <frameset> tag defines how to divide the window into frames.
The rows attribute of <frameset> tag defines horizontal frames and cols attribute defines vertical frames.
Each frame is indicated by <frame> tag and it defines which HTML document shall open into the frame.
SYNTAX:
<frameset rows="pixels|%|*">
pixels The row height in pixels (like "100px" or just "100")
% The row height in percent of the available space (like "50%")
* The rest of the available space should be assigned this row
EXAMPLE:
1.<frameset rows="10%,80%,10%">
<frame name="top" src="/html/top_frame.htm" />
<frame name="main" src="/html/main_frame.htm" />
<frame name="bottom" src="/html/bottom_frame.htm" />
</frameset>
2. <frameset rows="25%,*,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
SYNTAX:
<table><tr><td></td></tr></table>
DESCRIPTION:
The HTML tables allow web authors to arrange data like text, images, links, other tables, etc. into rows and columns of cells.
The HTML tables are created using the <table> tag in which the <tr> tag is used to create table rows and <td> tag is used to create data cells.
Table Heading:
<table><tr><th></th></tr></table>
Table heading can be defined using <th> tag.
This tag will be put to replace <td> tag, which is used to represent actual data cell.
EXAMPLE:
<table border="1">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
OUTPUT:
Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2
Cellpadding and Cellspacing Attributes:
There are two attribiutes called cellpadding and cellspacing which will be used to adjust the white space in table cells.
The cellspacing attribute defines the width of the border, while cellpadding represents the distance between cell borders and the content within a cell.
Example:
<body>
<table border="1" cellpadding="5" cellspacing="5">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>AAA</td>
<td>50000</td>
</tr>
<tr>
<td>BBBB</td>
<td>70000</td>
</tr>
</table>
</body>
OUTPUT:
Name Salary
AAA 50000
BBB 70000
Table Height and Width:
We can set a table width and height using width and height attributes.
We can specify table width or height in terms of pixels or in terms of percentage of available screen area.
<body>
<table border="1" width="400" height="150">
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
</tr>
<tr>
<td>Row 2, Column 1</td>
<td>Row 2, Column 2</td>
</tr>
</table>
</body>
HTML FRAMES:
HTML frames are used to divide your browser window into multiple sections where each section can load a separate HTML document.
A collection of frames in the browser window is known as a frameset
DESCRIPTION:
Creating Frames:
To use frames on a page we use <frameset> tag instead of <body> tag.
The <frameset> tag defines how to divide the window into frames.
The rows attribute of <frameset> tag defines horizontal frames and cols attribute defines vertical frames.
Each frame is indicated by <frame> tag and it defines which HTML document shall open into the frame.
SYNTAX:
<frameset rows="pixels|%|*">
pixels The row height in pixels (like "100px" or just "100")
% The row height in percent of the available space (like "50%")
* The rest of the available space should be assigned this row
EXAMPLE:
1.<frameset rows="10%,80%,10%">
<frame name="top" src="/html/top_frame.htm" />
<frame name="main" src="/html/main_frame.htm" />
<frame name="bottom" src="/html/bottom_frame.htm" />
</frameset>
2. <frameset rows="25%,*,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
No comments:
Post a Comment