Free Download Centre

            

Latest News
Download Catalog


Main » Files » computer Ebooks learning » computer Ebooks learning

$ENTRY_
TITLE$
[ ] 2009-10-09, 2:50 AM
 
To add sounds to a web page... we will use the <EMBED> tag. This tag supports many common file formats... such as .wav, .mid, .mp3, and .au. Here is the basic structure of the tag:
Example of the embed tag...

<embed src="http://www.davesite.com/webstation/html/davesite.wav" loop="true" autoplay="false" width="145" height="60"></embed>
What are Frames?

Frames are a way to divide the browser screen to allow easier navigation under some circumstances. Frequently, frames are used to add a side menu bar to a web site where the constant back and forth clicking would become tedious in a single page. In this example, the side menu bar would allow the user to just click in the side menu bar, and their choice would load into the main window.

Example: Side Menu Bar

 

This is what the index.htm would look like:

<html>
<head><title>title here</title></head>

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>

<noframes>
 Your browser does not support frames.
 <a href="frameless_main.htm">Please visit the frameless page.</a>
</noframes>

</html>

Notice that there is no actual <body> coding. It is common courtesy, however, to place a <noframes> area after the frameset, but this is completely optional. This <noframes> area only displays in browsers that are not able to show frames.

If you create a special page for those without frames, you may be doubling your work. It is best, with effort and practice, to create a page, in this case, main.htm, that will work in both frames and noframes browsers. Then your noframes would read:

<noframes>
 Your browser does not support frames.
 <a href="main.htm">Please visit the frameless page.</a>
</noframes>

About <frameset> and <frame>

The frameset tag is used to declare multiple frames. As you can see in our first example, the menu bar side, there was one frameset. It read:

<frameset cols="15%,85%">

This tells the browser, we are creating column of framed pages, the first one is to take up 15% of the total browser screen, and the second is to take up 85% of the total browser screen. Then, we introduced <frame>, which is what actually loads the pages. Each frame must have a src, such as src="some_page.htm". So, because we used two framed areas within the frameset, we need two frame tags, each of them to load a page.

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>

If we would like to add a third column, we would need to add a third size definition in the cols (so that all would add up to 100%) and another frame tag inside the frameset.

Likewise, we can use a rows definition instead of a columns definition. If we wanted the menu to be a bottom menu bar, we would do something like:

<frameset rows="80%,20%">
 <frame src="main.htm" name="mainwindow">
 <frame src="menu_bar.htm" name="bottommenu">
</frameset>

If you wanted the menu at the top, just switch it around a little bit:

<frameset rows="20%,80%">
 <frame src="menu_bar.htm" name="topmenu">
 <frame src="main.htm" name="mainwindow">
</frameset>
Special attributes of <frame>
There are two special attributes you should be aware of for the <frame> tag. Let's go back to the side menu example.
<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>

Say you wanted to lock in the sidemenu frame (the menu bar frame) so that the user couldn't resize it. (Imagine the user moving the divider bar so that half the browser has the menu, and half has the main window. Wouldn't that look silly?)

In order to lock the size, add the words noresize to the frame you want to lock:

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu" noresize>
 <frame src="main.htm" name="mainwindow">
</frameset>

This does not prevent you from changing the pages inside the windows, it just prevents the user from modifying the frame size when the page loads.

The other useful attribute is scrolling. Say you always want a scrollbar to appear in the main window. Add scrolling="yes". Want there to never be a scrollbar? Add scrolling="no".

Example:

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu" noresize>
 <frame src="main.htm" name="mainwindow" scrolling="yes">
</frameset>

More Advanced Frames
You can embed a frameset anywhere there is a frame if you want to split that section further. Want a special, fixed area for your logo graphic at the top of the menu bar? Try this:
<frameset cols="15%,85%">
 <frameset rows="20%,80%">
 <frame src="logo.htm" noresize>
 <frame src="menu_bar.htm" name="sidemenu" noresize>
 </frameset>
 <frame src="main.htm" name="mainwindow" scrolling="yes">
</frameset>

Now, here are some things to think about. How would you get four even frames in two rows?

You could do:

<frameset rows="50%,50%">
 <frameset cols="50%,50%">
 <frame>
 <frame>
 </frameset>
 <frameset cols="50%,50%">
 <frame>
 <frame>
 </frameset>

Three even columns?

<frameset cols="33%,33%,33%">
 <frame>
 <frame>
 <frame>
</frameset>

How about three rows, the first one 1/4 of the screen, the second 1/2 of the screen, and the third 1/4 of the screen?

<frameset rows="25%,50%,25%">
 <frame>
 <frame>
 <frame>
</frameset>

Same as above, but the very bottom frame split into two equal columns?

old...

<frameset rows="25%,50%,25%">
 <frame>
 <frame>
 <frame> <-- replace this
</frameset>

new...

<frameset rows="25%,50%,25%">
 <frame>
 <frame>
 <frameset cols="50%,50%">
 <frame>
 <frame>
 </frameset>
</frameset>

There you go! Now you know how to create frames!
Improving Search Engine Results...

When a search engine finds your page, it will need to index it (that is, add it to its searchable database) with some information off the page. Many search engines now support the <META> tags, which allow you to give keywords and a description to your page. This gives you more control over how your page will show up during a search, and will often cause more traffic to your page.

The <META> tag can be used for a few different purposes. Usually, you should place the <META> tag within the <head> tags at the beginning of your document. To improve search engine results, we will use two specific attributes within the meta tag. Here is an example:

<meta name="description" content="description of page goes here">
<meta name="keywords" content="keywords go here">

When a user searches a search engine that supports meta tags and they query a phrase (search for a keyword) related to your page, your page may show up in the list of results. Your page will be listed by its Title, and then underneath its title will be the first hundred or so characters of the description you placed in the meta tag. It is recommended that you keep the description content to no more than 200 characters. Although the keywords content is not seen by the user when searched, it is recommended to keep this less than 1000 characters, because if you have more the search engine will either ignore the rest or delete you from the index. (Commas are not needed to separate keywords)

Example of a real-life meta situation...

<html>

<head>
<title>Little Joe's Sound Page</title>
<meta name="description" content="Joe's Collection of Cool Sound files for you to use in your home page!">
<meta name="keywords" content="music sounds midi wav joe collection">
</head>

<body>
Page Goes Here
</body>

</html>


Meta tags are not visible in the web page unless the user selects to 'view source'.

Auto-refreshing...
 

Automatic Refreshing is supported by Netscape and Microsoft Internet Explorer among other popular web browsers. This also uses a modified form of the <META> tag. Auto refreshing means that once one page loads, you can set a certain number of seconds and then the browser will load another page automatically. The basic structure is as follows:

<meta http-equiv="refresh" content="x_seconds; url=http://www.yourhost.com/pagetosendto.html">

The URL is the page you want it to refresh to, content is the number of seconds you want it to wait before refreshing, and http-equiv="refresh" just tells it that this is the refresh meta tag. For example, if you wanted the page to refresh to davesite.com after 5 seconds it would be as follows:

<meta http-equiv="refresh" content="5; URL=http://www.davesite.com/">

Category: computer Ebooks learning | Added by: agha12
Views: 1106 | Downloads: 0 | Rating: 0.0/0 |
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]
Login Form
Search Engine
 
Website Search Engine
Custom Search
Live Traffic Submit u link
Statistics

    Copyright MyCorp © 2024