Tag Archives: Articles

Web Design Articles – Web Design Tips

Now let’s assume that this web page belongs to a site that sells products online. The very fact that half the users cannot even see the page, translates into losses worth half the amount straightaway (perhaps, even more!) Hence we present here a blend of different creative skills & technical prowess – and one is no less important than the other.

In the following lines, we have jotted down a few points that we noticed during our observation on online sites which are important from the point of view of web designers. Some of them may be taken with a pinch of salt; for it is not possible to please everyone every time. But most of them are simple enough to be used as a rule of thumb.

1. A picture, they say, is worth a thousand words. A picture file, alas, is also almost as big. Images, no doubt, enhance the look of a page, but it is not advisable to go overboard in stuffing your page with a truckload of images. Most net-surfers use a dial-up connection and the average time to load a page should be no longer than 5 seconds. If it’s longer, the surfer will most probably click away elsewhere. So, within this time, all the images on a page must be loaded as well. So, as a rough yardstick, keep the aggregate page size less than 30k.

Another important point to note is that each file on the page requires a separate HTTP request to the server. So a lot of small images – even if they do not add up to a lot in terms of bytes – will slow down the loading a lot.

Even when you must use images for navigation, please give a second thought to the users who will not be seeing those jazzy, fantastic & truly amazing buttons that you spent hours to design. Yes, we are talking of the ALT text attribute of the IMG tag. Do not forget to provide an Alternate Text for each image that you use for navigation. (It may be left blank for certain images that are purely for aesthetic reasons, but let that be an exception, rather than the rule.) Though not obviously apparent, ALT text can help such users immensely.

Modern browsers offer users a choice to turn off images. This gives an idea of how troublesome the unwanted images could be.

A couple of more attributes that make your pages load faster are the HEIGHT and WIDTH attributes. Without these, the browser must wait for the image to download since it cannot know how much space to leave for them!

2. Navigability & functionality come before artistic excellence. It is no use making your site a masterpiece of art if users cannot navigate around it – even after they reach the main page; they have no clue as to how to go where they want to go.

3. Especially common, is a kind of navigation that some people call Mystery Meat Navigation. That means that unless your mouse moves over an image, you have no idea where that link might take you. Only when the mouse hovers do you see the actual link. This is cumbersome because users need to move their mouse all over the place to find out which part is a link and which is not.

4. Follow the K.I.S.S. principle: Keep it simple, stupid!

5. Next is a very important practical suggestion: whenever your whole page is within a TABLE, the page cannot render (i.e., the page does not show on the screen) unless the entire table is downloaded. You might have noticed this on several websites, when there is no activity for a long time, and suddenly the entire page is visible. Hence, to avoid such a situation, what you should do is this: Split the table up into two tables one below the other, and let the top one be a short table that displays just the page header and a few navigation links. So now, immediately upon downloading this part of the page, users can see the page header – and this prepares them for the long wait ahead, as well as keeps them from leaving your site to go to other sites, in case of a slow connection.

6. The ongoing browser wars have left only one casualty – the user. As a word of caution, stay away from all browser-specific functions. Because if a certain feature is supported by one browser, it will most definitely not be supported by another. Where you must use such features, it should not hamper the display of the page in the other browser which does not support such functionality. In other words, your page should degrade gracefully.

7. Creating a new browser window should be the authority of the user only. Do not try to popup new windows to clutter the user’s screen. All links must open in the same window by default. An exception, however, may be made for pages containing a links list. It is convenient in such cases to open links in another window, so that the user can come back to the links page easily. Even in such cases, it is advisable to give the user a prior note that links would open in a new window.

8. Keep in mind the fonts-challenged users too. The ultra-jazzy “Cloister Black MT Light” font that looks so amazing on your machine may well be degraded into plain old Times New Roman on your user’s machine. The reason? He/she does not have the font installed on his/her machine – and one thing’s obvious – there’s nothing you can do about the situation, sitting halfway across the globe from them.

9. Stay clear of out-of-the-way hard-to-find fonts. Use plain vanilla fonts like Arial, Verdana, Tahoma, and Courier. If need be, make your jazzy fonts into an image and put that on the page. (And while you’re there, do not forget Tip #1.)

10. A new design trick that is increasingly being used on the web has caught my fancy: It is a very functional navigation bar that guides you across all possible paths within the site. It looks something like this –  Read More:

 

Web Design Articles – Building a Content Rich Website

You might run a wonderful advertising campaign; develop effective marketing tools and attractive affiliate programs. But unless your Website is rich in content, you will not be able to garner sufficient hits to your site. Content that is useful, valuable, informative, educational or just plain entertaining can attract and retain an audience better than anything else.

Anyone can create a content-rich Website by following a few key points:

· Be disciplined
· Update your site regularly
· Know how to create content, or where to find it

Discipline and Commitment

To create your content-rich Website, you need tunnel vision and a laser sharp focus. In a word; self discipline. Don’t let yourself be distracted: limit your online content explorations only to Websites and resources that are directly connected to your site’s subject.

Discipline also extends to content creation. Successful writers do not wait for inspiration before beginning their work. Instead, they develop a regular writing schedule, and they stick to it. Whether they feel like it or not, they sit down at a desk and write.

You too must develop a schedule to add content to your Website, and follow it.

Regular Updates to your Website

Nothing is worse than a Website which is stale and not updated.

Regularly updating or modifying your Website’s content gives you an edge over the competition. People will keep returning to your site if they notice something new to see, learn from or enjoy each time.

 

Creating Your Content

You know best – or should – what your audience wants. It then becomes an easy task to decide about which types of content will best serve their needs and how to go about finding or creating it. Here are some suggestions:

· Editorials
· Feature articles
· News clips or stories
· Art galleries
· Aggregating the best content
· Reviews
· Announcements
· Interviews
· Interactive features – polls, feedback, discussion groups, forums, chat

Editorials

Editorials are the opinion of a perceived ‘expert’ in the field. And they make good content, because they invite reader response, either endorsing or doing critical appreciation of the writer. This can make for lively debate. Give your readers an avenue to make their views known – by including a bulletin board or guest book on your site. People will return back to your site, at least to read other responses to their comments. And you can use this feedback from your audience by incorporating it into a follow up article in the future!

Full-length Feature Articles

A feature article is the most common – and one of the best – forms of content.

Depending on the nature of your site, the articles may be long or brief, formal or chatty, technical or entertaining.
Here are some tips:

· Articles shouldn’t be too long. While there aren’t any rules, it is perhaps safe to keep feature articles below 1200 words. If they are longer, convert them into multi-part features.

· Articles should be relevant to the topic of your Website.

· They should educate, entertain or inform. Try and limit the message of each piece to one or two new ideas.

· Don’t simply rehash an article you’ve read elsewhere. By publishing something that hasn’t been already featured elsewhere, you enhance the value and credibility of your site.

There are several ways to get original content.

- Write your own features. This assumes you write reasonably well. If you can’t, or don’t have the time or inclination then getting someone to write articles for you has benefits to both you and the author.

Reprints

Reprint articles written by others, but you must always obtain permission. All work, from the moment it is written, is copyright and owned by the author, whether it is marked with a copyright symbol or not. Content is not free. You can, however, make reprints interesting and personalized by putting your own ‘spin’ on the content. Write an introduction to the subject, or comment on the author’s opinions or conclusions.

Take care to avoid ‘editing’ the original article without the author’s permission. Avoid articles that have been reprinted many times before on other Websites and electronic publications.

The News Desk

Your Website can become a source of the latest developments and happenings in areas of interest by providing timely news on topics of interest to your readers.

Create a separate section of your site to deal with industry news. Or you might devote an entire Website to news updates.

There are many ways of presenting news:

· As a feature article
· As short news clips, with a link to the full story
· As news stories, where each item is explained at length

Whichever way you choose to present the news, make sure to stamp it with your own personality. Make it interesting, personal, chatty, fun, unique, or all of these – with your style of writing, or by adding your point of view.

As with feature articles, news clips should be

· Relevant
· Useful to your reader
· Timely. Remember, old news is no news!

There are many resources out there to help you find news stories to feature. You could:

· Subscribe to eZines on your topic
· Sign up for news delivery services that send updates periodically by email
· Register to receive press releases on your topic
· Actively hunt for newsy items during your Web surfing
· Read newspapers, magazines and books on your subject
· Attend conferences, workshops or seminars and write about your impressions

The Content Aggregator

By making your Website the ultimate content resource on issues related to your topic, you would attract and retain a loyal audience. Your site will become a destination for anyone seeking information on your subject.

As an expert on your topic, you can evaluate sites and other resources (eZines, directories, books, offline publications) for the best, and then list them along with your rating and opinions.

 

The Art Gallery

Text is not the only form of content. Sound, music, pictures, photographs, video clips – and soon maybe smell and dreams (!) – can be attractions on a Website.

If you are a professional photographer, you could create a display of your snaps. If you are a music group, you might offer some of your creations for download. Amateur moviemakers can use the Internet as their low-cost global distribution channel.

As broadband connectivity becomes more widely accessible, we might soon see the majority of Websites converting to such interactive and dynamic content models.

The Reviewer

Use your Website to recommend the *best* products and services to your visitors – books, websites, music, movies, artwork, web designers, restaurants, anything. You, the expert, tell them what is good and what isn’t.

Share something that will be of interest and benefit to them. If you read a great book, or surf into a wonderful Website, then tell your visitors about it. Reviews help build credibility and trust for your site.

· Products and services can also be grist for your mill. Just remember to stay within the guidelines – relevant and useful to your reader.

Announcements

· Has your company done something new and innovative?
· Have you developed an improved version of your product?
· Are you privy to insider information in your industry?
· Do you follow the rumors and gossip in your field?
· Do you track swings and developments closely?

If you do, announce them on your Website. People love to feel informed and up with the latest gossip and happenings.

Interviews

An interview with an expert in your field or a famous person makes exciting, valuable content. And it is easy to conduct an interview via email or over the telephone.

Choose an expert or guest you think will be of interest to your readers. Learn more about your expert – special interests, experience, achievements, status in field, etc. This allows you to create pertinent questions.

Decide upon a topic for the interview. Prepare a set of questions you’d like to ask. Then contact your guest with an interview request.

Most people would be happy to participate in your interview. Send a copy of your questions to the guest by email, make a phone call or even arrange a face-to-face meeting. Once you have your copy, make editorial changes so that it reads well. This might mean re-arranging the questions so that there is a smooth flow of thoughts. And by intelligently interspersing additional queries and comments, you can make it appear as if the interview was carried out in person and make it more interesting to read!

Ask additional questions, or for clarification when necessary. Finally, make sure to get your guest’s approval for the final version of the interview. Then go ahead and publish it on your site.

Interactive Content

Why should you interact with readers?

· You can establish closer, more personal relationships with visitors
· You can find out about their preferences, likes and dislikes
· You can listen to their complaints and suggestions
· You can request their feedback on your performance
· You can collect valuable demographic data on your audience

AND…. you can get fresh content to use on your site!

All of this allows you to make improvements, additions and enhance the value and utility of your site to visitors. By employing interactive tools, you can generate content to use later. There are many different ways to do this. Here are a few ideas:

Polls and Surveys

Survey your readers. Ask a question. Request a vote on an issue or topic.
It could be about

· An article on the site – “Did you find this week’s feature helpful?”
· Current events – “Will you vote for the GOP in the next election?”
· A controversial issue – “Do you believe in religion in schools?”
· User preferences – “Would you like to see this site updated daily?”
· Demographic data – “Do you have young children?”

Some guidelines:

· Be brief. Ask no more than 7 or 8 questions

· Offer choices. Frame the questions to have a YES/NO option

· Provide an incentive to reply. A discount, a freebie, a trial membership

· Make the results available to respondents. Your readers will enjoy hearing about what their peers think and feel about these issues.

· Show that you are acting on the feedback received

Feedback

Reader feedback is extremely valuable – if you listen to it with a mind open to change and act on it. Criticism can stimulate you to improve standards. Questions and requests can indicate areas where you must provide content that helps your reader. A good feedback loop between Webmaster and site visitor is very valuable.

Make it obvious that you welcome feedback.

· On every page offer a link to let visitors write back with their comments, opinions and suggestions for improvement.

· Provide an email address to write to or use a feedback form

How do you turn feedback into content?

Use your creativity to come up with new ideas. Here are some suggestions:

· Write a feature article that answers the questions your reader asked

· Print out the questions or comments your reader sent in, and answer them. Take care to request their permission before quoting them. Most often they’ll agree – especially when you promise them a moment in the spotlight by mentioning their name or Website URL on your site!

· Act upon the suggestions readers make; then write about these changes

Discussion Lists

While feedback is a one-to-one communication, a discussion group permits many-to-many interaction, since every email sent to the group is distributed to each member.

Here’s what you can do:

- Create a discussion group using one of the free or pay-services.

- Announce it on your Website and eZine and invite everyone to participate.

Readers could debate controversial articles and news stories, discuss other issues related to your topic and share their views and opinions with other readers.

The material generated in such lively debate could again be used as the seed to grow content for your site.

Forums

An electronic bulletin board is a Website where a visitor can read messages posted by others, and respond by writing another message on the board. This reply is also displayed for others to read, producing a growing list of discussions on related topics.

After a reasonable period of time, the messages under a particular topic can be encapsulated into a feature article or other form of content on your site.

Chat Rooms

Real-time online chat is a fantastic interactive tool – but with unavoidable limitations. Chat events permit the creation of innovative pieces of content like

- Interviews with participants, especially experts and celebrities

- Discussions on featured topics and issues

- Workshops and seminars for your visitors

Transcripts of chat sessions – edited for continuity and flow of the conversation – make for exciting content.

Be Bold – Experiment

Managing a Website can be a challenging proposition. Innovation is the key here. Keep updating your site constantly in terms of design, graphics, color scheme, audio/video clips etc.

And monitor response to each change. Did your readers like it? If they did, keep it. If not, experiment again.

Most sites grow by such trial-and-error methods. The winners are those who identify successful models and develop them, while ruthlessly eliminating any that fail.

Keep the windows of your brain open and look for any new or innovative element around you. Use it to your advantage in your site. Out of box thinking shall make your site stand apart from the rest on the web. This shall enhance you to become a successful and effective Web Developer.

Web Design Articles – Web Designing Trends

With large, intrusive text, multitudes of bright colors creating illusion at times and crammed information, it’s a wonder these sites accomplish anything at all. Today’s web surfers don’t even bother to browse through such sites and they run away from them as fast as they arrived. However there are a quite many attractive and wonderful sites today that have got it right.

Before designing your site understand that websites aren’t about burdening the surfer with information in the form of text, images, and colors. It is obvious that the eye naturally appeals to a more sober looking site. Don’t have an allergy for white or blank space. In fact, try to incorporate it into your designs. Do use bright colors while keeping the backgrounds generally neutral and soothing, and keep the brighter colors reserved for a limited number of attention-grabbing images and headlines.

A recent BBC article reported on new research that shows that the brain makes decisions in just a 20th of a second of viewing a webpage. It further stated that if people believe a website looks good, then this positive quality will spread to other areas, such as the website’s content. It concluded that since people like to be right, they will continue to use the website that made a good first impression, as this further confirms that their initial decision was a smart one and that they were not fools!

Site Layout:

As per the latest trend keep your web sites leaning toward simple 1- and 2- column layouts around a central axis. Simplicity seems is the key here. The arrangement of these sites is very straightforward, and discourages distraction of the eye. This more streamlined approach successfully keeps the visitor focused on the matter at hand, instead of bombarding them with several different messages scattered throughout different areas of the page.

The central orientation is a stray from the left-justified layouts common in recent years, and we’re learning that people don’t mind scrolling below the fold if there’s valuable information to be found there. Thus liquid layouts are slowly becoming obsolete these days.read more

read more web design related articles

Web Design Articles – Separating the Content From Its Presentation

There are many ways for implementing this concept. More than that, since the introduction of technologies such as CGI, ASP, and PHP that allow web developers to generate dynamic web pages, a lot of companies have found creative ways to develop their website applications using this concept as their foundation.

Over the past few years, the internet community has been trying to create a set of standards for creating web sites. A new technology called CSS or Cascading Style Sheets has been introduced. There is nothing actually new in the way CSS handles a web page’s presentation. CSS allows the developer to define a style for each html tag element. This is similar to the method developers (programmers) used in the old days when they attached a variable to each html tag defining its style. The major difference is that CSS style definitions can be interpreted by most of the existing browsers available while in the older method the dynamic web page engine performs the interpretation.

The internet standards organization W3C has encouraged the use of CSS by enhancing its ability to control the web page’s look and feel. New style options have been added to the CSS specifications that have not been added to the HTML description language. There’s no doubt that this was a smart move. It has induced the web developers to use CSS to achieve an attractive web page that also supports the principle of content separation. Unfortunately CSS did not find its way into the internet mainstream easily because of compatibility issues with most web browsers. These days CSS is widely supported by most of the major web browsers, while CSS2, an enhanced version of CSS still has serious compatibility issues.

Obviously, the separation of content from its presentation deals not only with the styling aspects, but also with browser compatibility issues. The styling aspects were the first to be handled by web developers and web designers. As the complexity of information technology (IT) systems become increasingly more difficult to maintain, the internet community is looking for a solution that will become a standard so that content can be easily be managed. One goal for this standard is to define a “language” that IT systems can “talk” with each other and exchange information. Large corporations have historically used many different software platforms in their networks to conduct business. Internet based applications can provide a single platform that can act as an intermediary between all of these different systems and allow communication between them.

XML (Extensible Markup Language) has been adopted as a standard to present the content itself. OFX (Open Financial Exchange) is a close relative of XML that has been widely used by financial institutions who have been using Electronic Data Interchange (EDI) systems to transmit orders and invoices over private networks, intranets and the internet for several years.

The need to present the content in a standard way that separates it from any design elements was so urgent that for the first time in software development history all the three major players (SUN, IBM, and Microsoft) actually agreed with each other and XML become a standard almost overnight and was adopted by many content providers and news agencies.

Yet the concept was not fully implemented. CSS handles the styling aspects while XML handles the document content. What about the webpage layout? New websites are been published each day by thousands. Every day millions of new web pages are being added to the internet’s global database. Webmasters have found that changing the page background color or the font color might not be enough to keep their website fresh and polished to compete with other new websites. However, changing the website layout can sometimes involve a lot of effort because it involves modifying the web page source code. XSL was introduced to solve that issue. Consider XSL a set of rules that can describe a web page layout. Combine it with XML (and optionally with CSS) you will get a valid html file.

XSL is very similar in its mechanics as any other dynamic web page generator. Beside the fact that XSL is platform independent, its biggest advantage is that it can be processed on the client side. The web server sends the client the content using XML format and the layout definition using XSL format. By doing that, the load on the web server’s CPU is reduced allowing it to perform other tasks more quickly. However, XSL was not adopted by all the major web browsers. So unlike XML, XSL has not found its way to the market easily.

Before you run back to your desk and start redesigning your website according to these magnificent standards, you should be aware that those technologies are really not needed most of the time. In fact, using them unnecessarily can cause performance problems. CSS usually will not cause your system to slow down. Just try to keep your CSS file as small as possible. Many web developers maintain large CSS files with lots of unused style definitions. Deciding to work with XML is a serious decision. If your website generates dynamic web pages supported by databases like MySQL, adding additional XML functionality will definitely reduce your website performance. Sometimes you won’t have a choice and will need to upgrade your hardware to maintain your website’s performance. There is no rule of thumb for this issue. The decision should be based on each system and its engineering demands. Try to predict what kind of future services your website will be providing. Plan your website properly at stage one and save yourself lots of effort later.

Web Design Articles – Content Marketing: Challenges in the Free for All Trend on the Net!

We shall discuss here few tips that shall earn you money even if you sell your products online. It shall make your subscription website profitable.

Whether you run an online magazine, a money-making web site, a private community with memberships, or just a web site with unique, in-demand content, you can earn money selling subscriptions to your web site.

1. Marketing wins over Selling:

We’ve all visited those web sites where, every few lines, we’re reminded that we must pay for access to the site. Phrases like “Sign up Today!”, “Only $9.99 per month!”, and “Purchase a subscription!” are thrown around the web page as the webmaster’s hope of making a sale is made devastatingly clear to the visitor.

In doing this, the webmaster changes the perceived mission or focus of the web site from the subject of the content (such as cars or business) to him/her making money. If you want to sell content online, you’re going to need to show that you have a solid grasp on your content’s subject matter, and confidence in your web site. It’s more effective to create good content and present it in a clean, clear web site than to confuse visitors by bombarding them with subscription links. In this way, you’ll be seen as an expert and not someone who’s just trying to make a quick buck. Don’t create an impression that you are just another sales person trying to induce the visitors to buy from you!

2. Niche Marketing:

Niche marketing is the key to success for many businesses over the years, and it is holds good as far as the web is concerned. A niche subject for your web site is one with a relatively small scope. For example, instead of creating a web site that explains “how to make money”, you might create a web site that focuses on the topic of “how to make money with open source software.”

This narrows the scope of your site, increases search engine traffic, and gives you a chance to gain a much bigger percentage of the total market sales. If you write on too vague or too broad a topic, people won’t be confident that you will continue to write about things that interest them. Don’t cast a big net in the hope that you will catch a few fish; but create the netsize that would catch enough number of the desired fish you would like to catch. Make sure that you understand the exact needs of your target market.

3. Worth of your Content:

Every day, we come across such sites that are trying to sell a product — usually ebooks on how to make money fast (or some other extremely broad topic). The site consists of one page filled with reason after reason why the visitor should buy the product, presented in multi-colored fonts with bullet lists galore. Yet we rarely see a single example or excerpt from the product that we are being sold so fiercely. With all of the competition on the Web, it’s just not realistic to expect to reason someone into buying your product.

You must give some of your content away for free. Using any one of today’s subscription content management systems, it’s easy to make some content available to members only, while leaving other content open to the public. This allows your visitors to explore your web site as if they were members, while gently being reminded at certain points of the benefits of membership. If you give away some content for free, your content can sell itself. Its like free smapling of shampoo sachets or might be an exclusive coffee. You might get some customers switching to your brand after they try the free samples!

4. Search Engine Optimization:

An added benefit of the business model described in point #3 is that search engines will love your web site. This is important: if your web site can rank high in the search results for your site’s keywords, you’ll receive loads of highly targeted, free traffic. Google and other major search engines have technology built into their page ranking system that can sniff out “empty” web sites, or web sites that only attempt to sell content, yet provide none themselves.

You can gain a higher rank in the search engine results by making some content freely available, and using a clearly formatted web site. By making some content freely available, you give Google the chance to find your site’s keywords while increasing the likelihood that other web sites will link to you (something Google loves). Also, a clearly formatted web site is quickly understood by search engine spiders, which can “read” your content properly.

There are certain techniques that you can use to increase your search engine rankings, and these form the basis of the area of search engine optimization. However, instead of worrying too much about this stuff, advise you to build your web site using a content management system that uses SEO-friendly defaults. These defaults, combined with your quality content, will result in a web site that’s naturally search engine friendly.

5. Presentation is key.

It is true that a web site’s content will sell subscriptions all by itself, but we can’t ignore the fact that a well-designed, user-friendly web site will sell more subscriptions that an ugly web site with the same content. This fact seems to have been forgotten, especially in the subscription web site market. We don’t say that a web design needs to be flashy or filled with images, but if you expect to sell subscription memberships to your web site, you’re going to need to present a professional image.

A professional web site means: a nice logo, clear navigation, and a simple layout with proper content flow. A good subscription content management system should include a default web site design that offers these features. This means that, to get started, all you have to do is add content, change the logo, and change the colour scheme.

You Can Make Money with Subscription-based Content

Many people felt that the open source movement in software would kill the software industry, but as we’ve seen, the software industry has adapted to the open source movement and created the “software as a service” model. In doing so, the software industry, especially online, is bigger than ever.

Now, in the paid content arena, people are again saying that it’s impossible to sell content in a world where everything is free. Yes, it’s true that some subscription web sites haven’t transitioned well into the era of free content.

However, if you understand your site’s visitors and stay in touch with the free content model as these five tips suggest, you could earn loads of money per month with nothing more than a computer and some passion.

Web Design Articles – Web Designing Tips

Mouseovers first became technically feasible with the release of Netscape Navigator 2.0, which included a new scripting language called JavaScript. The idea was to allow the Web to transcend for the first time the basic functionality of HTML. As standards in this area converge, the use of scripting on the Web is becoming more feasible. The swell in popularity of the script-powered mouseover (as opposed to the comparatively slow and lazy Java implementations that were popular for a brief time) is a testament to the usefulness of JavaScript and its kin.

The Image Object

Frankly speaking, you don’t need to be an expert with JavaScript to understand this article, as everything is explained from the ground up.

In most respects, JavaScript is an object-oriented language, which means that in the world of JavaScript, everything is an object. A browser window is an object (referred to as the window), a Web page is an object (the document) and the images in the Web page are objects in their own right. The nice thing about objects is that they have properties that you can change.

If you are familiar with the basics of HTML, you’ll be used to the concept that you can create an image object on a Web page using the tag:

Now, without knowing it, when you type this, you automatically create a JavaScript image object, which will allow you to change its properties later on if you like. This is exactly what we want to follow to create a mouseover. When the mouse moves over the image we want to change what the image looks like, and what the image looks like is a property of the image object.

To simplify referring to this particular image object later on, we can assign it a name. This is pretty easy to do, and just requires us adding the NAME attribute to our tag.

Now our image object is named “myimage”, and can be referred to as such. At this point, it’s worth pointing out that JavaScript is largely case sensitive. In other words, our image named “myimage” cannot be referred to as “MYIMAGE” or “MyImage”.

You are aware that objects in JavaScript have properties that we can change. We can set a property of our “myimage” object with the following general JavaScript statement:

document.images["myimage"].property = newvalue;

Where property is the name of the property you want to change and new value is the new value you are assigning it. This line can be read:

“In the current document, in the image called “myimage”, set property to newvalue.”

You must be wondering to know how to apply this to the mouseover. Well in a mouseover, we change the image displayed by the image object. Just as in HTML, where we use the SRC attribute of the tag to indicate the URL of the image file we want to display, in JavaScript we set the src property of the image object to the URL of the image file we want it to display.

Using the general JavaScript statement as mentioned above, this is written simply:

document.images["myimage"].src = “newimage.gif”;

How Mouseovers Work

Now that you know how to change an image’s appearance using JavaScript, we need to figure out how to do this when the user places the cursor over the image. Also, we need to know how to switch it back again when the user’s mouse isn’t over the image anymore. The feature of JavaScript that allows us to do this is called event handlers.

Event handlers can be thought of as “triggers” that cause things to happen when a certain condition is met. The two event handlers that interest us when it comes to Mouseovers are onMouseOver and onMouseOut. These allow you to define certain pieces of JavaScript to be run whenever the user’s mouse hovers over or passes out of a given HTML element.

While the HTML 4.01 specification says that we should be able to define onMouseOver and onMouseOut event handlers for any HTML element, Netscape Navigator falls a bit short by only providing this facility for the anchor reference.

 

This creates a link that does nothing (void) when clicked. If you did want it to link to something, you’d just stick your URL in the place of javascript:void(0). To add our event handlers is as simple as inserting them as attributes to the tag:


In the above, overmyimage() and outmyimage() are JavaScript functions that handle changing the image between the “on” and “off” states. A function is a piece of JavaScript that has been set aside to be “triggered” at some later time. In most cases, functions are defined in the header of your HTML file (between the and tags). Our overmyimage() function would look something like this:

We would insert the code that’s to be run whenever this function is called (triggered) at the place we have indicated.

Now, armed with a basic knowledge of the image object, event handlers, and functions, we are now ready to create…

Our First Mouseover

If you’ve been following closely and fully understand the elements we have covered so far, their assembly into a working mouseover should be quite easy. Now just follow the simple steps to achieve this.

First, let’s start by creating our image. It will be 70 pixels wide and 30 pixels high, and the filename for the “inactive” image will be “off.gif”. We do this just as we would normally, using the HTML tag. We’ll also use the NAME attribute to assign it the name “my1stMouseOver”.

Now we’ll add a “link to nowhere” around our image, so that we can hook in onMouseOver and onMouseOut event handlers, set to trigger JavaScript functions that “activate” and “deactivate” the image. Appropriately enough, we will call these functions activate() and deactivate().


Now all that’s left is to write the JavaScript functions, activate() and deactivate(). The activate() function will change the src property of the “my1stMouseOver” to the “active” image file, which we’ll call “on.gif”.

function activate() {
document.images["my1stMouseOver"].src = “on.gif”;
}

Similarly, the deactivate() function will change the src property of the “my1stMouseOver” back to the “inactive” image file, “off.gif”.

function deactivate() {
document.images["my1stMouseOver"].src = “off.gif”;
}

And that’s it! We’ve now created an image that displays “off.gif”, except when the user places the mouse pointer over it, at which time it changes to display “on.gif”. When the user moves the mouse away again, it goes back to displaying “off.gif”.

In the following sections, we’ll take the basic mouseover that we created in the last section and add a couple of bells and whistles that will improve its expandability and performance. Overall, these are good skills to know if you’re going to be making serious use of mouseovers in the pages you design.

Sharing Functions

In our basic mouseover, we used one tag and two JavaScript functions to obtain the effect we were looking for, but on a page with 5 mouseovers, that would mean having to write 10 different functions (not to mention coming up with 10 different names for them!). What if there was a way to use the same two functions for all the mouseovers on your page?

As it turns out, this is surprisingly easy to do. First, we must create JavaScript variables that contain the filename of each mouseover’s “on” and “off” image. If, for example, we had created a page with three tags that we wanted to be mouseovers, and we’d named these images “first”, “second” and “third” using the NAME attribute of the tag, we would create variables with names of the form name_on and name_off, like this:

var first_off = “image1off.gif”;
var first_on = “image1on.gif”;
var second_off = “image2off.gif”;
var second_on = “image2on.gif”;
var third_off = “image3off.gif”;
var third_on = “image3on.gif”;

The next thing we have to do is set up the onMouseOver and onMouseOut event handlers to pass the name of the image to change to our functions. For example, the code for our “second” Mouseover would look like this:


Notice that the argument (the text to be passed to the function) is surrounded by single quotes (‘). This is so that they don’t interfere with the double quotes (“) that surround the event handler.

By passing the name of the image to be changed, to our ‘activate’ and ‘deactivate’ functions, we give them a way to know which image to change when they’re triggered. This is how we manage to share the two functions between as many mouseovers as we want. All that’s left is to modify these functions to receive this image name, and use it to modify the correct image.

The code for our new functions will look like this:

function activate(imgName) {
document.images[imgName].src = eval( imgName + “_on” );
}

function deactivate(imgName) {
document.images[imgName].src = eval( imgName + “_off” );
}

By placing the word imgName between the parentheses that follow the name of the functions, we tell them to accept a value that’s being passed to them (in this case, the name of the image to change), and stick it into a variable called imgName until we finish processing the function. We then make use of this variable in two places. First, we use it to indicate which image object who’s src property we want to change (images[imgName]). Second, we use it to refer to the variable that contains the correct filename. This is done using the eval(…) built-in function.

eval( imgName + “_on” )

All this does is takes the value of the imgName variable, sticks it together with the piece of text “_on” and then evaluates the result as if it were a normal piece of JavaScript code. To make this as clear as possible, let’s go through what would happen if the onMouseOver event handler were triggered on the image named “third”.

When the onMouseOver event handler is triggered, it runs the activate function, and passes it the name of the image — “third”. The function accepts this argument, and places “third” wherever the variable imgName appears.

function activate(“third”) {
document.images["third"].src = eval( “third” + “_on” );
}

The eval(…) built-in function sticks the two strings it has together (as indicated by the ‘+’ operator) and then evaluates it as if it were a normal piece of JavaScript:

document.images["third"].src = third_on;

Now third_on is the name of the variable containing the “on” image filename for the “third” image, so its value is substituted in:

document.images["third"].src = “image3on.gif”;

And that’s it — we’re left with a statement of the same form we used for our basic mouseover, which will change the src property of the “third” image to “image3on.gif”! The key was in naming the variables that contained the filenames so that the eval(…) function could come up with the variable name by just tacking “_on” or “_off” onto the end of the name of the image.

Preloading Images

Most Web browsers these days are pretty smart. When they load something, they put it into a cache on your system where it will remain for a little while for quick and easy access in case it’s needed again. Most browsers aren’t smart enough to load things ahead of time, though. In most cases, this isn’t a big problem, but when it comes to mouseovers it can be trying at times!

When a user places the cursor over one of your mouseovers, the Web browser will realize it needs to display the “on” image. If this is the first time this user accesses your site, chances are that image isn’t in the cache, and must be loaded from your site. This causes a delay that can often be longer that it takes for the user to have moved the mouse back off the mouseover, having never seen that pretty light-up button you’d planned to display. Worse, if the “on” image is only partially loaded, the user may see a horrible, blurry mess in the place of the slick image you’d planned.

How do we overcome this problem? The solution is to preload the images required by the mouseover into the user’s cache so that we can be sure they’re available before we attempt to display them. To do this, we must make creative use of the JavaScript image object.

Up until now, we’ve only created image objects with the standard HTML tag. We can, however, create them using only JavaScript. Such JavaScript-only image objects do not display on the Web page, but they do load and cache and they have the same properties as an image object created with HTML. The strategy, then, is to create JavaScript-only image objects for every one of the image files to be used in your mouseovers. To do this for our example of the three mouseovers used in the previous section, we can replace our variable declarations with the following image declarations:

var first_off = new Image();
first_off.src = “off1.gif”;
var first_on = new Image();
first_on.src = “on1.gif”;

var second_off = new Image();
second_off.src = “off2.gif”;
var second_on = new Image();
second_on.src = “on2.gif”;
var third_off = new Image();
third_off.src = “off3.gif”;
var third_on = new Image();
third_on.src = “on3.gif”;

For each image file, we create a new image object, and then set its src attribute to the appropriate filename. In setting this property, the browser decides it needs to download the image file, at which point it is stored in the cache for quick retrieval when it is actually needed for display. We obey the same naming convention for the image objects as we did for the filename variables in the previous section.

Now all that’s left is to adjust our ‘activate’ and ‘deactivate’ functions once again so that they use the values of the src properties of the JavaScript (only image objects instead of the values of the variables.)

function activate(imgName) {
document.images[imgName].src = eval( imgName + “_on.src” );
}

function deactivate(imgName) {
document.images[imgName].src = eval( imgName + “_off.src” );
}

Finally, we can make one more adjustment to make doubly sure that the user never sees a half-loaded image. Although this preloading technique does load the mouseover images ahead of time, it is still possible for the user to trigger a mouseover before the images have completely loaded. To guard against this, we put a little “valve” in the ‘activate’ and ‘deactivate’ functions:

function activate(imgName) {
if ( eval(imgName + “_on.complete”) ) {
document.images[imgName].src = eval( imgName + “_on.src” );
}
}

function deactivate(imgName) {
if ( eval(imgName + “_off.complete”) ) {
document.images[imgName].src = eval( imgName + “_off.src” );
}
}

This makes use of another property of the JavaScript image object. We already know the src property contains the URL of the image file it represents. Here we use the complete property, which is true if the image has completed loading, and false if it has not. These newly-modified versions of activate and deactivate only change the displayed image if the JavaScript-only image object responsible for preloading the new image is complete.

Advanced Techniques

Finally, this section will show you a simple way to make sure your mouseover pages are compatible with older browsers, as well as a neat trick to prevent preloading mouseover images from slowing down the rest of your page.

Browser Compatibility with Object Detection

Now that you know all about how to make mouseovers that work well, it’s worth taking a moment to learn how to make ones that don’t work just as well. While mouseovers of the type I’ve outlined up until now will work consistently on all recent JavaScript-enabled browsers (Netscape 3+, as well as MSIE 4+), there are some browsers that support JavaScript, but don’t fully support the image object.

One such browser is Microsoft Internet Explorer 3.0. If we were to load a page that contained mouseovers with the code I’ve used up until now on MSIE 3.0, we’d see a lot of ugly JavaScript errors. Since we can’t do Mouseovers on this browser, the least we can do is getting rid of the error messages.

While there are several ways to detect the version of the user’s browser in JavaScript and react accordingly, such techniques can sometimes prove unpredictable in the face of less mainstream Web browsers. Also, whenever either Netscape or Microsoft release a new version of their browser software, any page using such browser detection scripts would need to be updated.

Much more reliable and efficient is a little-known technique called object detection. The idea is that, instead of detecting the version of the browser, we detect the features that the browser supports. As any browser that supports the image object will be capable of mouseovers, we need only detect whether or not the browser knows what image objects are before we do anything that requires support for them. This is done with a simple if statement:

if (document.images) {
… code here …
}

Which can be read:

“If the current document contains images then do the following…”

If we add an if (document.images) to the activate and deactivate functions, and place one around the image declarations, we’ll have mouseovers that quietly disappear on browsers that don’t support the image object.

Delaying Image Loading

Preloading images is all well and good, but what if you have 20 mouseovers on a given page? Do you really want to have the browser busy downloading 20 images before it even gets to start loading the actual content of the page? Obviously not. A nice way around this is to use the on Load event handler of the tag to trigger a function that loads the mouseover images only after the HTML code for the page has been loaded. This way, all the images actually displayed on the page are put ahead of the mouseover images in the download order.

The use of onLoad is fairly straightforward:

All that’s left is to put the preloading of the mouseover images inside the loadImages() function.

if (document.images) {
var first_off = new Image();
var first_on = new Image();

var second_off = new Image();
var second_on = new Image();

var third_off = new Image();
var third_on = new Image();
}

function loadImages() {
if (document.images) {
first_off.src = “off1.gif”;
first_on.src = “on1.gif”;

second_off.src = “off2.gif”;
second_on.src = “on2.gif”;

third_off.src = “off3.gif”;
third_on.src = “on3.gif”;
}
}

The point worth observing here is that we have left the creation of the JavaScript-only image objects outside the loadImages() function. This is done for two reasons. First, the creation of the objects doesn’t load any files: only the setting of the src properties does that, so leaving the object declarations outside the function won’t slow down the loading of the rest of the page. Second, objects or variables that are created inside a function only exist inside that function. If we were to move the creation of the image objects inside the function, they would disappear as soon as the function finished running, and the ‘activate’ and ‘deactivate’ functions would no longer be able to use them.

That’s it! Now our mouseover images will only be loaded when the on Load event handler of the tag is triggered, and this only happens once the HTML code for the whole page has been loaded, and any images on that page have started loading. Whether this is desirable or not is up to you to judge, but it can be a good idea in cases where there are a lot of mouseovers on a page and their being immediately available is not that important.

The Essence:

In this article we have tried to throw enough light on the techniques involved in making Web page elements respond to the movement of the user’s mouse. Not only did we cover the basics in terms that, hopefully, were accessible to anyone with a superficial knowledge of Web design and general programming, but we also covered some more advanced topics that would prove useful to the more experienced Web developer.

Tags

web design articles reply--

Web Design Articles – Why You Should Use Graphic Templates & Hire a Web Designer

When you purchase a graphic template, you will be able to customize it to an extent or even build a totally new design based on it! What”s the point of using the template then, you say? Well, it serves as a source of inspiration and ideas for a totally new design. You can”t derive anything from a blank canvas, right?

On top of that, you are actually saving a lot of precious time that you can otherwise spend on more important matters like developing new products or market your products. When you buy a pre-made template, you only need to edit a thing or two to give it an identity of your own, and that gives you more time and flexibility to work on other stuff.

Okay, let”s say you argue that hiring a designer to do the job is equally fast. That may be true but don”t forget, hiring a professional designer to do a custom design for you will cost you a lot of money. Unless you need a totally unique identity that you are aiming to establish firmly in your niche market, you don”t need to get a designer to design it for you.

Not all graphic templates are suitable, so you have to be careful when choosing one. Consider quality over the price, and you”re on your way to creating a positive image for your business while saving more time for more productive chores!

A lot of online business owners start with no money. They have to do everything themselves – the preparation of a product, the development of a marketing strategy, the actual building of a website to cater to their product”s marketing needs. As their business expands over time, they will find that their simple “homemade” site might not be enough to cover everything, and they will have to take a day or two away to simply dedicate that to the website expansion.

Sounds familiar? Chances are, you”re someone who started everything with no money too, so you”re pretty skeptical when it comes to giving away your money in exchange for something that you could have done yourself. However, there is a lot more to hiring a designer than just finishing up a job that you don”t want to do.

When you hire a web designer to do your job for you, you are doing more than just handing over the “dirty job” to someone else. In fact, by paying a little money, you can let the designer worry about the little annoyances that always evade the main picture and only come haunting when you”re halfway through the job. That way, you will be more focused and have more time to spend on your actual business strategy.

On the other hand, the designers you hire a professionals so they are good at what they do. By outsourcing your web design jobs to them, you won”t have to worry when problems surface because you can always get them to fix it for you. Again, they will be able to pin point the problem and fix it faster than you probably will be able to.

Also, the work you pay for will turn out more professional than what you can achieve because the designers have been doing it longer than you have. After all, they do it for a living so they have to be good!

So, remember to not just work your business, but grow your business too!

see more related articles for web design