Web Programming HTML 1,2
Web Programming HTML 1,2
Programming
HTML
(Hyper Text Markup Language)
HTML Lists
Unordered lists
• create the familiar set of bullet points seen in Word documents.
• This list is created by using HTML <ul> tag.
• Each item in the list is marked with a bullet.
<dt><b>HTTP</b></dt>
• EX:
• <table border = "1" bordercolor = "green" bgcolor = "yellow">
• EX:
• <table border = "1" bordercolor = "green" background =
"/images/test.png">
Table Element
<!DOCTYPE html><html> <head> <title>HTML Table Colspan/Rowspan</title>
</head<body>
<table border = "1" bordercolor = "green" bgcolor = "yellow">
<tr> <th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr> <td rowspan = "2">Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
<td>Row 1 Cell 3</td>
</tr>
<tr> <td>Row 2 Cell 2</td>
<td>Row 2 Cell 3</td>
</tr>
<tr> <td colspan = "3">Row 3 Cell 1</td> </tr>
</table>
</body></html
Table Element
Row 3 Cell 1
Table Element
• A table width and height can be set using width and height
attributes
• <table border = "1" width = "400" height = "150">
• The three elements for separating the head, body, and foot of a table
are :
• <thead> − to create a separate table header.
• <tbody> − to indicate the main body of the table.
• <tfoot> − to create a separate table footer.
Marquee in HTML
Marquee attributes
• behavior :Sets how the text is scrolled within the marquee. Possible
values are scroll, slide and alternate. If no value is specified, the default
value is scroll.
• bgcolor :Sets the background color through color name or hexadecimal
value.
• direction :Sets the direction of the scrolling within the marquee.
Possible values are left, right, up and down. If no value is specified, the
default value is left.
• height :Sets the height in pixels or percentage value.
• hspace : Sets the horizontal margin.
Marquee in HTML
• loop :Sets the number of times the marquee will scroll. If no value is
specified, the default value is −1, which means the marquee will
scroll continuously.
• scrollamount :Sets the amount of scrolling at each interval in pixels.
The default value is 6.
• scrolldelay :Sets the interval between each scroll movement in
milliseconds. The default value is 85. Note that any value smaller than
60 is ignored and the value 60 is used instead unless truespeed is
specified.
• vspace :Sets the vertical margin in pixels or percentage value.
• width :Sets the width in pixels or percentage value.
Marquee in HTML
<marquee>This text will scroll from right to left</marquee>
• 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.
• The <noframes> tag is the backup for those browsers that does not
support frames.
Frameset
<!DOCTYPE html><html><head><title>HTML Frames</title></head>
<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" />
<noframes>
<body>Your browser does not support frames.</body> </noframes>
</frameset></html>
Frameset
<!DOCTYPE html><html> <head> <title>HTML Frames</title>
</head> <frameset cols = "25%,50%,25%">
<noframes>
<body>Your browser does not support frames.</body>
</noframes>
</frameset></html>
Iframe
• You can define an inline frame with HTML tag <iframe>.
• The <iframe> tag is not somehow related to <frameset> tag, instead,
it can appear anywhere in your document.
• The <iframe> tag defines a rectangular region within the document in
which the browser can display a separate document, including
scrollbars and borders. An inline frame is used to embed another
document within the current HTML document.
Iframe
<!DOCTYPE html><html> <head> <title>HTML
Iframes</title> </head> <body>
<p>Document content goes here...</p>
</iframe>
<iframe height="300"
width="350"
src=
"https://media.geeksforgeeks.org/wp-content/uploads/20210910170539/gfg-221x300.png"
name="iframe_a">
</iframe>
<p><a href=
"https://ide.geeksforgeeks.org/tryit.php"
target="iframe_a">
GeeksforGeeks IDE
</a> </p>
</body></html>