![]() | |
New Economy of Names and Their PopularityA list of effective web names for starting a websiteBy Anthony Matarazzo |
|
Dear Valued Web Guest:
The following domains are available for purchase, the last time I checked. Please go to GoDaddy.com and reserve yours today. Feel free to tip me in person for finding the name. As a technology investor, the ability to reserve an Internet name is much like getting a name for a street address. Location draws business. Within the word domain, the same rules apply. The ability to cause instant memory is very important. These names were chosen because they do. The actual value of them within the terms of the communication value adhere to structure and foundation. As well, the future of these names are great because they are solid. The Internet population future can be foretold to increase therefore less availability of standard names will occur. Within these names, the foundation term appears first, making it a solid gathering of clustered metaphor. The ability to place the common first within the context of a memory search capacity provides efficiency. As well, search engine status and rank is exemplified using such methods.
A URL name can also be thought of as an advanced television and radio channel. There are many computer users around today. You must adhere to a broadcast agreement. Best practices rely upon quality content. Most of the Internet user's computing devices have color and have sound capacity. The biggest part of getting people interested is personalized marketing of the name. And there are many marketing domains for Internet that evolve. In most cases it is best to place emphasis on the name itself with a short slogan, a few words. The ability to create a hand held sign that is professional that contains the name can be achieved inexpensively. Using a desktop publishing software and four sheets of eight and half by eleven inch standard paper, the web name can be positioned at the top. Using smaller case for the prefix and postfix "www." and ".com" is important but is information that is consumed and recognized as web technology. The naming dialect of using capitals upon the start of words when they are squeezed together is important for appearance and consumption. Simply print a two page landscape orientated banner out. Cut and staple the two signs upon a piece of card board or corrugated board. You can even cut out a small handle within the cardboard above the letters to carry it comfortably. Another method is using very small squares of paper and handing them out while greeting. One click per hand shake is a great deal.
Most of the names have two words associated with them. As well, the syllable count is small for a broad audience. The content and interface delivery is the most important aspect of your production. You should consider the name investment a long term, cheap, and very beneficial avenue to explore. Guests are invited to find one or two names. To make a successful Website and business is your own responsibility. In short, the new market awaits. Do your best on the content and make sure you personalize your experience. HTML and Java script are the most supported and cheapest to develop with. Adobe Shockwave is an exciting technology for web delivery. In some cases, Java Applets and a Smart Java based server architecture will introduce long term growth benefits. An investment of two hundred dollars can provide ten years of owning a name. The value of the name is simply based upon the demand of the information and products you offer. Offer a simple way to access and view your information.
The best place to buy a domain quickly at is GoDaddy.com. Because the domain name is a long term investment, their management facility are superior within the context of web configuration. Which, if you are not trained in web technology can be difficult to accomplish. Their financial service is premium, even having their own branded card and finance system. For payPal.com customers,GoDaddy.com has an integration selection. Their interface is comprehensive. But most importantly, it is easy to use for beginners. You can easily buy and put information upon a web name. The order processing and time takes about one hour to complete. Some will fly through the process in under five minutes. When you buy a new domain, that does not exist. There is a short period of time when the Internet "telephone book" is being updated world wide. During this time, an entry is be posted that links the textual name to an IP address. GoDaddy.com's web service also provides additional content management software that your can install from a menu. They also support International domain names, (.it - Italy, etc.). So many options, so many choices. And most of all, their customer service is electronically responsive and responsible. They have support and development plans for you today.
In modern times, a sensitivity exists because of the ease of the American Economy. When some are left behind, it is usually easy to get the missing goods. However, in reality the value of the item is still not cycled within a consumer relationship to the economy. An important facet that keeps employment high is the cycle.
When choosing your web domain, you must know that there is nothing automatic that will make your web site a success, To make a success, in addition to having high quality work and material, you must ensure people go to your web site and shop. It is difficult to change a customer's mind about Internet security when credit cards are concerned. Therefore, you must absolutely make sure that each of the details about the transaction and the transaction user interface is high quality. An easy method of secure payment is using a third party. However, their baggage of interrupted transaction comes along. It is a careful balance to maintain, but it must be accomplished. Ensure customer satisfaction, correct transactions and be customer need specific. Some rules that a business owner makes does effect the customer's mood and desire. Employees must envision what their manager says policy is.
Please take some time to read the following terms. Customers are how one makes money. It is easy to ascertain that each person has motives, emotions, and private desires. Following through without compromise of your customer's privacy is a top priority when using an Internet business. This will mean many different types of details for any website business that one would create. These terms introduce the standards of operation that each person with economic capacity expect. It is like having a common interface for one to change and modify business. Many practices of older times that were learned through direct phone conversation have been updated using Internet technology.
For GoDaddy.COM, these features are an add on features that are easily incorporated. GoDaddy.COM's merchant account provides ultimate ease and flexibility reducing a lot of complex tasks for a business. A website administrator can add three types of accounts. Even International banking is supported.
Related Articles
Take a minute to read the following entries. These are basic Internet technology terms. Most endeavors upon the web will use these terms. It is important that you understand the classical structure first.
The first ever .com reserved upon the web was Symbolics.com. Reserving a website name is quite easy. However, it does in most cases require a credit card. You must enter all of the information correctly, including the proper address and contact information. A website is an information responsibility. Therefore you will have to check with your Internet Service Provider to see the terms and conditions that apply. Typically when you sign up, you must read and confirm that you agree to the license terms.
A premium Internet Service provider is GoDaddy.com. Their services are comprehensive enough to handle personal and business sites. As a bonus, they have a banner hosted connection plan that costs twelve dollars per year. However, if you do not want a banner, additional fees apply.
When choosing the URL, you will be asked to confirm an extension. the .com is the major extension in America and globally (see List of Internet top-level domains). Optionally you can purchase mirror domain levels, a different extension. GoDaddy.com even offers a tremendous savings for doing so, you can get three or four at one time. The difference between them will be the extension.
Management of a website account is easy when using a one stop service call like GoDaddy.com. There are many facets that define a website technically within a network. When you establish a website, there is an actual location known of the web server computing device. This knowledge is necessary so when a user types the name of your website into a browser address box, the information can be retrieved. The recommended service provider has an extensive interface to manage all of the technical information associated with hosting a website. When you create your website with GoDaddy.com, all of this information is configured by their server software for you.
HTML is a great standard format that will be around for years to come. If you are used to a word processing environment, the type of technology used will be familiar. In HTML, you have to spell out each format tag. For simplicity, the information that directly affects browsing technology, the tags, are located within the greater and less than symbols. As a visual indicator, you become use to editing within the two modes. One for style, and one for the actual word. Because most content on a page that is readable content, continues for a long period, the formatting attributes become negligible compared to the content. The entire document that you have to work with is textual, plainly written.
Using a simple text editor, windows NotePad is similar. There are other very good text editors that people have written over the years. TextPad is a comprehensive package that is available for trial purposes. The trial is fully functional so it will work for this purpose.
Using an editor like Microsoft Word will sometimes cause illegal characters (characters that look like but are not) to appear if you use cut and paste. This may only be present in certain version combinations between the browser and the Word processor. the " and ' characters are the most noticeable issue. The characters that enclose most of the JavaScript literal strings are included. Since web pages are Unicode text, and keyboard based, a certain range of characters is expected by the parser. Other information within the HTML file can be numerous characters that are unheard of in the mortal world. See Unicode for more information.
A website can be built and reviewed upon a hard drive using a text editor and a web browser. Creating a separate folder for your website is often necessary. If you create the directory within the documents folder clicking on any file with a .html extension will automatically load the default browser to view the page. Using the text editor, create the format and text using the HTML syntax described and save it to that folder. This will allow you to easily start learning the web technology without getting a website domain. However, you will have to retest the pages after they are loaded onto any web server to make sure the URL's are correctly tagged. Sometimes, placing a URL to a file that is located on your computer will work, but when the page is published, the direct file link will not be available to the web server. Therefore, you should test web pages after they have been loaded into the web server. Development of web pages upon your hard drive is much faster than using a web server. As well, there are tools that support this through synchronization. For now, the basic text editor will be used.
HTML is a markup language. Markup within this capacity directly relates to the implementation of the tokens used. These tokens are called html tags. Each of the tags begin in a "<" and end in a ">". Tags that are block oriented, meaning there is a start and an end to the section, have beginning and ending formats. Typically an ending tag uses the "/" character to mark the position within the text. Take a look at the empty HTML skeleton below.
HTML
<HTML> <HEAD> </HEAD> <BODY> </BODY> </HTML>
HTML's basic structure includes the tag HTML at the beginning and end of the document. This is a requirement to be considered to be a valid HTML document. The other sections, HEAD and BODY are content specific. The Head element enables a user to define rules for how things appear within the display of the text. Using a specialized section that is within the HEAD tag, users can define the color of all titles within a document. There is a specific syntax for each rule.
The BODY tag contains the textual content. This section will include all paragraphs that appear upon the page. To add a paragraph, simply use the beginning <p> and </p> paragraph tags. See the example below.
HTML
<HTML> <HEAD> </HEAD> <BODY> <p>Most writing in the word is done through paragraphs. A well formed paragraph consists of a Topic sentence and supporting points. The topic sentence is considered to be the most important sentence of the paragraph. A topic sentence notes the main idea of the paragraph. There should also be at least three sentences. And last, a summary characterizes the major theme.</p> </BODY> </HTML>
Please review the following web sites. These sites are extensive and include many advanced features that will be learned later. You should be familiar with some of the tools shown. The Markup Validation Service is a good tool used to make sure the HTML you write is valid. It is a robust service and will report many syntax errors and warnings of old content use. Sometimes a document that you write will be displayable by a web browser, the development force predicted imperfections. Because the document is non conforming, different browsers may work differently. These links provide tools that will be used for a long period of time. There is even listed another html code tutorial.
Pages titles are an essential ingredient of a web page. Easily implemented, within the HTML structure the tag appears between the only <HTML> and the <HEAD> tokens. Simply stated, titles are the text that is shown in the window title bar of the browser application. As well, page titles are a retrieved indexed item scanned by search engines. It is best to place a title upon the page so users can easily locate you information when they have to cross reference to another web site. When many windows are open, the title helps differentiate your information from within a list. On some operating systems, this information is used as a direct text link upon the task bar. See the example below for more detail. The example contains the exact title used for this HTML page.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <HEAD> </HEAD> <BODY> </BODY> </HTML>
Paragraphs are added to a HTML document with the <p> tag.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <HEAD> </HEAD> <BODY> <p>Titles on a page are an important aspect of multitasking and general computing use. Achieving throughput upon a desktop user interface requires that one cross index information. This must </p> </BODY> </HTML>
Text and its appearance within computing technology can be alternate and as varying as ever. Considering the technology of printed materials, real time change and in hand control over color is an excellent feature. Text such as bold stands out while italic text draws a different attention. These traits have subtle meanings within formal written word and even in the common text. They are very useful and within the text have a small appearance; just three characters. Using the <B> and <I> tags are quite easy. Just place them around the phrase that needs the attention.
Controlling color is also an important feature. The <FONT> tag provides this functionality. It is known commonly but the functionality has been placed within a different context within formal HTML code. Generally it is accepted to change color using a <FONT> tag, but controlling the typeface and larger portions of textual rendering attributes used a different method discussed later; CSS.
The parameter value can be described using two methods. A textual list exists that describes a rainbow of colors. There are about one hundred and forty names in this list. The second method is a direct color measurement using red, green and blue mixing. The parameters can be set using integer or hexadecimal (base sixteen) notation. Often, this is used by programmers. However there are color selection pages that allow one to select using a slider knob control upon each color. Then copying the numeric that describes the color mix is accomplished using Ctrl+C and Ctrl+V.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <HEAD> </HEAD> <BODY> <p><b>Titles</b> on a page are an important aspect of multitasking and <i>general computing</i> use. Achieving throughput upon a desktop <font color=green>user interface</font> requires that one cross index information. </p> </BODY> </HTML>
This produces a formatted output that looks like this:
Titles on a page are an important aspect of multitasking and general computing use. Achieving throughput upon a desktop user interface requires that one cross index information.
Search keywords are used first within the search index database to scan for content. To add the information, the <META> tag is used. To inform the search engine parser of the tag contents, the name attributes must be set to the value "keywords". This information is used by web robots to find pages that have new search index information in them.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <p>A paragraph.</p> </BODY> </HTML>
Documents are typically divided into multiple sections. Some methods of formal writing use the chapter, section and figure concepts. However, within HTML, other filing methods can be applied. Section titles are important to label information for what it is and how it relates to the parent and child section levels. Section titles are specified with the <Hx> tag. x can range in value from one to six, giving six levels of nesting. Sometimes section titles are used to generate a table of contents. The numeric information is used to determine the level of the trunk. The table of contents generated will be reflective of the order within the tree. Formatting within the table of contents, the numbers that are large will indicate sub sections and hence the title will be indented within the hierarchy.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Movies</h1> <p>A paragraph about movies is here.</p> <h2>Science Fiction Movies</h2> <h3>Alien</h3> <h3>Time Travel</h3> <h2>Mystery Movies</h2> <h2>Love Movies</h2> <h1>Music</h1> <h2>Rock and Roll</h2> <h2>Hip Hop</h2> <h2>Techno</h2> </BODY> </HTML>
Line breaks are important when you want to space information apart for easier reading. the <br> tag is use for this. Just place it after the text, the end of the line. It can appear anywhere within the text, however the line will be ended there. A simple list of terms for example.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Artists of the 1700's</h1> Rembrandt van Rijn <br> Louise Moillon <br> Johannes Vermeer <br> </BODY> </HTML>
Line dividers are important to make something standout between sections of content. Using the <hr> tag will insert a horizontal line.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Artists of the 1700's</h1> <hr> Rembrandt van Rijn <br> Louise Moillon <br> Johannes Vermeer <br> </BODY> </HTML>
This produces out as follows:
Images can be placed into a page using the <IMG> tag. The main parameter is the src. You must specify a valid path and file name otherwise the picture will not show. Sometimes depending upon what operating system your service provider uses, you must match the character case exactly when specify the path. The UNIX web server is the most commonly used web server upon the Internet for large scale solutions.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Movies</h1> <img src="smile.jpg"> </BODY> </HTML>
Sometimes it is useful to resize an image to fit proportionally upon the page. The img tag supports many styles of parameters to specify the size. There are two basic forms percentage and pixel. When you specify either the width attribute or the height attribute by it self, the other parameter is automatically adjusted to resize proportionally. To change the width of an image, you can use the width attribute. You must enclose the information within quotes.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Movies</h1> <img src="smile.jpg" width="50%"> </BODY> </HTML>
You can also specify the exact size in pixels by using the extension px upon an integer.
HTML
<HTML> <TITLE>...</TITLE> <HEAD> </HEAD> <BODY> <h1>Movies</h1> <img src="smile.jpg" width="200px"> </BODY> </HTML>
Creating lists of items that are bulleted is easily accomplished within HTML structure. There are two types of lists, unordered and ordered. Unordered lists, the <UL> tag appears with bullets. Each item within a list is specified using the <li> tag - line item.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>Artists of the 13th century</h1> <ul> <li>Cimabue <li>Giotto di Bondone <li>Pietro Lorenzetti <li>Simone Martini <li>Ambrogio Lorenzetti </ul> </BODY> </HTML>
The output within the browser appears as follows:
Lists can also be numbered sequentially. Using the <ol< tag is the same basic operation.
HTML
<HTML> <TITLE>AlienTimes.com - Word Gift Page</TITLE> <meta name="keywords" value="alientimes.com, alientimes, computer, computing, internet, html, javascript, venture, software developer, development, c++, c, java, asm, device driver investment url good"> <HEAD> </HEAD> <BODY> <h1>13th Century Blacksmiths Terms and Technology</h1> <ol> <li>bar iron <li>anvil <li>chisel <li>tongs <li>sledgehammer <li>punches <li>drifts </ol> </BODY> </HTML>
The output within the browser appears as follows:
Hyperlink was a great key concept when it was first introduced. The ability to link portions of documents together had never been accomplished so easily before. The first basic forms of document editing where accomplished on the UNIX platform using post SGML forms of parsing algorithms. Today, creating a hyperlink is very easy because of the format.
A funny relationship that the technologist developed was naming the function. They called it an anchor. The <a> tag is used for this purpose. It has one important attribute, the href parameter. Here you specify the URL location of the document. You can also link to book marks within the same page, a common format for a Table of Contents. The tag is completed with the ending clause </a>. To specify that when the linked is clicked upon, a new window is opened is common for some sites that require index branch information learning. Common for putting references to an external information set such as an encyclopedia or dictionary. To do this, supply that target="_blank" option along with the href parameter. You can specify it in any order. Because links are generally listed together in a series, the target="_blank" comes first for easy reading. That is, the hyperlink locations stand out more within the spacing.
HTML
<HTML> <TITLE>...</TITLE> <HEAD> </HEAD> <BODY> <a href="#MovieBookmark">Movies</a><br> <a href="#SongBookmark">Songs</a><br> <a href="#BookBookmark">Books</a><br> <br><br> <A name="MovieBookmark">Movies</a> 2001: A Space Odyssey (1968) <br> Beach Blanket Bingo (1965) <br> Carnival of Souls (1962) <br> Chelsea Girls (1966) <br> Doctor Zhivago (1965) <br> Emil and the Detectives (1964) <br> Munster, Go Home! (1966) <br> Paradise, Hawaiian Style (1966) <br> X: The Man with the X-Ray Eyes (1963) <br> <hr> <A name="SongBookmark">Song</a> Goodnight Irene, Gordon Jenkins & The Weavers <br> Mona Lisa, Nat King Cole <br> Third Man Theme, Anton Karas <br> Sam's Song, Gary & Bing Crosby <br> Simple Melody, Gary & Bing Crosby <br> Music, Music, Music, Teresa Brewer <br> Third Man Theme, Guy Lombardo <br> Chattanoogie Shoe Shine Boy, Red Foley <br> Harbor Lights, Sammy Kaye <br> It Isn't Fair, Sammy Kaye & Don Cornell <br> <hr> <A name="BookBookmark">Book</a> The Man of the Forest by Zane Grey (1920) <br> Main Street by Sinclair Lewis in (1921) <br> If Winter Comes by A. S. M. Hutchison (1922) <br> Black Oxen by Gertrude Atherton (1923) <br> So Big by Edna Ferber (1924) <br> Soundings by A. Hamilton Gibbs (1925) <br> The Private Life of Helen of Troy by John Erskine (1926) <br> Elmer Gantry by Sinclair Lewis (1927) <br> The Bridge of San Luis Rey by Thornton Wilder ( 1928 ) <br> All Quiet on the Western Front by Erich Maria Remarque ( 1929 ) <br> <hr> </BODY> </HTML>
This produces output within the browser as follows:
Movies Songs Books Movies 2001: A Space Odyssey (1968)To place a link to another page within your website or another page upon another website, within the href parameter place the URL location. When the user clicks upon the hyperlink, the browser will navigate in place to the location.
HTML
<HTML> <TITLE>...</TITLE> <HEAD> </HEAD> <BODY> <a href="http://www.YouTube.com">Youtube.com</a> <a href="http://http://www.shoutcast.com/">Song Website</a> <a href="http://www.web-books.com/">WebBooks</a> </BODY> </HTML>
One of the most versatile functions available to html is its ability to format information within columns and rows. To do this within HTML is quite flexible and is used very often. The <TABLE> tag is used to define a table. Rows are defined by the <TR>. And the columns are within the row structure as <TD> elements. Within the <TABLE> and <TD> elements, the width attribute can be specified. Usually, you should have the same amount of columns per rows, but if you do not, the information will still be aligned within its cell.
Where the text falls within the cell can be changed from left, right, or center. Generally, for numeric values the alignment is set to right for easy decimal reading. Center is used often for short on off traits such as listing features of an item. Left is the default setting. As well, the entire table structure can be aligned, most often center page is used. It is important to note that using some spacing for source indentation often helps with readability. So the TD tags will be indented to show its inclusion within the TR tag structure. This is needed to find syntax errors that inadvertently occur, such as finding a missing </TABLE> </TR> or </TD>
HTML
<HTML> <TITLE>...</TITLE> <HEAD> </HEAD> <BODY> <h1>Fifteen Year Fixed Mortgage Rates</h2> <hr> <table width="50%"> <tr> <td>1980</td> <td>9.7</td> </tr> <tr> <td>1991</td> <td>8.7</td> </tr> <tr> <td>2000</td> <td>7.5</td> </tr> <tr> <td>2009</td> <td>5.3</td> </tr> </table> </BODY> </HTML>
This code will produce a formatted output that looks like this:
| 1980 | 9.7 |
| 1991 | 8.7 |
| 2000 | 7.5 |
| 2009 | 5.3 |
Website Navigation is a very important feature of web pages. Using one function and including this function upon several main pages, allows easy maintenance. If a new menu item is added, all pages are automatically updated based upon this new version. The JavaScript function below builds a simple menu structure that points to pages, has title text and also has status text. The menu is a horizontal bar. If sound is enabled, a small click is played upon each mouse over event. When the mouse moves over the menu item, the status bar changes to reflect the comment.
The menu built is enclosed within a HTML table structure. It uses the HTML tag with its events to build a presentable menu. The menu is defined within an array structure. Each item has three lines. The name upon the main menu or keyword, the title text and the status bar text. The link that is generated is the keyword plus a ".html" extension added to the end. So, if an item upon the menu were named 'Art', the page link points to 'Art.html'. When the user clicks upon the Art item within the menu, Art.html will be loaded within the window. If a menu item is named 'Home', the link is generated as 'index.html'. The script must be stored in an external file to the HTML files that use it. Take a look at the script below:
Javascript
var soundfile="sidebar.wav" ; function playsound(soundfile){ if (document.all && document.getElementById){ //reset first in case of problems document.getElementById("soundeffect").src=""; document.getElementById("soundeffect").src=soundfile; } } function CreateMenu() { /* Build the main menu 1) Preload all the graphics to calculate the width of the navigation bar 2) get the width of the client area 3) adjust the size proportionally */ /* html page name linked to graphics and _On for active graphics. a[1] = 'Name'; Name.html b[1] = 'Title Test for balloon tip.'; c[1] = 'Status Bar text'; */ var a = new Array; var b = new Array; var c = new Array; document.write('<bgsound src="#" id="soundeffect" loop=1 autostart="true">'); a[1]='Home'; b[1]='Go to the home page.'; c[1]='The home page contains Proverbs and links of the day.'; a[2]='Ideas'; b[2]='Read visionary ideas about technology and the future..'; c[2]='The Ideas page contains creative insights for scientists.'; a[3]='Gallery'; b[3]='Photo gallery online.'; c[3]='The photo gallery contains images of fans and other strange objects.'; a[4]='World'; b[4]='World view in symbol expression.'; c[4]='Realize the infinite realm of the cosmos.'; a[5]='Links'; b[5]='Favorite sites and links to other cool domains.'; c[5]='Find the greatest links with solid content in here.'; a[6]='Author'; b[6]='Read about, view pictures and contact the author Tony Matarazzo. A good guy.'; c[6]='Photographs from the American continent.'; var i; var s; document.write('<Table border=1>'); document.write('<tr bgcolor=black><td>'); for(i=1;i<a.length;i++) { s = "<a onmouseover=\"this.style.color='Indigo';this.style.backgroundColor='Cornsilk';\" onmouseout=\"this.style.color='WhiteSmoke';this.style.backgroundColor='black';\" style='text-decoration:none;color=WhiteSmoke' href='"; if(a[i]==\'Home\') { s = s + "main.html\'"; } else { s = s + a[i] + ".html\'"; } s = s + " title='" + b[i] + "\'>"; s = s + \'<font size=5>\' + a[i] + ' ♦</font>'; s = s + "</a>"; s = s + " "; document.write(s); } document.write('</td></tr></table>'); document.writeln(''); }
To include the item within a page once the JavaScript file is saved, you use the SCRIPT tag and point to the menu.js file. The .js is the standard extension for a JavaScript web program. Take a look at the HTML code below. It includes the script within the HEAD section of the HTML file. Below, within the BODY tag, the menu is positioned and generated.
Javascript
<HTML> <HEAD> <script src="Menu/Status.js" language="javascript"></script> <script src="Menu/Menu.js" language="javascript"></script> </HEAD> <body> <div id=MainMenu align="center"> <script language="javascript"> CreateMenu(); </script> </div> </body> </html>
Photo editing is nearly needed for each web design image that is used upon the web to achieve premium quality. As well, most useful time is spent using clip art collections to bring a collage together in supreme form. There are many resources available for free. The best quality comes from purchase however. In this section, you will take a browse through many useful graphic editing facilities that are online.
Pixlr.com has an editor that supports most operations that are needed for any image. It is one of the quickest methods and runs inside the browser window. Adobe Shockwave is required. There are many features that are useful: resize, brightness, contrast, sharpness, and layers.
Graphic buttons and mouse over events are useful interface functions. To change a graphic image when the mouse moves over a link, JavaScript must be assigned to an event handler. Specifically the mouse over event handler of the link displaying content. These buttons are nice, but should be designed to be very readable. As well, because the size of the font used is not dynamic, meaning that typically text is embedded within the graphic file, a designer must make sure the item is readable in many resolutions.
The following web page example shows the complete functionality typically built into such buttons. First there is a link. The link points to a YouTube.com video. The onMouseOver event is populated with an image change command. When the mouse moves over the link, the image will be changed to whatever the source parameter is set to. When the mouse is moved out of the capture range, the picture is changed back to the ordinal. Most importantly, the img is named explicitly with LeftSide. This is the name that is used to access.
Javascript
<HTML> <HEAD> </HEAD> <body> <a class="lrg" target="_blank" href="http://www.youtube.com/watch?v=kNGNLo8K6Fk" onmouseover="document.LeftSide.src='LeftOver.jpg'" onmouseout="document.LeftSide.src='Left.jpg';"><img border=1 name="LeftSide" src="Left.jpg"></a><br> </body> </html>
For more information, use the following resources.
Mouse Over ButtonsShowing a graphic upon the background of the web page is done by setting the background property of the body tag. Other elements that you have learned so far operate in a similar fashion. Each tag can have a background image applied. Within HTML these graphics can be a full page sheet or a repeated texture. The most common is using a soft texture around the edges of the web page. This is accomplished by setting the background property of the body tag to a space image for example and then creating a partition that the entire page text resides within. With proper spacing, the border becomes useful as an artistic relief and makes the text stand out. It makes some content memorable and fun to read.
Javascript
<html> <head> </head> <body background="pageBackground.png"> <table background="SeaMonster.png"> <tr><td>This is col 1</td><td>The detail information for row one is about the tet upon the background.</td></tr> </table> </body> </html>
Adding very interesting text upon the page is accomplished by using graphic rendering packages. Such packages exist upon the web in a form that can be used within a web browser. These websites allow one to download an image and then place the image into a HTML page. The common formats are BMP, GIF, JPG and PNG. Of these three formats, PNG is well suited for high color and transparency. JPG is very fast for rectangular regions. Take a moment to review the following sites:
Javascript
<HTML> <HEAD> </HEAD> <body> <img src="http://www.AlienTimes.com/WebBooks/AlienLetters.png" align="center"> </body> </html>
This code will produce the following effect upon the page. The graphic is a PNG file and has transparency enabled. The transparency setting is typically a checkbox selection of the web graphic editor.
A website that is well matched upon color is a sign of a professional site. There are many aspects of an image that make something attractive and delicious to view. With text, simple rules of color matching apply. Color matching is difficult sometimes when the base color is an unique selection. Matching colors for several positions of importance can be calculated based upon hue and saturation. One may assume that there are several markings and positions upon a page. For example, the background, the text color, and the paragraph borders are included. It is important that the color selection be proportional. The following websites allow easy mapping of a base color and then automatically display variants of the hue and contrast that match. Take a moment to explore your favorite colors. An important facet about selection is transferring the information from the page to the html page. This is covered by using the color, bgcolor, border and background CSS attributes.
When colors are specified as a numeric value, they must be preceded with a # if the information is presented using an hexadecimal value. If the information is enclosed within a RGB tag, the values for Red, Green and Blue and be specified as a numeric ranging from 0 to 255.
Javascript
<HTML> <HEAD> </HEAD> <body> <table width="50%"><Tr><td style="background:Aquamarine"><br><br><br></td></tr></table> <table width="50%"><Tr><td style="background:#ce05dd"><br><br><br></td></tr></table> <table width="50%"><Tr><td style="background:RGB(255,34,77)"><br><br><br></td></tr></table> </body> </html>
The codes produces output that looks like this:
Colors are also described using the following list of textual names. These names are supported by all web browsers. Sometimes they are more meaningful than using a RGB numeric value. However, you cannot select your very own. The color for the name is set.
An easy way to play audio stream content upon your site is to use an .m3u file. A .m3u is a standard text file that has a list of audio files. It is best to place the full URL path to the audio file. Each mp3 file should be listed upon a separate line. Use the <A> tag and set the HREF parameter to the location of the .m3u file. The link should also have the target set to blank; a new page opens. When the user clicks upon the link in most operating systems, the default player will be started and the music will play. Take a look at the code below for more detail.
http://www.AlienTimes.com/Sample.m3uJavascript
http://www.AlienTimes.com/Songs/leche%20de%20cabeza.mp3 http://www.AlienTimes.com/Songs/Geneva%20landing.mp3 http://www.AlienTimes.com/Songs/TheInterface.mp3 http://www.AlienTimes.com/Songs/mutate.mp3 http://www.AlienTimes.com/Songs/Head.mp3 http://www.AlienTimes.com/Songs/raise.mp3 http://www.AlienTimes.com/Songs/Seven%20times%20one.mp3 http://www.AlienTimes.com/Songs/mind%20remix.mp3
Within the HTML file, you simply make a link to the .m3u file as shown below.
HTML
<HTML> <BODY> <h1>Click the link below to play my new Songs</h1> <a href="http://www.AlienTimes.com/Sample.m3u" target="_blank">New Songs</a> </BODY> </HTML>
Adding sound to a web page can add elegance. Adding sound to a web page can also be a bother to some. An important understanding about adding sound to a web page is the reception audience. You must consider that the default for a web site is not sound. If a user hears sound, they are surprised. Therefore, one of the best rules to apply, is be eloquent. Play a sound that is free of distortion, has a correct audio level, and does not have pops or hiss.
Sound played as an event is typical of a mouse over event. The user moves the mouse over the link for example, and a small tick sound plays. Gizmos that play soft and short sounds are the best implementation. However, anything is possible. Use good audience digression.
Sound is added easily to a web page by incorporating the
HTML
<HTML> <BODY> <script language="JavaScript"> document.write('<bgsound src="#" id="soundeffect" loop=1 autostart="true">'); function playsound(soundfile) { if (document.all && document.getElementById){ document.getElementById("soundeffect").src=""; //reset first in case of problems document.getElementById("soundeffect").src=soundfile; } } </script> <h1>Move the Mouse over these links.</h1> <ul> <li><a href="http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml" target="_blank" onMouseOver="playsound(\'http://www.alientimes.com/Sounds/Plink.aiff\');">Plink</a> <li><a href="http://www.angelfire.com/nj2/startrek3/sound.html" target="_blank" onMouseOver="playsound(\'http://www.alientimes.com/Sounds/access_denied.wav\');">Access Denied</a> <li><a href="http://en.wikipedia.org/wiki/Identification" target="_blank" onMouseOver="playsound(\'http://www.alientimes.com/Sounds/identification.wav\');">Identification</a> <li><a href="http://en.wikipedia.org/wiki/Owl" target="_blank" onMouseOver="playsound(\'http://www.alientimes.com/Sounds/owl_2.wav\');">Owl</a> <li><a href="http://en.wikipedia.org/wiki/Sidebar" target="_blank" onMouseOver="playsound(\'http://www.alientimes.com/Sounds/sidebar.wav\');">Sidebar</a> </ul> </BODY> </HTML>
Electronic commerce is typically handled by using third party integration by most web businesses. There are many resellers that offer branding and easy logo placement. Providing shopping cart systems is also a benefit that a small investor will be interested in. the most popular accounting firm for the payment collection end now is PayPal.com.
The company PayPal.com offers a direct way to use forms within your page. Simply cut and paste the text after filling in the fields upon paypal, and presto, electronic payments can now be accepted. You must have a credit card to use this service as a payment accepter. Do not expect to scam, you should provide the goods and services as designed. Therefore, upon your website, you must have customer contract agreement that specifies your policies.
Graphic menus are nice especially if the buttons look good. The script below generates an image button link table that supports a graphic paste up upon the mouse over. For simplicity, the file names of the graphic files are the same name as the keyword with .png added as an extension. The graphic files should be located within a branch directory upon the server from the Menu script. That is, the /image directory. For example, the two states of the graphic menu item for Art would be Art.png and Art_Over.png. The html page that the keyword refers to is generated as 'Art.html'.
The GraphicMenu.js file contains the definition for each menu item. Reviewing the source code below, you will notice that there are two strings for each menu item. The first item is the keyword and the second is the tool tip. The sample below contains a simple directory of links. Rock.html is shown in code, but all of the other pages are very similar.
The buttons were generated using CoolText.com's button generator. To automatically generate the mouse over graphic, you will need to change the graphic rendering options upon the page. These options are located upon the Button page. Options that can be changed are Shape, Fill, Shadow and Other. The Other panel has a box for mouse over setting. When this is turned on to highlight or darken, two images are created by the software. One for the button and the other for the mouse over option. It is important when you save the files that you name them the same as the keyword within the menu. The mouse over .png file must have "_Over" added to the name.
The button graphics must go into a sub directory named /image. Within this directory are all of the menu graphic assets. Optionally a sound can be played. Listed here is a small wav file named tink.wav. The file is played when the mouse is moved over the menu item and the highlight png is shown. To get started, you can use the templates below. As a special consideration, you must use exact capitalization within the GraphicMenu.js file, the html file names, and the directories. By including this within each of your web pages, adding a new page can be accomplished by simply modifying the menu itself.
Preview: GraphicMenuTest.html|
The following files are the main web pages. Right click and then save as to download them to your hard drive.: |
These files should be located within a sub directory of the web site. Files within the /image directory are: |
The source for GraphicMenu,js
Javascript
/**************************************************************************** The following function allows parameters to be set to the main function. Typically users will not have to change below this function. Include this file into all pages that you wish to have navigation used. Example blank page: <html> <head> <script src="http://www.alientimes.com/WebBooks/MenuSample/GraphicMenu.js" language="javascript"></script> </head> <body bgcolor=white> <div id=MainMenu align="center"> <script language="javascript"> CreateMenu(); </script> </div> </body> ****************************************************************************/ function CreateMenu() { /* The first parameter is the menu structure. Users will set the menu structure here. There are two parts, the first line is the name of the graphic file. The second string is the tip that displays when the mouse is over; the balloon tooltip. If you have to use a ' character within the information, use the html entity code ’ to enter that information into the tool tip. Parameter two is the default name of the home button. Since this may be different in some cases, set this to the page. Parameter three is the background of the menu structure. Set this to your preference. Parameter four is a switch used to control menu direction. setting to 1 is a vertical menu and 0 is horizontal. Parameter five is the mouse over sound file. If this is left blank, meaning two quotes together "" no sound will be played. */ var menu=[ 'Home', 'Go to the home page.', 'Jazz', 'The Jazz page contains links for numerious jazz artists', 'Rock', 'Listen to my favorite Rock songs.', 'Classical', 'Classical Music online', 'Links', 'Favorite sites and links to other cool domains.', 'Author', 'Read about, view pictures and contact the author.' ]; BuildMenu(menu, "GraphicMenuTest.html", "White", 0, "image/tink.wav"); } /************************************************************************/ var soundfile="sidebar.wav" ; function menuTick(soundfile){ if (document.all && document.getElementById){ //reset first in case of problems document.getElementById("soundeffect").src=""; document.getElementById("soundeffect").src=soundfile; } } function BuildMenu(sMenu, sHomePage, sBackGroundColor, bVert, sSoundFile) { var i; var s; if(sSoundFile!='') document.write('<bgsound src="#" id="soundeffect" loop=1 autostart="true">'); document.write('<Table border=0>'); document.write('<tr bgcolor=' + sBackGroundColor + '><td>'); for(i=0;i<sMenu.length;i+=2) { // s = "<a onmouseover=\"this.style.color='Indigo';this.style.backgroundColor='Cornsilk';\" onmouseout=\"this.style.color='WhiteSmoke';this.style.backgroundColor='black';\" style='text-decoration:none;color=WhiteSmoke' href='"; s = "<a style='text-decoration:none' href='"; if(sMenu[i]=='Home') { s = s + sHomePage + "'"; } else { s = s + sMenu[i] + ".html'"; } s = s + " title='" + sMenu[i+1] + "'>"; s = s + "<img border=0 id=imgNav" + i; s = s + " src='image/"; s = s + sMenu[i] + ".png' "; s = s + "OnMouseOver=\"this.src='image/"; s = s + sMenu[i] + "_Over.png';"; if(sSoundFile!='') { s = s + "menuTick('" + sSoundFile + "');"; } s=s+"return true\" "; s = s + "OnMouseOut=\"this.src='image/"; s = s + sMenu[i] + ".png';return true;\">"; s = s + "</a>"; if(bVert==1) s=s+"<br>"; document.write(s); } document.write('</td></tr></table>'); document.writeln(''); }
The source for GraphicMenuTest.html
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <META NAME="keywords" CONTENT="Heterosexual, Woman, Man, Love, Miracle, Genius"> <META NAME="robots" CONTENT="FOLLOW,INDEX"> <title>Alien Times - Menu Links</title> <LINK href="menusite.css" rel="stylesheet" type="text/css"> <script src="http://www.alientimes.com/WebBooks/MenuSample/GraphicMenu.js" language="javascript"></script> </head> <body bgcolor=white> <div id=MainMenu align="center"> <script language="javascript"> CreateMenu(); </script> </div> <div class="NameTitle" align="center">Home - Astronomy Information</div> <div align="center" style="background-color:maroon;width:50%"> <a class="lrg" target="_blank" href="http://www.nasa.gov">Nasa</a><br /> <a class="lrg" target="_blank" href="http://www.scientificamerican.com">Scientific American</a><br /> <a class="lrg" target="_blank" href="http://www.spacetoday.org">Space Today</a><br /> <a class="lrg" target="_blank" href="http://www.spacekids.com">Space Kids</a><br /> <a class="lrg" target="_blank" href="http://www.nationalgeographic.com/solarsystem/index.html">The Solar System</a><br /> <a class="lrg" target="_blank" href="http://www.seti.org">SETI</a><br /> <a class="lrg" target="_blank" href="http://planetquest.jpl.nasa.gov/">PlanetQuest</a><br /> <a class="lrg" target="_blank" href="http://amazing-space.stsci.edu/resources/explorations/index.shtml">Amazing Space: Explorations</a><br /> <a class="lrg" target="_blank" href="http://solar-center.stanford.edu/folklore/folklore.html">Solar Folklore</a><br /> <a class="lrg" target="_blank" href="http://coolcosmos.ipac.caltech.edu/">Cool Cosmos</a><br /> <a class="lrg" target="_blank" href="http://landsat.gsfc.nasa.gov/earthasart/index.html">Earth as Art</a><br /> <a class="lrg" target="_blank" href="http://amazing-space.stsci.edu/">Amazing Space</a><br /> <a class="lrg" target="_blank" href="http://www.live-eclipse.org/">Live! Universe</a><br /> <a class="lrg" target="_blank" href="http://www.marsproject.com/index.htm">The Mars Project</a><br /> </div> </body> </html>
The source for Rock.html
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <META NAME="keywords" CONTENT="Music"> <META NAME="robots" CONTENT="FOLLOW,INDEX"> <title>Alien Times - Jazz Links</title> <LINK href="menusite.css" rel="stylesheet" type="text/css"> <script src="http://www.alientimes.com/WebBooks/MenuSample/GraphicMenu.js" language="javascript"></script> </head> <body bgcolor=white> <div id=MainMenu align="center"> <script language="javascript"> CreateMenu(); </script> </div> <div class="NameTitle" align="center">Rock</div> <ul> <li><a href="http://en.wikipedia.org/wiki/Rock_and_roll" target="_blank">Rock and roll</a> <li><a href="http://rockhall.com/" target="_blank">Rock hall</a> <li><a href="http://www.history-of-rock.com/" target="_blank">History of Rock</a> <li><a href="http://www.youtube.com/watch?v=M3T_xeoGES8" target="_blank">Jon Jett and the Blackhearts - I love Rock and Roll</a> </ul> </body> </html>
Generating a table of contents based upon the header tags of an HTML document is accomplished using a TOC script. The table of content script that is linked here comes from Stuart Langridge and Daniel Folkinshteyn. The script is loaded within the HTML page using the SCRIPT tag pointed to an external file. The script makes it very easy to publish content and the table of contents is automatically updated for the user when they load a page. The script is robust, and works with many browsers. The script is fast and uses the natural method of scan - the document object model. When the page loads, some time may be spent while the entire page contents are loaded. After the information has loaded, the table of contents will appear. The original source and script instructions can be found here: Wiki: Generated_toc
There are a couple of options that you should be familiar with. First, there may be some <Hx> tags that you do not want listed upon the contents table. To make the script skip a tag, set the class parameter to "no-TOC" and the item will not appear within the table of contents list. Take a look at the example below which uses the script.
Javascript
<html> <head> <meta name="Keywords" content="computer programming asm C C++ Java"/> <title>AlienTimes.com - Java Programming</title> <style> div.DocumentTitle { color: Black; font-family: Helvetica; font-size: 30px; font-weight: 100; width: 95%; } a:link { color:blue; text-decoration:underline; font-size:12.0pt; font-family:"Helvetica"; font-weight: 100; } a:hover { background:Black; color:Orange; text-decoration:underline; text-decoration-style:dashed; font-size:12.0pt; font-weight: 100; font-family:"Helvetica"; } a:visited { color:orange; text-decoration:underline; font-size:12.0pt; font-family:"Helvetica"; font-weight: 100; } ul { margin-left: 40px; padding-left: 0px; border: 0px solid DarkOrange; list-style: none; width: 80%; } ul li { height: 40px; padding: .3em 0; color:black; font-size:12.0pt; font-family:"Helvetica"; } h1 { font-size:20.0pt; font-family:"Helvetica"; color:DarkRed; } h2 { font-size:16.0pt; font-family:"Helvetica"; color:DarkBlue; } h3 { font-size:14.0pt; font-family:"Helvetica"; color:DarkBlue; } p.Introduction { margin-right:.3in; margin-left:.3in; font-size:12.0pt; font-family:"Helvetica"; color:black; text-align:left; text-indent: 100px; font-weight: 100; } p.ArticleTitle { background:Indigo; color:white; font-size:12.0pt; font-family:"Helvetica"; padding-bottom:0; padding-top:0; padding-right:.1in; padding-left:.1in; } p.ArticleBody { margin:0.3in; color:black; font-size:12.0pt; font-family:"Helvetica"; text-align:left; } </style> <script type="text/javascript" src="http://www.alientimes.com/WebBooks/generated_toc.js"></script> </head> <body> <h1 class="no-TOC">Java Programming</h1> <h2 class="no-TOC">by Anthony Matarazzo</h1><br><br> <div id="generated-toc" class="list_type_ol back_to_top_on generate_from_h1 generate_to_h6" style="border: 0px solid gray; padding: 10px;"> <h1 class="no-TOC">Table of Contents</h1></div> <h1>Introduction</h1> <h1>Chapter One</h1> <p class="ArticleBody">Thesis or Context information.</p> <p class="ArticleBody">Put text here....</p> <p class="ArticleBody">Paragraph number two</p> <p class="ArticleBody">Summary Information </p> <p class="ArticleBody">Conclusion ..</p> <h2>Reserved keywords</h2> <h2>Loops</h2> <h2>Variables</h2> <h1>Chapter Two</h1> <h2>Decision control</h2> <h2>Variable types</h2> </body> </html>
Here is the listing of the generated_toc.js script. Again the script was written by Stuart Langridge and Daniel Folkinshteyn. The source code and documentation can be found at: Wiki: Generated_toc
CoolText.comJavascript
/** Generated TOC Stuart Langridge, July 2007 ### More detailed documentation on usage can be found here: ### http://wiki.df.dreamhosters.com/wiki/Generated_toc Generate a table of contents, based on headings in the page. To place the TOC on the page, add <div id="generated-toc"></div> to the page where you want the TOC to appear. If this element is not present, the TOC will not appear. The TOC defaults to displaying all headings that are contained within the same element as it itself is contained in (or all headings on the page if you did not provide a generated-toc container). To override this, provide a "highest heading" value by adding class="generate_from_h3" (or h2, h4, etc) to the container. This will include headings h3 through h6. (If unspecified, this will display all headings, as if class="generate_from_h1" was specified.) To limit from the other site, add a 'generate_to' class, such as "generate_to_h4". Note that the 'order' of headings goes from lower numbers to higher, so that you go "from" h1 "to" h6. So for example, to limit headings to between h2 and h4, you can specify class="generate_from_h2 generate_to_h4" If you specify a generate_to that is below generate_from, it will be set to equal generate_from. The TOC defaults to operating only on headings contained within the same element as it itself, i.e., in a page like this: <div> <div> <div id="generated-toc"></div> <h1>foo</h1> <h2>bar</h2> </div> <h1>quux</h1> </div> The "quux" heading will not appear in the TOC. To override this, add class="generate_for_page" to the container, which will process all headings on the page wheresoever they may be. ################## ## Modified by Daniel Folkinshteyn <nanotube@users.sourceforge.net> ## August 26, 2008 ################## ## ## List of changes: ## * Added list type specification for the TOC (configurable) ## * Add "back to top" links after each heading that is included in the TOC. (configurable) ## * Made default to show the toc rather than hide it, if there's no cookie. ## * Cosmetic improvements to skip and show/hide links ## * Add some more documentation and examples (see immediately below). ## * Add generate_to config Some further documentation: ======== To exclude a heading from the TOC, add a "no-TOC" class to it. For example: <h2 class="no-TOC">This will not show up in the TOC</h2> A good place to use this is in specifying a title for your table of contents. For example, you might like the following: <div id="generated-toc"> <h2 class="no-TOC">Table of Contents</h2> </div> ======== To set the TOC list type (ordered or unordered list), give the div a class of "list_type_ul" or "list_type_ol". For example: <div id="generated-toc" class="list_type_ul"></div> Default is ordered list ('ol'). ======== To enable or disable "back to top" links in the body, give the div a class of "back_to_top_on" or "back_to_top_off". For example: <div id="generated-toc" class="back_to_top_off"></div> The default is "on" - back to top links will be generated after each heading included in the TOC. ======== To specify multiple classes for the div, separate them with spaces. For example: <div id="generated-toc" class="generate_from_h3 generate_for_page list_type_ul"></div> ======== For conflicting class specifications, the last specified class takes precedence. For example, for the following specification: <div id="generated-toc" class="generate_from_h3 generate_from_h2 list_type_ul list_type_ol"></div> The resulting TOC will be generated from h2, and use ordered list type ('ol'). */ generated_toc = { generate: function() { // Identify our TOC element, and what it applies to generate_from = '0'; generate_to = '6'; generate_for = 'unset'; list_type = 'ol'; // this is the default TOC list type back_to_top = 'on'; // this is the default setting for back to top links. tocparent = document.getElementById('generated-toc'); if (tocparent) { // there is a div class="generated-toc" in the document // dictating where the TOC should appear classes = tocparent.className.split(/\s+/); for (var i=0; i<classes.length; i++) { // if it specifies which heading level to generate from, // or what level to generate for, save these specifications if (classes[i].match(/^generate_from_h[1-6]$/)) { generate_from = classes[i].substr(classes[i].length-1,1); } else if (classes[i].match(/^generate_for_[a-z]+$/)) { generate_for = classes[i].match(/^generate_for_([a-z]+)$/)[1]; } else if (classes[i].match(/^list_type_[a-z]+$/)) { list_type = classes[i].match(/^list_type_([a-z]+)$/)[1]; } else if (classes[i].match(/^back_to_top_[a-z]+$/)) { back_to_top = classes[i].match(/^back_to_top_([a-z]+)$/)[1]; } else if (classes[i].match(/^generate_to_h[1-6]$/)) { generate_to = classes[i].substr(classes[i].length-1,1); } } } else { // They didn't specify a TOC element; exit return; } // doesn't make sense to have generate_to less than generate_from // so just quietly set them to equal if (generate_to < generate_from) { generate_to = generate_from } // set top_node to be the element in the document under which // we'll be analysing headings if (generate_for == 'page') { top_node = document.getElementsByTagName('body'); } else { // i.e., explicitly set to "parent", left blank (so "unset"), // or some invalid value top_node = tocparent.parentNode; } // If there isn't a specified header level to generate from, work // out what the first header level inside top_node is // and make that the specified header level if (generate_from == 0) { first_header_found = generated_toc.findFirstHeader(top_node); if (!first_header_found) { // there were no headers at all inside top_node! return; } else { generate_from = first_header_found.toLowerCase().substr(1); } } // add all levels of heading we're paying attention to to the // headings_to_treat dictionary, ready to be filled in later headings_to_treat = {} headings_to_treat["h" + generate_to] = '' for (var i=parseInt(generate_to) - 1; i>= parseInt(generate_from); i--) { headings_to_treat["h" + i] = ''; } // get headings. We can't say // getElementsByTagName("h1" or "h2" or "h3"), etc, so get all // elements and filter them ourselves // need to use .all here because IE doesn't support gEBTN('*') nodes = top_node.all ? top_node.all : top_node.getElementsByTagName('*'); // put all the headings we care about in headings headings = []; for (var i=0; i<nodes.length;i++) { if (nodes[i].nodeName.toLowerCase() in headings_to_treat) { // if heading has class no-TOC, skip it if ((' ' + nodes[i].className + ' ').indexOf('no-TOC') != -1) { continue; } headings.push(nodes[i]); } } // make the basic elements of the TOC itself, ready to fill into // first, check if there's a cookie defined to save the state as open status = generated_toc.readCookie("generated_toc_display"); // Unless cookie explicitly specifies to start closed, we leave it open. if (status && status == "closed") { display_initially = "none"; toggle_initially = "[-- show table of contents --]"; } else { display_initially = "block"; toggle_initially = "[-- hide table of contents --]"; } cur_head_lvl = "h" + generate_from; cur_list_el = document.createElement(list_type); cur_list_el.style.display = display_initially; p = document.createElement('p'); span = document.createElement('span'); span.className = 'hidden'; a = document.createElement('a'); a.href = '#aftertoc'; a.appendChild(document.createTextNode('[-- skip table of contents --]')); span.appendChild(a); p.appendChild(span); tocparent.appendChild(p); p = document.createElement('p'); p.id = 'toggle-container'; a = document.createElement('a'); a.id = 'generated_toc_d_toggle'; a.appendChild(document.createTextNode(toggle_initially)); p.appendChild(a); a.onclick = generated_toc.wrapOpenClose(a,cur_list_el); a.href = '#'; tocparent.appendChild(p); tocparent.appendChild(cur_list_el); // now walk through our saved heading nodes for (var i=0; i<headings.length; i++) { this_head_el = headings[i]; this_head_lvl = headings[i].nodeName.toLowerCase(); if (!this_head_el.id) { // if heading doesn't have an ID, give it one this_head_el.id = 'heading_toc_j_' + i; this_head_el.setAttribute('tabindex','-1'); } while(this_head_lvl > cur_head_lvl) { // this heading is at a lower level than the last one; // create additional nested lists to put it at the right level // get the *last* LI in the current list, and add our new UL to it var last_listitem_el = null; for (var j=0; j<cur_list_el.childNodes.length; j++) { if (cur_list_el.childNodes[j].nodeName.toLowerCase() == 'li') { last_listitem_el = cur_list_el.childNodes[j]; } } if (!last_listitem_el) { // there aren't any LIs, so create a new one to add the UL to last_listitem_el = document.createElement('li'); last_listitem_el.className='TOCUl'; } new_list_el = document.createElement(list_type); new_list_el.className='TOCUl'; last_listitem_el.appendChild(new_list_el); cur_list_el.appendChild(last_listitem_el); cur_list_el = new_list_el; cur_head_lvl = 'h' + (parseInt(cur_head_lvl.substr(1,1)) + 1); } while (this_head_lvl < cur_head_lvl) { // this heading is at a higher level than the last one; // go back up the TOC to put it at the right level cur_list_el = cur_list_el.parentNode.parentNode; cur_head_lvl = 'h' + (parseInt(cur_head_lvl.substr(1,1)) - 1); } // create a link to this heading, and add it to the TOC li = document.createElement('li'); a = document.createElement('a'); a.href = '#' + this_head_el.id; a.className='TOCLink'; a.appendChild(document.createTextNode(generated_toc.innerText(this_head_el))); li.appendChild(a); cur_list_el.appendChild(li); // create a "back to top" link if (back_to_top == 'on'){ newdiv = document.createElement("div"); newdiv.setAttribute("align", "right"); newdiv.innerHTML = "<br><a href='#beforetoc'>[back to top]</a>"; this_head_el.parentNode.insertBefore(newdiv, this_head_el.nextSibling); } } // add an aftertoc paragraph as destination for the skip-toc link p = document.createElement('p'); p.id = 'aftertoc'; tocparent.appendChild(p); // add a beforetoc paragraph as destination for the back-to-top link if (back_to_top == 'on'){ p = document.createElement('p'); p.id = 'beforetoc'; tocparent.parentNode.insertBefore(p, tocparent) } // go through the TOC and find all LIs that are "empty", i.e., contain // only ULs and no links, and give them class="missing" var alllis = tocparent.getElementsByTagName("li"); for (var i=0; i<alllis.length; i++) { var foundlink = false; for (var j=0; j<alllis[i].childNodes.length; j++) { if (alllis[i].childNodes[j].nodeName.toLowerCase() == 'a') { foundlink = true; } } if (!foundlink) { alllis[i].className = "missing"; } else { alllis[i].className = "notmissing"; } } }, wrapOpenClose: function(a, cur_list_el) { // we return a function here so that it acts as a closure; // in essence the inner function, which is the event handler // for clicking on the toggle-toc link, remembers the a and cur_list_el // elements as they are when they're passed in to it. // This is an explicit function rather than an anonymous function // defined where it's called so it's easier to understand. return function(e) { d = cur_list_el.style.display; a.firstChild.nodeValue = (d == 'block' ? '[-- show' : '[-- hide') + ' table of contents --]'; a.className = (d == 'block' ? 'toggle-closed' : 'toggle-open'); cur_list_el.style.display = d == 'block' ? 'none' : 'block'; // set a cookie to "open" or "closed" to save the state of the TOC if (cur_list_el.style.display == "block") { generated_toc.createCookie("generated_toc_display","open",21); } else { generated_toc.createCookie("generated_toc_display","closed",21); } if (window.event) { window.event.returnValue = false; window.event.cancelBubble = true; } else { e.preventDefault(); e.stopPropagation(); } } }, /* cookie handling: http://www.quirksmode.org/js/cookies.html */ createCookie: function(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }, readCookie: function(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }, eraseCookie: function(name) { createCookie(name,"",-1); }, innerText: function(el) { return (typeof(el.innerText) != 'undefined') ? el.innerText : (typeof(el.textContent) != 'undefined') ? el.textContent : el.innerHTML.replace(/<[^>]+>/g, ''); }, findFirstHeader: function(node) { // a recursive function which returns the first header it finds inside // node, or null if there are no functions inside node. var nn = node.nodeName.toLowerCase(); if (nn.match(/^h[1-6]$/)) { // this node is itself a header; return our name return nn; } else { for (var i=0; i<node.childNodes.length; i++) { var subvalue = generated_toc.findFirstHeader(node.childNodes[i]); // if one of the subnodes finds a header, abort the loop and return it if (subvalue) return subvalue; } // no headers in this node at all return null; } }, init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; generated_toc.generate(); } }; (function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st = setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState; if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);} else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ document.addEventListener("DOMContentLoaded",i,false); } else if(e){ ( function(){var t=document.createElement('doc:rdy');try{t.doScroll('left'); i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(generated_toc.init);
Putting it all together, you can have a template that generates a book and have borders around the edge. The information is quickly displayed because it uses HTML only to achieve the effect. Graphic relief can be established by setting the page background. The DIV tag that is located within the page contains the main content. Padding is set around the page to mimic the proportions and views of desktop publishing formats. A Table of Contents is included. Setting the colors and background of the text is accomplished by modifying within the STYLE tag. The files are listed below.
Javascript
<html> <head> <meta name="Keywords" content="Text Book Author Read Fiction"/> <title>A Book Sample</title> <style> div.DocumentTitle { color: Black; font-family: Helvetica; font-size: 30px; font-weight: 100; width: 95%; } a:link { color:blue; text-decoration:underline; font-size:12.0pt; font-family:"Helvetica"; font-weight: 100; } a:hover { background:Black; color:Orange; text-decoration:underline; text-decoration-style:dashed; font-size:12.0pt; font-weight: 100; font-family:"Helvetica"; } a:visited { color:orange; text-decoration:underline; font-size:12.0pt; font-family:"Helvetica"; font-weight: 100; } ul { margin-left: 40px; padding-left: 0px; border: 0px solid DarkOrange; list-style: none; width: 80%; } ul li { height: 40px; padding: .3em 0; color:black; font-size:12.0pt; font-family:"Helvetica"; } h1 { font-size:20.0pt; font-family:"Helvetica"; color:DarkRed; } h2 { font-size:16.0pt; font-family:"Helvetica"; color:DarkBlue; } h3 { font-size:14.0pt; font-family:"Helvetica"; color:DarkBlue; } p.Introduction { margin-right:.3in; margin-left:.3in; font-size:12.0pt; font-family:"Helvetica"; color:black; text-align:left; text-indent: 100px; font-weight: 100; } p.ArticleTitle { background:Indigo; color:white; font-size:12.0pt; font-family:"Helvetica"; padding-bottom:0; padding-top:0; padding-right:.1in; padding-left:.1in; } p.ArticleBody { margin:0.3in; color:black; font-size:12.0pt; font-family:"Helvetica"; text-align:left; } body { background-image:url('StarsAndNebula.jpg'); background-repeat: repeat; } </style> <script type="text/javascript" src="http://www.alientimes.com/WebBooks/generated_toc.js"></script> </head> <body> <br><br><br><br> <div align="center"> <div style="width: 80%; background-color: #FFFFFF; border: 3px solid black; padding:13px; text-align: left;"> <!-------------------- comment: CONTENT EDITS Start here !------------------> <h1 class="no-TOC">[Title Here]</h1> <h2 class="no-TOC">by [Your Name Here]</h1><br><br> <div id="generated-toc" class="list_type_ol back_to_top_on generate_from_h1 generate_to_h6" style="border: 0px solid gray; padding: 10px;"> <h1 class="no-TOC">Table of Contents</h1></div> <h1>Introduction</h1> <h1>Chapter One</h1> <p class="ArticleBody">Thesis or Context information.</p> <p class="ArticleBody">Put text here....</p> <p class="ArticleBody">Paragraph number two</p> <p class="ArticleBody">Summary Information </p> <p class="ArticleBody">Conclusion ..</p> <h2>Section A</h2> <h2>Section B</h2> <h2>Section C</h2> <h1>Chapter Two</h1> <h2>Section A</h2> <h2>