HTML1
HTML1
HTML
Introduction:
l
Web technologies can be categorized into two types:
l
Client side
l
Server side
l
Client side technologies are used for designing and
performing client side validations.
l
Server side technologies are used for fetching the data
from database and implementing business logic.
Introduction:
l
Web technologies can be categorized into two types:
l
Client side
l
Server side
l
Client side technologies are used for designing and
performing client side validations.
l
Server side technologies are used for fetching the data
from database and implementing business logic.
HTML (Hyper Text Markup Language)
l
Commonly used to create the web page.
l
Provides a means to describe the structure of text and
graphics on a web page.
l
HTML is developed and maintained by World Wide Web
Consortium(W3C).
HTML Document Structure
l
<!DOCTYPE>
l <Html>
l
<Head>
l <Title>
l </Title>
l
</Head>
l
<Body>
l
</Body>
l </Html>
l
<!DOCTYPE>
l
Is the first tag in HTML document which specifies DTD
used by the document.
l
A DTD is separate file containing formal definition of
grammar used in markup language.
l
The browser checks the code of document against the
rule in <!DOCTYPE> declaration.
l
Tells the browser about the version of language.
l
Does not have a closing tag
The <!DOCTYPE> declaration helps the browser to display
a web page correctly.
l
There are many different documents on the web, and a
browser can only display an HTML page 100%
correctly if it knows the HTML type and version
used.
l
The <title> tag contains the title of HTML
document that appears in the title bar of web page.
l
It is used by search engine to refer the document.
l
<body> tag contains body of html document.
l
It includes entire content that will appear in the
web browser.
l
Can also include text, images and multimedia
elements.
•The <!DOCTYPE> Declaration
HTML documents must start with a document type definition
(DTD)
It tells web browsers what type is the served code
Possible versions: HTML 4.01, XHTML 1.0
(Transitional or Strict), XHTML 1.1, HTML 5
Example:
• 8
•<head> Section: <title> tag
Title should be placed between < h ead > and < /h ead >
tags
• <title>Telerik Academy – Winter Season 2009/2010
</title>
• 9
•The < h ead > Section
Contains information that doesn’t show directly on the
viewable page
Starts after the < !doctype> declaration
Begins with < head> and ends with < /head>
Contains mandatory single <title> tag
Can contain some other tags, e.g.
<meta>
<script>
<style>
<!– comments >
• 1
l <!DOCTYPE html>
l <html>
l <body>
l <p>My first paragraph.</p>
l </body>
l </html>
• Internet Programming •First HTML Page
• test.html
• <!DOCTYPE HTML>
• <html>
• <head>
• <title>My First HTML Page</title>
• </head>
• <body>
• <p>This is some text that will appear on web page
• </p>
• </body>
• </html>
• 1
HTML Headings
l HTML headings are defined with the <h1>
to <h6> tags.
l <!DOCTYPE html>
l <html>
l <body>
l <h1>This is heading 1</h1>
l <h2>This is heading 2</h2>
l <h3>This is heading 3</h3>
l <h4>This is heading 4</h4>
l <h5>This is heading 5</h5>
l <h6>This is heading 6</h6>
l </body>
l </html>
HTML Headings
l
Browsers automatically add some empty space (a
margin) before and after each heading.
l
Use HTML headings for headings only. Don't use
headings to make text BIG or bold.
l
Search engines use your headings to index the
structure and content of your web pages.
l
H1 headings should be used as main headings,
followed by H2 headings, then the less important
H3 headings, and so.
images
l
HTML images are defined with the <img> tag.
l
<!DOCTYPE html>
l
<html>
l
<body>
l
<img src=“path“ /> </body>
l
</html>
images
l
The <img> tag is empty, which means that it
contains attributes only, and has no closing tag.
l
To display an image on a page, you need to use the
src attribute.
l
Src stands for "source".
l
The value of the src attribute is the URL of the
image you want to display.
images
l
The alt attribute specifies an alternate text for an
image, if the image cannot be displayed.
l
<img src=“” alt=“”/>
l
The alt attribute provides alternative information for
an image if a user for some reason cannot view
image.
l
The height and width attributes are used to specify
the height and width of an image.
l
The attribute values are specified in pixels by
default:
•Some Simple Tags –
Example
• some-tags.html
• <!DOCTYPE HTML>
• <html>
• <head>
• <title>Simple Tags Demo</title>
• </head>
• <body>
• <a href="http://www.tsec.com/" title=
• "TSEC site">This is a link.</a>
• <br />
• <img src=“image1.gif" alt=“boat" />
• <br />
• <strong>Bold</strong> and <em>italic</em> text.
• </body>
• </html>
• 1
•Headings and Paragraphs – Example
• headings.html
• <!DOCTYPE HTML>
• <html>
• <head><title>Headings and paragraphs</title></head>
• <body>
• <h1>Heading 1</h1>
• <h2>Sub heading 2</h2>
• <h3>Sub heading 3</h3>
• <div style="background:skyblue">
• This is a div</div>
• </body>
• </html>
l
Attributes provide additional information about
HTML elements.
l
Attributes are always specified in the start tag
l
Attributes come in name/value pairs
like: name="value“
l
Attribute values should always be enclosed in
quotes.
l
The <hr> tag creates a horizontal line in an HTML
page.
l
<br> tag is used for line break.
• Internet Programming •Text Formatting
Text formatting tags modify the text between the opening tag
and the closing tag
Ex. < b> H ello< /b> makes “Hello” bold
• 2
• Internet Programming
•
•Text Formatting – Example
text-formatting.html
• <!DOCTYPE html PUBLIC "//W3C//DTD XHTML 1.0 Transitional//EN"
• "http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">
• <html>
• <head>
• <title>Page Title</title>
• </head>
• <body>
• <h1>Notice</h1>
• <p>This is a <em>sample</em> Web page.</p>
• <p><pre>Next paragraph:
• preformatted.</pre></p>
• <h2>More Info</h2>
• <p>Specifically, we’re using XHMTL 1.0 transitional.<br />
• Next line.</p>
• </body>
• </html>
• 2
HTML Links(Hyperlink)
l
The HTML <a> tag defines a hyperlink.
l
A hyperlink (or link) is a word, group of words, or
image that you can click on to jump to another
document.
l
When you move the cursor over a link in a Web
page, the arrow will turn into a little hand.
l
The most important attribute of the <a> element is
the href attribute, which indicates the link's
destination.
• Web Programming
•Hyperlinks: <a> Tag
Link to a document called form .htm lon the same server in
the same directory:
• <a href="stuff/cat.html">Catalog</a>
• 2
• Internet Programming
•Hyperlinks: <a> Tag
Link to an external Web site:
• 2
• Internet Programming
•Hyperlinks: <a> Tag
Link to a document called apply-now .htm l
On the same server, in same directory
Using an image as a link button:
• <a href="applynow.html"><img
• src="applynowbutton.jpg" /></a>
• <a href="../english/index.html">Switch to
English version</a>
• 2
• Internet Programming
•Hyperlinks and Sections
Link to another location in the same document:
Link to a specific location in another document:
• 2
• Internet Programming •Hyperlinks – Example
• hyperlinks.html
• <a href="form.html">Fill Our Form</a> <br />
• <a href="../parent.html">Parent</a> <br />
• <a href="stuff/cat.html">Catalog</a> <br />
• <a href="http://www.devbg.org" target="_blank">BASD</a>
<br />
• <a href="mailto:[email protected]?subject=Bug Report">Please
report bugs here (by email only)</a>
• <br />
• <a href="applynow.html"><img src="applynowbutton.jpg”
/></a> <br />
• <a href="../english/index.html">Switch to English version</a>
<br />
• 2
• Internet Programming
•Hyperlinks – Example
• hyperlinks.html
• <a href="form.html">Fill Our Form</a> <br />
• <a href="../parent.html">Parent</a> <br />
• <a href="stuff/cat.html">Catalog</a> <br />
• <a href="http://www.devbg.org" target="_blank">BASD</a>
<br />
• <a href="mailto:[email protected]?subject=Bug Report">Please
report bugs here (by email only)</a>
• <br />
• <a href="applynow.html"><img src="applynowbutton.jpg”
/></a> <br />
• <a href="../english/index.html">Switch to English version</a>
<br />
• 3
• Internet Programming •Links to the Same Document
– Example
• links-to-same-document.html
• 3
l
By default, links will appear as follows in all
browsers:
l
An unvisited link is underlined and blue
l
A visited link is underlined and purple
l
An active link is underlined and red
l
<a href="http://www.google.com/">click here</a>
• Internet Programming•Links to the Same Document –
Example
• links-to-same-document.html
• 3
• Internet Programming
•Miscellaneous Tags
< h r /> : Draws a horizontal rule (line):
• <center>Hello World!</center>
• 3
• Internet
Programming
•Miscellaneous Tags – Example
• misc.html
• 3
• Internet Programming
•Ordered Lists: <ol> Tag
Create an Ordered List using < ol> < /ol> :
Attribute values for type are 1, A, a, I, or i
• <ol type="1">
• <li>Apple</li>
• <li>Orange</li>
• <li>Grapefruit</li>
• </ol>
1.Apple i. Apple
2.Orange ii.Orange
3.Grapefruit iii.Grapefruit
a.Apple
A.Apple b.Orange I. Apple
B.Orange c.Grapefruit II.Orange
C.Grapefruit III.Grapefruit
• 3
• Internet Programming
Unordered Lists: <ul> Tag
Create an Unordered List using < u l> < /u l> :
• <ul type="disk">
• <li>Apple</li>
• <li>Orange</li>
• <li>Grapefruit</li>
• </ul>
• 3
• Internet Programming Definition lists: <dl> tag
• <dl>
– <dt>HTML</dt>
– <dd>A markup language …</dd>
– <dt>CSS</dt>
– <dd>Language used to …</dd>
• </dl>
• <ul type="disc">
• <li>Apple</li>
• <li>Orange</li>
• <li>Grapefruit</li>
• </ul>
• <dl>
• <dt>HTML</dt>
• <dd>A markup lang…</dd>
• </dl>
• 3
Internet Programming HTML Special Characters
Symbol Name HTML Entity Symbol
Copyright Sign & cop y; ©
Registered Trademark Sign & reg ; ®
Trademark Sign & trad e; ™
Less Than & lt; <
Greater Than & g t; >
Ampersand & am p ; &
Non-breaking Space & n b sp ;
Em Dash & m d ash ; —
Quotation Mark & q u ot; "
Euro & # 8364; €
British Pound & p ou n d ; £
Japanese Yen & yen ; ¥
• 4
Internet Programming
•Special Characters – Example
• <p>[>> Welcome • special-chars.html
• <<]</p>
• <p>►I have following cards:
• A♣, K♦ and 9♥.</p>
• <p>►I prefer hard rock ♫
• music ♫</p>
• <p>© 2006 by Svetlin Nakov & his team</p>
• <p>Telerik Academy™</p>
• 4
• Web Programming
•Special Chars – Example
• • special-chars.html
< p > [& g t;& g t;& n b sp ;& n b sp ;W elcom e
• & n b sp ;& n b sp ;& lt;& lt;]< /p >
• < p > & # 9658;I h ave follow in g card s:
• A & # 9827;, K & # 9830; an d 9& # 9829;.< /p >
• < p > & # 9658;I p refer h ard rock & # 9835;
• m u sic & # 9835;< /p >
• < p > & cop y; 2006 b y S vetlin N akov & am p ; h is
team < /p >
• < p > Telerik A cad em y™ < /p >
• 4
Internet Programming •Block and Inline Elements
Block elements add a line break before and after them
< div> is a block element
Other block elements are < table> , < hr> , headings,
lists, < p> and etc.
Inline elements don’t break the text before and after them
< span> is an inline element
Most HTML elements are inline, e.g. < a>
• 4
• Web Programming •The <div> Tag
< div> creates logical divisions within a page
Block style element
Used with CSS
Example:
• div-and-span.html
• <div style="fontsize:24px; color:red">DIV example</div>
• <p>This one is <span style="color:red; font
weight:bold">only a test</span>.</p>
• 4
Internet Programming • The <span> Tag
• span.html
• <p>This one is <span style="color:red; fontweight:bold">only a
test</span>.</p>
• <p>This one is another <span style="fontsize:32px; font
weight:bold">TEST</span>.</p>
• 4
Internet Programming
•HTML Tables
Internet Programming •HTML Tables
Tables represent tabular data
A table consists of one or several rows
Each row has one or more columns
Tables comprised of several core tags: < table> < /table> : begin / end
the table
< tr> < /tr> : create a table row
< td> < /td> : create tabular data (cell)
Tables should not be used for layout. Use CSS floats and positioning
styles instead
• 4
Internet Programming •HTML Tables
Start and end of a table
Start and end of a row
Start and end of a cell in a row
• 4
Internet Programming
•Simple HTML Tables – Example
• < table cellspacing= "0" cellpadding= "5">
• < tr>
• < td> < im g src= "ppt.gif"> < /td>
• < td> < a href= "lecture1.ppt"> Lecture 1< /a> < /td>
• < /tr>
• < tr>
• < td> < im g src= "ppt.gif"> < /td>
• < td> < a href= "lecture2.ppt"> Lecture 2< /a> < /td>
• < /tr>
• < tr>
• < td> < im g src= "zip.gif"> < /td>
• < td> < a href= "lecture2-dem os.zip">
• Lecture 2 - D em os< /a> < /td>
• < /tr>
• < /table>
• 4
Internet Programming •Simple HTML Tables – Example
• 5
Internet Programming •Complete HTML Tables
Table rows split into three semantic sections: header, body
and footer
<thead> denotes table header and contains <th>
elements, instead of <td> elements
<tbody> denotes collection of table rows that contain
data
<tfoot> denotes table footer but comes BEFORE the
<tbody> tag
<colgroup> and <col> define columns (most often used to
set column widths)
• 5
Internet Programming
•Complete HTML Table: Example
• • < table> • columns
• < colgroup>
• < colstyle= "w idth:100px" /> < /col>
• < /colgroup> • header • th
• < thead>
• < tr> < th> C olum n 1< /th> < th> Colum n 2< /th> < /tr>
• < /thead>
• footer
• < tfoot>
• < tr> < td> Footer 1< /td> < td> Footer 2< /td> < /tr>
• < /tfoot> • Last comes the body (data)
• < tbody>
• < tr> < td> C ell1.1< /td> < td> Cell1.2< /td> < /tr>
• < tr> < td> C ell2.1< /td> < td> Cell2.2< /td> < /tr>
• < /tbody>
• < /table>
• 5
Complete HTML Table:
Internet Programming
• 5
Internet Programming
•Nested Tables
Table data “cells” (< td> ) can contain nested tables (tables
within tables):
• <table> • nested-tables.html
• <tr>
• <td>Contact:</td>
• <td>
• <table>
• <tr>
• <td>First Name</td>
• <td>Last Name</td>
• </tr>
• </table>
• </td>
• </tr>
• </table>
• 5
Internet Programming
•Cell Spacing and Padding
Tables have two important attributes:
cellspacing cellpadding
• 5
Internet Programming
•Cell Spacing and Padding – Example
• table-cells.html
• < htm l>
• < head> < title> Table Cells< /title> < /head>
• < body>
• < table cellspacing= "15" cellpadding= "0">
• < tr> < td> First< /td>
• < td> Second< /td> < /tr>
• < /table>
• < br/>
• < table cellspacing= "0" cellpadding= "10">
• < tr> < td> First< /td> < td> Second< /td> < /tr>
• < /table>
• < /body>
• < /htm l>
• 5
Internet Programming •Column and Row Span
Table cells have two important attributes:
colsp an row sp an
• colspan="1 • colspan="1 • rowspan=" • rowspan="
" " 2" 1"
• <table cellspacing="0">
• <tr class="1"><td>Cell[1,1]</td>
• <td colspan="2">Cell[2,1]</td></tr>
• <tr class=“2"><td>Cell[1,2]</td>
• <td rowspan="2">Cell[2,2]</td>
• <td>Cell[3,2]</td></tr>
• <tr class=“3"><td>Cell[1,3]</td>
• <td>Cell[2,3]</td></tr>
• </table>
• 5
Column
Internet Programming and Row Span –
• Example
• table-colspan-rowspan.html
• < table cellspacing= "0">
• < tr class= "1"> < td> Cell[1,1]< /td>
• < td colspan= "2"> Cell[2,1]< /td> < /tr>
• < tr class= “2"> < td> Cell[1,2]< /td>
• < td row span= "2"> Cell[2,2]< /td>
• < td> Cell[3,2]< /td> < /tr>
• < tr class= “3"> < td> Cell[1,3]< /td>
• < td> Cell[2,3]< /td> < /tr>
• < /table>
• Cell[1,1] • Cell[2,1]
• C ell[1,2] • C ell[3,2]
• C ell[2,2]
• C ell[1,3] • C ell[2,3]
• 6
<!DOCTYPE html>
<html>
<head>
<title>HTML Table Caption</title>
</head>
<body>
<table border="1" width="100%">
<caption>This is the caption</caption>
<tr>
<td>row 1, column 1</td><td>row 1, columnn
2</td>
</tr>
<tr>
<td>row 2, column 1</td><td>row 2, columnn
2</td>
</tr>
</table>
</body>
</html>
l
The caption tag will serve as a title or explanation for the
table and it shows up at the top of the table.
l
This tag is depracated in newer version of HTML/XHTML.
Internet Programming
•HTML Forms
• Entering User Data from a Web
Page
l
HTML forms are used to pass data to a server.
l
A basic form has three important parts:
l The <form> tag
l The form elements
l And the submit button which sends the data on
the server.
l
An HTML form can contain input elements like text
fields, checkboxes, radio-buttons, submit buttons.
Internet Programming
HTML Forms
Forms are the primary method for gathering data from site
visitors
Create a form block with
Example:
• <form></form>
• 6
HTML Forms
l
HTML forms contain form elements.
l
Form elements are different types of input elements,
checkboxes, radio buttons, submit buttons, and more.
HTML Forms
l
The <input> element is the most important form element.
l
The <input> element has many variations, depending on
the type attribute.
Internet Programming
Form Fields
• 6
l
<!DOCTYPE html>
l
<html>
l
<body>
l
<form>
l
First name:<br>
l
<input type="text" name="firstname">
l
<br>
l
Last name:<br>
l
<input type="text" name="lastname">
l
</form>
l
</body>
l
</html>
l
Password Field:
l
<input type="password"> defines a password field:
l <form>
l Password: <input type="password"
name="pwd">
l </form>
l
Radio Buttons:
l
Allows user to select only one value from number of
choices.
l <form>
l <input type="radio" name="sex" value="male">Male<br>
l <input type="radio" name="sex" value="female">Female
l </form>
Internet Programming • Form Input Controls
Checkboxes:
Radio buttons:
Radio buttons can be grouped, allowing only one to be
selected from a group:
• 7
l
Checkbox:
l
Allows a user to select ZERO or MORE options of a
limited number of choices.
l <form>
l <input type="checkbox" name="option1"
value="Milk"> Milk<br>
l <input type="checkbox" name="option2"
value="Butter" checked> Butter<br>
l <input type="checkbox" name="option3"
value="Cheese"> Cheese<br>
l <br>
l </form>
Internet Programming
•Fieldsets
Fieldsets are used to enclose a group of related form fields:
The <legend> is the fieldset's title.
• <select name="gender">
• <option value="Value 1" selected="selected">Male</option>
• <option value="Value 2">Female</option>
• <option value="Value 3">Other</option>
• </select>
• 7
Internet Programming • Other Form Controls
• 7
Web Programming Other Form Controls
• 7
Internet Programming
Other Form Controls
File input – a field used for uploading files
When used, it requires the form element to have a
specific attribute:
• 8
Internet Programming
Labels
Form labels are used to associate an explanatory text to a
form field using the field's ID.
Clicking on a label focuses its associated field (checkboxes
are toggled, radio buttons are checked)
Labels are both a usability and accessibility feature and are
required in order to pass accessibility validation.
• 8
HTML Input Attributes
l
The value Attribute
l The value attribute specifies the initial value for an input
field:
l
First name:<br>
l
<input type="text" name="firstname" value="John">
l
<br>
l
Last name:<br>
l
<input type="text" name="lastname">
l
</form>
l
The readonly Attribute
l The readonly attribute specifies that the input field is read only
(cannot be changed):
l The readonly attribute does not need a value. It is the same as
writing readonly="readonly".
l
First name:<br>
l
<input type="text" name="firstname" value="John" readonly>
l
<br>
l
Last name:<br>
l
<input type="text" name="lastname">
l
</form>
l
The disabled Attribute
l The disabled attribute specifies that the input field is disabled.
l A disabled element is un-usable and un-clickable.
l Disabled elements will not be submitted.
l The disabled attribute does not need a value.
<form action="">
First name:<br>
<input type="text" name="firstname" value="John" disabled>
<br>
Last name:<br>
<input type="text" name="lastname">
</form>
l
The maxlength Attribute
l The maxlength attribute specifies the maximum allowed length for
the input field:
l With a maxlength attribute, the input control will not accept more than
the allowed number of characters.
l
<form action="">
l
First name:<br>
l
<input type="text" name="firstname" maxlength="10">
l
<br>
l
Last name:<br>
l
<input type="text" name="lastname">
l
</form>
Internet Programming
•HTML Forms – Example
• form.html
• <form method="post" action="applynow.php">
• <input name="subject" type="hidden" value="Class" />
• <fieldset><legend>Academic information</legend>
• <label for="degree">Degree</label>
• <select name="degree" id="degree">
• <option value="BA">Bachelor of Art</option>
• <option value="BS">Bachelor of Science</option>
• <option value="MBA" selected="selected">Master of
• Business Administration</option>
• </select>
• <br />
• <label for="studentid">Student ID</label>
• <input type="password" name="studentid" />
• </fieldset>
• <fieldset><legend>Personal Details</legend>
• <label for="fname">First Name</label>
• <input type="text" name="fname" id="fname" />
• <br />
• <label for="lname">Last Name</label>
• <input type="text" name="lname" id="lname" />
Internet Programming • HTML Forms – Example
• form.html (continued)
• <br />
• Gender:
• <input name="gender" type="radio" id="gm" value="m" />
• <label for="gm">Male</label>
• <input name="gender" type="radio" id="gf" value="f" />
• <label for="gf">Female</label>
• <br />
• <label for="email">Email</label>
• <input type="text" name="email" id="email" />
• </fieldset>
• <p>
• <textarea name="terms" cols="30" rows="4"
• readonly="readonly">TERMS AND CONDITIONS...</textarea>
• </p>
• <p>
• <input type="submit" name="submit" value="Send Form" />
• <input type="reset" value="Clear Form" />
• </p>
• </form>
• 8
Internet Programming • HTML Forms – Example
• form.html (continued)
• 8
Internet Programming
•TabIndex
The tabindex HTML attribute controls the order in which form
fields and hyperlinks are focused when repeatedly pressing
the TAB key
tabindex="0" (zero) - "natural" order
If X > Y, then elements with tabindex="X" are iterated
before elements with tabindex="Y"
Elements with negative tabindex are skipped, however,
this is not defined in the standard
• 9
Internet Programming
•HTML Frames
•< fram eset> , < fram e> and < ifram e>
Internet Programming
•HTML Frames
Frames provide a way to show multiple HTML documents in
a single Web page
The page can be split into separate views (frames)
horizontally and vertically
Frames were popular in the early ages of HTML
development, but now their usage is rejected
Frames are not supported by all user agents (browsers,
search engines, etc.)
A <noframes> element is used to provide content
for non-compatible agents.
• 9
l
We can create a frame by using the <frameset>
tag.
l
Inside <frameset> tag use <frame> tag with src as
attribute.
l
It takes HTML file as input value which we want to
upload to that frame.
l
We can create multiple <frame> tag inside
<frameset> tag.
l
Not supported in HTML 5.
l
<!DOCTYPE html>
l
<html>
l
<frameset cols="25%,50%,25%">
l
<frame src="frame1.htm">
l
<frame src="frame2.htm">
l
<frame src="frame3.htm">
l
<noframes>Sorry, your browser does not handle frames!
</noframes>
l
</frameset>
l
</html>
Internet Programming
HTML Frames – Demo
frames.html
• <html>
• <head><title>Frames Example</title></head>
• <frameset cols="180px,*,150px">
• <frame src="left.html" />
• <frame src="middle.html" />
• <frame src="right.html" />
• </frameset>
• </html>
• 9
Internet Programming
Inline Frames: < ifram e>
Inline frames provide a way to show one website inside
another website:
iframe-demo.html
• <iframe name="iframeGoogle" width="600" height="400"
src="http://www.google.com" frameborder="yes"
scrolling="yes"></iframe>
• 9
l
<html>
l
<body>
l
<iframe name="iframeGoogle" width="600" height="400"
src="style.html" frameborder="yes" scrolling="yes"></iframe>
l
<a href="try.html" target="iframeGoogle">Click Here</a>
l
</body>
l
</html>
l
When we use frame tag then the current page constitutes of
only frames whereas in iframe the current web page and the
sub window (created by iframe) are treated like two separate
entities.
l
It just brings some other source to the current page.
l
The inline frames are also known as floating frames.
Web Programming Comments: <!-- --> Tag
Comments can exist anywhere between the
<html></html> tags
Comments start with < !-- and end with -->
• 9