Tuesday, December 18, 2007

Introduction to HTML

What is an HTML File?

  • HTML stands for Hyper Text Markup Language
  • An HTML file is a text file containing small markup tags
  • The markup tags tell the Web browser how to display the page
  • An HTML file must have an htm or html file extension
  • An HTML file can be created using a simple text editor

Do You Want to Try It?

If you are running Windows, start Notepad.

If you are on a Mac, start SimpleText.

In OSX start TextEdit and change the following preferences: Open the the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". Your HTML code will probably not work if you do not change the preferences above!

Type in the following text:



Title of page


This is my first homepage. This text is bold

Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.


Example Explained

The first tag in your HTML document is . This tag tells your browser that this is the start of an HTML document. The last tag in your document is . This tag tells your browser that this is the end of the HTML document.

The text between the tag and the tag is header information. Header information is not displayed in the browser window.

The text between the tags is the title of your document. The title is displayed in your browser's caption.</p> <p>The text between the <body> tags is the text that will be displayed in your browser.</p> <p>The text between the <b> and </b> tags will be displayed in a bold font.</p> <hr /> <h2>HTM or HTML Extension?</h2> <p>When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.</p> <p>With newer software we think it will be perfectly safe to use .html.</p> <hr /> <h2>Note on HTML Editors:</h2> <p>You can easily edit HTML files using a WYSIWYG (what you see is what you get) editor like FrontPage or Dreamweaver, instead of writing your markup tags in a plain text file.</p> <p>However, if you want to be a skillful Web developer, we strongly recommend that you use a plain text editor to learn your primer HTML.</p> <hr /> <h2>Frequently Asked Questions</h2> <p><b>Q: After I have edited an HTML file, I cannot view the result in my browser. Why?<br />A: </b>Make sure that you have saved the file with a proper name and extension like "c:\mypage.htm". Also make sure that you use the same name when you open the file in your browser. </p> <p><b>Q: I have edited an HTML file, but the changes don't show in the browser. Why?<br />A: </b>A browser caches pages so it doesn't have to read the same page twice. When you have modified a page, the browser doesn't know that. Use the browser's refresh/reload button to force the browser to reload the page. </p> <p><b>Q: What browser should I use?<br />A: </b>You can do all the training with all of the well-known browsers, like Internet Explorer, Firefox, Netscape, or Opera. However, some of the examples in our advanced classes require the latest versions of the browsers.</p> <p><b>Q: Does my computer have to run Windows? What about a Mac?<br />A: </b>You can do all your training on a non-Windows computer like a Mac.</p><p class="intro">HTML documents are text files made up of HTML elements.</p> <p class="intro">HTML elements are defined using HTML tags.</p> <hr /> <h2>HTML Tags</h2> <ul><li>HTML tags are used to mark-up HTML <b> elements</b></li><li>HTML tags are surrounded by the <b> two characters <></b></li><li>The surrounding characters are called <b>angle brackets</b></li><li>HTML tags normally <b> come in pairs</b> like <b> and </b></li><li>The first tag in a pair is the <b> start tag,</b> the second tag is the <b> end tag</b></li><li>The text between the start and end tags is the <b>element content</b></li><li>HTML tags are <b> not case sensitive,</b> <b> means the same as <b></li></ul> <hr /> <h2>HTML Elements</h2> <p>Remember the HTML example from the previous page:</p> <table class="ex" border="1" cellspacing="0" width="100%"><tbody><tr><td> <pre><html><br /><head><br /><title>Title of page


This is my first homepage. This text is bold

This is an HTML element:

This text is bold

The HTML element starts with a start tag:
The content of the HTML element is: This text is bold
The HTML element ends with an end tag:

The purpose of the tag is to define an HTML element that should be displayed as bold.

This is also an HTML element:


This is my first homepage. This text is bold

This HTML element starts with the start tag , and ends with the end tag .

The purpose of the tag is to define the HTML element that contains the body of the HTML document.


Why do We Use Lowercase Tags?

We have just said that HTML tags are not case sensitive: means the same as . If you surf the Web, you will notice that plenty of web sites use uppercase HTML tags in their source code. We always use lowercase tags. Why?

If you want to follow the latest web standards, you should always use lowercase tags. The World Wide Web Consortium (W3C) recommends lowercase tags in their HTML 4 recommendation, and XHTML (the next generation HTML) demands lowercase tags.


Tag Attributes

Tags can have attributes. Attributes provide additional information to an HTML element.

The following tag defines an HTML table:

. With an added border attribute, you can tell the browser that the table should have no borders:

Attributes always come in name/value pairs like this: name="value".

Attributes are always specified in the start tag of an HTML element.

Attributes and attribute values are also case-insensitive. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation, and XHTML demands lowercase attributes/attribute values.


Always Quote Attribute Values

Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed.

In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes:

name='John "ShotGun" Nelson'

The most important tags in HTML are tags that define headings, paragraphs and line breaks.

The best way to learn HTML is to work with examples. We have created a very nice HTML editor for you. With this editor, you can edit the HTML source code if you like, and click on a test button to view the result.


Try it Yourself - Examples

A very simple HTML document
This example is a very simple HTML document, with only a minimum of HTML tags. It demonstrates how the text inside a body element is displayed in the browser.

Simple paragraphs
This example demonstrates how the text inside paragraph elements is displayed in the browser.

(You can find more examples at the bottom of this page)


Headings

Headings are defined with the

to

tags.

defines the largest heading.

defines the smallest heading.

This is a heading


This is a heading


This is a heading


This is a heading


This is a heading

This is a heading

HTML automatically adds an extra blank line before and after a heading.


Paragraphs

Paragraphs are defined with the

tag.

This is a paragraph


This is another paragraph

HTML automatically adds an extra blank line before and after a paragraph.


Line Breaks

The
tag is used when you want to end a line, but don't want to start a new paragraph. The
tag forces a line break wherever you place it.

This
is a para
graph with line breaks

The
tag is an empty tag. It has no closing tag.


Comments in HTML

The comment tag is used to insert a comment in the HTML source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.

Note that you need an exclamation point after the opening bracket, but not before the closing bracket.


Basic Notes - Useful Tips

When you write HTML text, you can never be sure how the text is displayed in another browser. Some people have large computer displays, some have small. The text will be reformatted every time the user resizes his window. Never try to format the text in your editor by adding empty lines and spaces to the text.

HTML will truncate the spaces in your text. Any number of spaces count as one. Some extra information: In HTML a new line counts as one space.

Using empty paragraphs

to insert blank lines is a bad habit. Use the
tag instead. (But don't use the
tag to create lists. Wait until you have learned about HTML lists.)

You might have noticed that paragraphs can be written without the closing tag

. Don't rely on it. The next version of HTML will not allow you to skip ANY closing tags.

HTML automatically adds an extra blank line before and after some elements, like before and after a paragraph, and before and after a heading.

We use a horizontal rule (the


tag), to separate the sections in our tutorials.


More Examples

More paragraphs
This example demonstrates some of the default behaviors of paragraph elements.

Line breaks
This example demonstrates the use of line breaks in an HTML document.

Poem problems
This example demonstrates some problems with HTML formatting.

Headings
This example demonstrates the tags that display headings in an HTML document.

Center aligned heading
This example demonstrates a center aligned heading.

Horizontal rule
This example demonstrates how to insert a horizontal rule.

Hidden comments
This example demonstrates how to insert a hidden comment in the HTML source code.

Background color
This example demonstrates adding a background-color to an HTML page.


Basic HTML Tags

Tag Description
Defines an HTML document
Defines the document's body

to

Defines header 1 to header 6

Defines a paragraph

Inserts a single line break

Defines a horizontal rule
Defines a comment

HTML defines a lot of elements for formatting output, like bold or italic text.

Below are a lot of examples that you can try out yourself:

html text format:-





This text is bold





This text is strong






This text is big






This text is emphasized






This text is italic






This text is small





This text contains

subscript





This text contains

superscript





Preformatted text





This is
preformatted text.
It preserves both spaces
and line breaks.


The pre tag is good for displaying computer code:




for i = 1 to 10
print i
next i






This is
preformatted text.
It preserves both spaces
and line breaks.

The pre tag is good for displaying computer code:

for i = 1 to 10
print i
next i

Computer out put tags




This is
preformatted text.
It preserves both spaces
and line breaks.


The pre tag is good for displaying computer code:




for i = 1 to 10
print i
next i






This is
preformatted text.
It preserves both spaces
and line breaks.

Adress





Donald Duck

BOX 555

Disneyland

USA






Donald Duck

BOX 555

Disneyland

USA

abrivation and acronimus



UN


WWW

The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.



This only works for the acronym element in IE 5.



This works for both the abbr and acronym element in Netscape 6.2.






UN

WWW

The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.

This only works for the acronym element in IE 5.

This works for both the abbr and acronym element in Netscape 6.2.

Text directions:-




If your browser supports bi-directional override (bdo), the next line will be written from the right to the left (rtl):




Here is some Hebrew text





If your browser supports bi-directional override (bdo), the next line will be written from the right to the left (rtl):

Here is some Hebrew text

quations:-




Here comes a long quotation:

This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.


Here comes a short quotation:

This is a short quotation



With the block quote element, the browser inserts line breaks and margins, but the q element does not render as anything special.





Here comes a long quotation:
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
Here comes a short quotation: This is a short quotation

With the block quote element, the browser inserts line breaks and margins, but the q element does not render as anything special.

Deleted and inserted text:-





a dozen is
twenty
twelve
pieces




Most browsers will overstrike deleted text and underline inserted text.




Some older browsers will display deleted or inserted text as plain text.






a dozen is twenty twelve pieces

Most browsers will overstrike deleted text and underline inserted text.

Some older browsers will display deleted or inserted text as plain text.

How to View HTML Source

Have you ever seen a Web page and wondered "Hey! How did they do that?"

To find out, click the VIEW option in your browser's toolbar and select SOURCE or PAGE SOURCE. This will open a window that shows you the HTML code of the page.

Text Formatting Tags

Tag Description
Defines bold text
Defines big text
Defines emphasized text
Defines italic text
Defines small text
Defines strong text
Defines subscripted text
Defines superscripted text
Defines inserted text
Defines deleted text
Deprecated. Use instead
Deprecated. Use instead
Deprecated. Use styles instead

"Computer Output" Tags

Tag Description
Defines computer code text
Defines keyboard text
Defines sample computer code
Defines teletype text
Defines a variable
Defines preformatted text
Deprecated. Use
 instead 
</td> <td class="deprecated">Deprecated. Use <pre> instead</td> </tr> <tr> <td><xmp></td> <td class="deprecated">Deprecated. Use <pre> instead</td> </tr> </tbody></table> <h2>Citations, Quotations, and Definition Tags</h2> <table class="ex" border="1" cellspacing="0" width="100%"> <tbody><tr> <th align="left" width="20%">Tag</th> <th align="left" width="80%">Description</th> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_abbr.asp"><abbr></a></td> <td>Defines an abbreviation</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_acronym.asp"><acronym></a></td> <td>Defines an acronym</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_address.asp"><address></a></td> <td>Defines an address element</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_bdo.asp"><bdo></a></td> <td>Defines the text direction</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_blockquote.asp"><blockquote></a></td> <td> Defines a long quotation</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_q.asp"><q></a></td> <td>Defines a short quotation</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_phrase_elements.asp"><cite></a></td> <td>Defines a citation</td> </tr> <tr> <td><a href="http://www.w3schools.com/tags/tag_phrase_elements.asp"><dfn></a></td> <td>Defines a definition term</td> </tr> </tbody></table> <p><br /></p><br /><p class="intro">Some characters like the <> <p class="intro">To display a less than sign (<) in HTML, we have to use a character entity.</p> <hr /> <h2>Character Entities</h2> <p>Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.</p> <p>A character entity has three parts: an ampersand (&amp;), an entity name or a # and an entity number, and finally a semicolon (;). </p> <p>To display a less than sign in an HTML document we must write: <b>&lt;</b> or <b>&#60;</b> </p> <p>The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.</p> <p><b>Note</b> that the entities are case sensitive. </p> <p>This example lets you experiment with character entities: <a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_entities" target="_blank">Character Entities</a></p> <hr /> <h2>Non-breaking Space</h2> <p>The most common character entity in HTML is the non-breaking space.</p> <p>Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add spaces to your text, use the character entity.</p> <hr /> <h2>The Most Common Character Entities:</h2> <table class="ex" border="1" cellspacing="0" width="100%"> <tbody><tr> <th align="left">Result</th> <th align="left">Description</th> <th align="left">Entity Name</th> <th align="left">Entity Number</th> </tr> <tr> <td> </td> <td>non-breaking space</td> <td> </td> <td>&#160;</td> </tr> <tr> <td><</td> <td>less than</td> <td>&lt;</td> <td>&#60;</td> </tr> <tr> <td>></td> <td>greater than</td> <td>&gt;</td> <td>&#62;</td> </tr> <tr> <td>&amp;</td> <td>ampersand</td> <td>&amp;</td> <td>&#38;</td> </tr> <tr> <td>"</td> <td>quotation mark</td> <td>&quot;</td> <td>&#34;</td> </tr> <tr> <td>'</td> <td>apostrophe </td> <td>&apos; (does not work in IE)</td> <td>&#39;</td> </tr> </tbody></table> <h2>Some Other Commonly Used Character Entities:</h2> <table class="ex" border="1" cellspacing="0" width="100%"><tbody><tr> <th align="left">Result</th> <th align="left">Description</th> <th align="left">Entity Name</th> <th align="left">Entity Number</th> </tr> <tr> <td>&#162;</td> <td>cent</td> <td>&cent;</td> <td>&#162;</td> </tr> <tr> <td>&#163;</td> <td>pound</td> <td>&pound;</td> <td>&#163;</td> </tr> <tr> <td>&#165;</td> <td>yen</td> <td>&yen;</td> <td>&#165;</td> </tr> <tr> <td>&#8364;</td> <td>euro</td> <td>&euro;</td> <td>&#8364;</td> </tr> <tr> <td>&#167;</td> <td>section</td> <td>&sect;</td> <td>&#167;</td> </tr> <tr> <td>&#169;</td> <td>copyright</td> <td>&copy;</td> <td>&#169;</td> </tr> <tr> <td>&#174;</td> <td>registered trademark</td> <td>&reg;</td> <td>&#174;</td> </tr> <tr> <td>&#215;</td> <td>multiplication</td> <td>&times;</td> <td>&#215;</td> </tr> <tr> <td>&#247;</td> <td>division</td> <td>&divide;</td> <td>&#247;</td></tr></tbody></table><p class="intro">HTML uses a hyperlink to link to another document on the Web.<br />Examples<br /><br />Create hyperlinks<br />This example demonstrates how to create links in an HTML document.<br /><br />An image as a link<br />This example demonstrates how to use an image as a link.<br /><br />(You can find more examples at the bottom of this page)<br />The Anchor Tag and the Href Attribute<br /><br />HTML uses the <a> (anchor) tag to create a link to another document.<br /><br />An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc.<br /><br />The syntax of creating an anchor:<br /><br /><a href="url">Text to be displayed</a><br /><br />The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.<br /><br />This anchor defines a link to W3Schools:<br /><br /><a href="http://www.w3schools.com/">Visit W3Schools!</a><br /><br />The line above will look like this in a browser:<br /><br />Visit W3Schools!<br />The Target Attribute<br /><br />With the target attribute, you can define where the linked document will be opened.<br /><br />The line below will open the document in a new browser window:<br /><br /><a href="http://www.w3schools.com/" />target="_blank">Visit W3Schools!</a><br /><br /><br />The Anchor Tag and the Name Attribute<br /><br />The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.<br /><br />Below is the syntax of a named anchor:<br /><br /><a name="label">Text to be displayed</a><br /><br />The name attribute is used to create a named anchor. The name of the anchor can be any text you care to use.<br /><br />The line below defines a named anchor:<br /><br /><a name="tips">Useful Tips Section</a><br /><br />You should notice that a named anchor is not displayed in a special way.<br /><br />To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL, like this:<br /><br /><a href="http://www.w3schools.com/html_links.asp#tips"><br />Jump to the Useful Tips Section</a><br /><br />A hyperlink to the Useful Tips Section from WITHIN the file "html_links.asp" will look like this:<br /><br /><a href="#tips">Jump to the Useful Tips Section</a><br /><br /><br />Basic Notes - Useful Tips<br /><br />Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two HTTP requests to the server, because the server will add a slash to the address and create a new request like this: href="http://www.w3schools.com/html/"<br /><br />Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document.<br /><br />If a browser cannot find a named anchor that has been specified, it goes to the top of the document. No error occurs.<br /></p><h2>More Examples</h2>open link in new browser window<br /><html><br /><body><br /><br /><a href="lastpage.htm" target="_blank">Last Page</a><br /><br /><p><br />If you set the target attribute of a link to "_blank",<br />the link will open in a new window.<br /></p><br /><br /></body><br /></html><br /><br /><br />If you set the target attribute of a link to "_blank", the link will open in a new window.<br /><br />link to Locate on same window:-<br /><html><br /><body><br /><br /><p><br /><a href="#C4">See also Chapter 4.</a><br /></p><br /><br /><h2>Chapter 1</h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2>Chapter 2</h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2>Chapter 3</h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2><a name="C4">Chapter 4</a></h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2>Chapter 5</h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2>Chapter 6</h2><br /><p>This chapter explains ba bla bla</p><br /><br /><h2>Chapter 1</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 2</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 3</h2> <p>This chapter explains ba bla bla</p> <h2><a name="C4">Chapter 4</a></h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 5</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 6</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 7</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 8</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 9</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 10</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 11</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 12</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 13</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 14</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 15</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 16</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 17</h2> <p>This chapter explains ba bla bla</p><p><br /></p><p style="font-weight: bold;">Break out of aframe:-</p><p style="font-weight: bold;"><html><br /><body><br /><br /><p>Locked in a frame?</p><br /><br /><a href="http://www.w3schools.com/" />target="_top">Click here!</a><br /><br /></body><br /></html><br /></p><p style="font-weight: bold;">create amilto link:-</p><p style="font-weight: bold;"><html><br /><br /><body><br /><br /><p><br />This is a mail link:<br /><a href="mailto:someone@microsoft.com?subject=Hello%20again"><br />Send Mail</a><br /></p><br /><br /><p><br /><b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly.<br /></p><br /><br /></body><br /></html><br /><br />create a milto link2</p><p style="font-weight: bold;"><html><br /><br /><body><br /><br /><p><br />This is another mailto link:<br /><a href="mailto:someone@microsoft.com?cc=someoneelse@microsoft.com&amp;bcc=andsomeoneelse2@microsoft.com&amp;subject=Summer%20Party&amp;body=You%20are%20invited%20to%20a%20big%20summer%20party!">Send mail!</a><br /></p><br /><br /><p><br /><b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly.<br /></p><br /><br /></body><br /></html></p><p class="intro">With frames, you can display more than one Web page in the same browser window.</p> <hr /> <h2>Examples</h2> <p><a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_frame_cols" target="_blank">Vertical frameset</a><br />This example demonstrates how to make a vertical frameset with three different documents. </p> <p><a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_frame_rows" target="_blank">Horizontal frameset</a><br />This example demonstrates how to make a horizontal frameset with three different documents.</p> <p>(You can find more examples at the bottom of this page)</p> <hr /> <h2>Frames</h2> <p>With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.</p> <p>The disadvantages of using frames are:</p> <ul><li>The web developer must keep track of more HTML documents</li><li>It is difficult to print the entire page</li></ul> <hr /> <h2>The Frameset Tag</h2> <ul><li>The <frameset> tag defines how to divide the window into frames</li><li> Each frameset defines a set of rows <b> or</b> columns</li><li>The values of the rows/columns indicate the amount of screen area each row/column will occupy</li></ul> <hr /> <h2>The Frame Tag</h2> <ul><li>The <frame> tag defines what HTML document to put into each frame</li></ul> <p>In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The HTML document "frame_a.htm" is put into the first column, and the HTML document "frame_b.htm" is put into the second column:</p> <table class="ex" border="1" cellspacing="0" width="100%"> <tbody><tr> <td> <pre><frameset cols="25%,75%"><br /> <frame src="frame_a.htm"><br /> <frame src="frame_b.htm"><br /></frameset></pre> </td> </tr> </tbody></table> <p><b>Note:</b> The frameset column size value can also be set in pixels (cols="200,500"), and one of the columns can be set to use the remaining space (cols="25%,*").<br /></p> <hr /> <h2>Basic Notes - Useful Tips</h2> <p>If a frame has visible borders, the user can resize it by dragging the border. To prevent a user from doing this, you can add noresize="noresize" to the <frame> tag.</p> <p>Add the <noframes> tag for browsers that do not support frames.</p> <p><b>Important:</b> You cannot use the <body></body> tags together with the <frameset></frameset> tags! However, if you add a <noframes> tag containing some text for browsers that do not support frames, you will have to enclose the text in <body></body> tags! See how it is done in the first example below.</p><p style="font-weight: bold;"><br /></p><p style="font-weight: bold;"><br /></p><p><br /></p><br /><br /><br /><br /><p class="intro"><br /></p> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <meta content='https://www.blogger.com/profile/14373191684181184640' itemprop='url'/> <a class='g-profile' href='https://www.blogger.com/profile/14373191684181184640' rel='author' title='author profile'> <span itemprop='name'>atozmusic</span> </a> </span> </span> <span class='post-timestamp'> at <meta content='http://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html' itemprop='url'/> <a class='timestamp-link' href='https://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html' rel='bookmark' title='permanent link'><abbr class='published' itemprop='datePublished' title='2007-12-18T10:54:00-08:00'>10:54&#8239;AM</abbr></a> </span> <span class='post-comment-link'> </span> <span class='post-icons'> <span class='item-control blog-admin pid-2084261205'> <a href='https://www.blogger.com/post-edit.g?blogID=7053383967919920106&postID=6014425436580597441&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> Labels: <a href='https://html-new-tutorials.blogspot.com/search/label/HTML' rel='tag'>HTML</a>, <a href='https://html-new-tutorials.blogspot.com/search/label/TUTORIALS' rel='tag'>TUTORIALS</a> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> <div class='comments' id='comments'> <a name='comments'></a> <h4>No comments:</h4> <div id='Blog1_comments-block-wrapper'> <dl class='avatar-comment-indent' id='comments-block'> </dl> </div> <p class='comment-footer'> <a href='https://www.blogger.com/comment/fullpage/post/7053383967919920106/6014425436580597441' onclick=''>Post a Comment</a> </p> </div> </div> </div></div> </div> <div class='blog-pager' id='blog-pager'> <a class='home-link' href='https://html-new-tutorials.blogspot.com/'>Home</a> </div> <div class='clear'></div> <div class='post-feeds'> <div class='feed-links'> Subscribe to: <a class='feed-link' href='https://html-new-tutorials.blogspot.com/feeds/6014425436580597441/comments/default' target='_blank' type='application/atom+xml'>Post Comments (Atom)</a> </div> </div> </div></div> </div> <div id='sidebar-wrapper'> <div class='sidebar section' id='sidebar'><div class='widget BlogArchive' data-version='1' id='BlogArchive1'> <h2>Blog Archive</h2> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <ul class='hierarchy'> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> &#9660;&#160; </span> </a> <a class='post-count-link' href='https://html-new-tutorials.blogspot.com/2007/'> 2007 </a> <span class='post-count' dir='ltr'>(1)</span> <ul class='hierarchy'> <li class='archivedate expanded'> <a class='toggle' href='javascript:void(0)'> <span class='zippy toggle-open'> &#9660;&#160; </span> </a> <a class='post-count-link' href='https://html-new-tutorials.blogspot.com/2007/12/'> December </a> <span class='post-count' dir='ltr'>(1)</span> <ul class='posts'> <li><a href='https://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html'>Introduction to HTML</a></li> </ul> </li> </ul> </li> </ul> </div> </div> <div class='clear'></div> </div> </div><div class='widget Profile' data-version='1' id='Profile1'> <h2>About Me</h2> <div class='widget-content'> <dl class='profile-datablock'> <dt class='profile-data'> <a class='profile-name-link g-profile' href='https://www.blogger.com/profile/14373191684181184640' rel='author' style='background-image: url(//www.blogger.com/img/logo-16.png);'> atozmusic </a> </dt> <dd class='profile-textblock'>This site contains all about Jesus and all christmas and all and wallpapers fest</dd> </dl> <a class='profile-link' href='https://www.blogger.com/profile/14373191684181184640' rel='author'>View my complete profile</a> <div class='clear'></div> </div> </div></div> </div> <!-- spacer for skins that want sidebar and main to be the same height--> <div class='clear'>&#160;</div> </div> <!-- end content-wrapper --> <div id='footer-wrapper'> <div class='footer no-items section' id='footer'></div> </div> </div></div> <!-- end outer-wrapper --> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/1166699449-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY5GjJOYjtO18ehP71qUPpTX_jMFMA:1764751596412';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d7053383967919920106','//html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html','7053383967919920106'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '7053383967919920106', 'title': 'html tutorials', 'url': 'https://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html', 'canonicalUrl': 'http://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html', 'homepageUrl': 'https://html-new-tutorials.blogspot.com/', 'searchUrl': 'https://html-new-tutorials.blogspot.com/search', 'canonicalHomepageUrl': 'http://html-new-tutorials.blogspot.com/', 'blogspotFaviconUrl': 'https://html-new-tutorials.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en-US', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22html tutorials - Atom\x22 href\x3d\x22https://html-new-tutorials.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22html tutorials - RSS\x22 href\x3d\x22https://html-new-tutorials.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22html tutorials - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/7053383967919920106/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22html tutorials - Atom\x22 href\x3d\x22https://html-new-tutorials.blogspot.com/feeds/6014425436580597441/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': false, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/4cf376763d831ba5', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Share to X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'item', 'postId': '6014425436580597441', 'pageName': 'Introduction to HTML', 'pageTitle': 'html tutorials: Introduction to HTML'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'isResponsive': false, 'isAlternateRendering': false, 'isCustom': false}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Introduction to HTML', 'description': 'What is an HTML File? HTML stands for H yper T ext M arkup L anguage An HTML file is a text file containing small markup tags The markup ...', 'url': 'https://html-new-tutorials.blogspot.com/2007/12/introduction-to-html.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 6014425436580597441}}]); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'navbar', document.getElementById('Navbar1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/4025936534-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/828616780-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar', document.getElementById('Profile1'), {}, 'displayModeFull')); </script> </body> </html>