0% found this document useful (0 votes)
45 views5 pages

Table Tag

Uploaded by

vrathod07913
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views5 pages

Table Tag

Uploaded by

vrathod07913
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

The <table> tag defines an HTML table .

An HTML table consists of one <table> element and


one or more <tr>, <th>, and <td> elements. The <tr> element defines a table row, the <th>
element defines a table header, and the <td> element defines a table cell.

Define an HTML Table


A table in HTML consists of table cells inside rows and columns

Example
A simple HTML table:

<table>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
<div> tag
The <div> tag defines a division or a section in an HTML document . The <div> tag is used
as a container for HTML elements - which is then styled with CSS or manipulated with
JavaScript. The <div> tag is easily styled by using the class or id attribute. Any sort of content
can be put inside the <div> tag!

The <marquee> tag is a container tag of HTML is implemented for creating scrollable
text or images within a web page from either left to right or vice versa, or top to bottom
or vice versa. But this tag has been deprecated in the new version of HTML, i.e.,
HTML 5.

The different attributes of <marquee> tag are:


Attribute Description
width provides the width or breadth of a marquee. For example width="10" or width="20%"
height provides the height or length of a marquee. For example height="20" or height="30%"
direction provides the direction or way in which your marquee will allow you to scroll. The value
of this attribute can be: left, right, up or down
scrolldelay provides a feature whose value will be used for delaying among each jump.
scrollamount provides value for speeding the marquee feature
behavior provides the scrolling type in a marquee. That scrolling can be like sliding, scrolling or
alternate
loop provides how many times the marquee will loop
bgcolor provides a background color where the value will be either the name of the color or
the hexadecimal color-code.
vspace provides a vertical space and its value can be like: vspace="20" or vspace="30%"
hspace provides a horizontal space and its value can be like: vspace="20" or vspace="30%"
Here's are some example of how to use <marquee> tag in HTML:

Marquee speed can be changed using the "scrollmount" attribute. For example, if you
are using scrollmount = "1" then it sets the marque to scroll very slowly, and as you
increase the "scrollmount," the scrolling speed will also increase.

Scrolling speed
Example:
<marquee behavior="scroll" direction="up" scrollamount="1">Slow Scrolling</marquee>
<marquee behavior="scroll" direction="right" scrollamount="12">Little Fast Scrolling</marquee>
<marquee behavior="scroll" direction="left" scrollamount="20">Fast Scrolling</marquee>
<marquee behavior="scroll" direction="right" scrollamount="50">Very Fast Scrolling</marquee>

Blinking text within marquee

<!DOCTYPE html>
<html>
<head>
<title>Example of a blinking text using CSS within a marquee</title>
<style>
.blink {
animation: blinker 1.5s linear infinite;
color: red;
font-family: sans-serif;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
</style>
</head>
<body>
<marquee class="blink">This is an example of blinking text using CSS within a marquee.</marquee>
</body>
</html>

You might also like