jump Index ScientificPsychic.com
Scientific Psychic

How to code successful web sites

This web page will teach you some of the things that you need to know to make money from a web site. The content and organization of a web site are its most important features. Without good content, people will not want to visit your site, and if users cannot find information easily, they will go elsewhere. By building a web site, you will acquire new skills in web design and perhaps develop a profitable website business.

Visits and page views

Your technical background. With some web tools and blogging platforms, it is possible to develop web sites with very little technical background, but sooner or later, you will run into problems that will require knowledge of the fundamental HTML, CSS, PHP or MySQL components. Hypertext Markup Language (HTML) is the standardized system for tagging text files to define the components of a web page, such as headings, paragraphs and highlighted text. HTML also assigns classes to the components so that they can be displayed in various styles.[1]  Cascading Style Sheets (CSS) describe the look and formatting of the HTML data. The combination of HTML and CSS determines how a web page will be displayed.[2]  PHP is a Hypertext Preprocessor that was designed for development of web pages that can be generated dynamically by combining templates of HTML code with information retrieved from databases such as MySQL. PHP and MySQL are commonly used for content management systems and blogging platforms. The more you know about these technologies, the easier it will be to develop a successful web site.

Choose a simple domain name. Don't choose a name that is too long or that can be misspelled easily. The words in your domain name should be simple, easy to remember and related to the topic of your web site. When you get a domain name, you may want to buy domains of close misspellings to prevent look-alike sites that can steer away your visitors. Google has bought gooogle.com and other misspellings for this reason. The web name that you want may already be taken, but with good imagination, you can come up with another original short and catchy name. Usually, web hosting providers will offer discounts if you acquire the domain names through them and let them host your web site. Otherwise, there will be separate fees for domain name registration and web hosting. The fees for your own web site will be approximately $100 Dollars per year using a low-cost hosting option.

Decide how to manage your web pages. Profitable web sites perform useful functions and they have a large amount of interesting content. Large web sites require good navigation and a good search function. At an early stage you have to decide whether you will code the pages using a Content Management System (CMS) or code the pages individually as HTML or PHP. The most popular content management open-source tools are Joomla, Drupal, and WordPress. WordPress is probably the easiest to install and it is supported by many hosting service providers. These systems require a MySQL database and PHP. If you want to test the web pages on your own PC before publishing them on the web, you will need to install these components and also an Apache web server.

Web Site Navigation
Examples of web site navigation

Top navigation decreases the amount of page content that can be viewed without scrolling vertically. Side navigation is better for screens with a high width-to-height format.

Your web pages should have good original content so that the people who read them will want to bookmark them and create links to them. Your pages should not be huge. Break up big articles into multiple pages of several paragraphs that can be viewed easily with a web browser. When you break up an article into multiple web pages, make sure that a user can navigate back and forth between the pages to read the complete article. Use varied vocabulary to describe the concepts in your pages so that when a page gets indexed, people can find the page in different ways. For example, if you write: "A gun was used in the crime. The six-shot revolver had been recently purchased. The firearm had never been fired". The search engines will index your page with the words "gun", "revolver" and "firearm" and a user will find your web page regardless of which of these three words are in the query. Always do a spelling check of all your text.

Design your web pages for accessibility
Your web site will not have many returning visitors if it is hard to use. The World Wide Web Consortium (W3C) provides guidelines for making web sites accessible to people with a diverse range of hearing, movement, sight, and cognitive ability. Use adequate textual descriptions for the images in the <alt> tag. This enables people using text readers to get the substance of your web page even if they cannot see the image. Make sure that the color schemes in your web pages have adequate contrast and that the text can be read even by color-blind persons. Although browsers can increase and decrease the size of the text, your web pages should still look right when the size of the text is enlarged.

Each web page has to have an appropriate name. This task is done automatically by some content management systems by stringing words from the title with hyphens. Web page names are used by the search engines to determine relevance. A page with the name "how-to-make-noodles.html" is more informative than "recipe29.html". Most search engines are able to split out a conjoined name like "youtube" into its component words, but it is better to separate each word with hyphens in the web page name since this is a widely used practice.

The pages need to have a good HTML title and description metatag. Metatags for keywords are not as important as they used to be because search engines now rely more on the web page content, but they can help a search engine to categorize your page. The contents of the title and description are used by search engines to present search results, so choose the words in these tags with great care. Here are examples of these three tags:

<title>How can you make noodles? Noodle and Pasta Recipes</title>
<meta name="description" content="Noodles are made from flour and water and there are many methods for shaping noodles. Noodle recipes."/>
<meta name="keywords" content="noodles, spaghetti, pasta"/>

Use social media to promote your pages by linking to them from external sources such as discussion boards, Facebook, Twitter and Tumblr accounts. Search engines determine the importance of each of your web pages relative to the pages in other web sites by the number of web sites that link to your page. The popularity of your web pages can increase when you promote them through Facebook and other accounts. You can also purchase advertising from Google AdWords to promote pages for particular search terms.

Translate your web pages. If you have good language skills, you can translate your web pages to a foreign language to reach a more international market. Although the major part of the World Wide Web is in English, there are many people looking for information in Spanish, Chinese, and other languages. Translation tools from Google do a fair job of conveying the information, but the translations do not produce the idiomatic expressions that a native speaker would use.

If you have web pages translated to multiple languages, each page in the set must use rel="alternate" hreflang="x" to identify all language versions including itself. This is accomplished by coding links in the <head> section of the web page as illustrated here.[6]

<link href="noodles.html" rel="alternate" hreflang="en" />
<link href="fideos.html" rel="alternate" hreflang="es" />

Submit your pages to the search engines. Make sure that the search engines (Google, Yahoo, Bing) know about your web pages. These are some of the URLs where you can submit web pages:

Google: http://www.google.com/addurl/
Yahoo: http://siteexplorer.search.yahoo.com/submit/
Bing (MSN): http://www.bing.com/docs/submit.aspx
When search engines crawl your web site looking for new web pages, they look for a file in the home directory called "sitemap.xml".[5] You should make sure that all the pages of your site are listed in the file, and that the file is kept updated as you add pages. Google has a special section to help web masters optimize their sites.

Web pages coded with HTML work best for Search Engine Optimization (SEO). Avoid Flash web pages because they cannot be indexed by the search engines. Avoid image-based web pages that rely on the "alt" attribute for their text content because many of these are ignored by the search engines. However, images can send readers to your web pages if the images are properly tagged with a short and relevant "alt=" description. Pages that have HTML errors are generally ignored by the search engines. Always verify the HTML markup of your web pages using http://validator.w3.org/.

Test with several browsers. Microsoft's Internet Explorer was the dominant web browser for many years, but now other browsers like Google Chrome, FireFox, Safari and Opera have gained substantial user share. Your web pages should be viewable by all browsers in order to achieve their maximum potential. Adding a statistics counter to each of your web pages, such as Google Analytics or SiteMeter, will provide information about the browsers and the computers that access your web site. You will find the percentage of users that have small monitor sizes because they access your web site from a cell phone or a tablet. You will also find out which pages are most popular and the percentage of users that have JavaScript turned off. This information will help you to structure your web pages to work well with the widest audience. Bar graphs can help you to track the number of visitors and the number of page views for your web site.

Mobile web site
Horoscope for
Mobile Device
QR code for mobile horoscope
QR Code

Make your website accessible for mobile devices.
A lot of web traffic is now handled through smart phones and tablets. Tablets may be able to view complicated web sites easily, but telephones are constrained to small screens. A good web site will make allowance for a variety of devices. A snippet of JavaScript in a web page makes it possible to redirect a user to a mobile-enabled web page. This is necessary only if the screen width of the device is less than 500 pixels or the user agent is "mobile".

<script type="text/javascript">
  if ((screen.width < 500) || 
      (navigator.userAgent.match(/Mobile/i) !== null) ) {
      // Go to mobile page or 
      // display a button that allows going to mobile page

Mobile pages generally have a specific design and use different resources from the main site. For this reason, mobile pages are usually stored in a subdomain of the main site, e.g., mobile.mainsite.com. However, responsive web design with HTML5 and CSS3 avoids duplicating site content by overriding the CSS style depending on the media characteristics, such as device width:

<link rel="stylesheet" type="text/css" media="(max-device-width: 500px)"

A mobile web page needs to display action items clearly to enable the user to navigate the web site easily. Sufficient space has to be used between buttons and links so that fat fingers will not click the wrong entry by mistake. Due to the large number of people who use smart phones to access the web, in 2015, Google page ranking started taking into consideration whether a web site was mobile friendly. Google provides an online Mobile-Friendly Test to aid web developers.

If your page requires input data, choose the simplest method for each task. Mobile devices can scan QR codes to load the corresponding web page. QR codes for any URL can be obtained through http://goo.gl/.

Add a blog to your website. Blogging software such as WordPress can be used to discuss short subjects and provide feedback to the website visitors. A blog works best when its navigation is integrated with the website so that it looks like it is part of the website. A plugin for WordPress called bbPress can be integrated with the blog software to provide bulletin boards and forums for active discussions on various themes. CAUTION: Blogs or bulletin boards that allow visitor interaction are often abused with spam links or graffiti. Always moderate postings before they are posted publicly in order to maintain cordial interaction and content of high quality.

Monetize your web pages. When you put Google ads in your web pages, Google makes money when someone clicks on an ad. Google shares some of the revenue by paying the web site owner for each legitimate click. It is in Google's interest to show pages that have their ads. However, since most web sites have Google ads, Google basically makes money no matter what page they show, so they show only the best web pages. To find out about the Google advertising program, just do a search on "Google Adsense". People get banned for clicking on their own ads, so never do it. In addition to Google, your web site can integrate advertisements from Amazon.com that pay commissions based on sales. You have to register with the advertisers and provide the information needed for tax purposes in order to participate in any revenue-producing programs.

Google allows only three ads per web page. Breaking large articles into multiple pages allows you to have more ads for the same content. Make sure that each page is still worth reading and not just a pile of advertisements. Design your pages to allow standard ad sizes. The most common sizes in pixels are 160x600 wide skyscraper, 300x250 medium rectangle, 468x60 full banner, and 728x90 leaderboard. The following image illustrates the typical placements of some of these advertisements.

Web page advertisements
Typical location of web page advertisements.

Protect your intellectual property.
The copyright laws help you to protect the content of your web site. Make sure to include a copyright notice on each web page. Do not copy text or images from other web sites without written permission. If another site has copied your textual or graphical content, you will need to notify them of the copyright infringement and request the removal of the unauthorized material. If you don't receive a response, you may need to escalate by notifying the web service that hosts the infringing content. In addition to copyrights, you may also apply for trademarks for your products. A trademark is a recognizable design or expression which identifies your specific products or services. Thus, images of McDonald's yellow arches or names like Lord and Taylor can only be used by authorized merchants.

Watch out for fake business deals. Once you have your web site running, you will probably be contacted by people offering you ways to increase your revenue. You may be offered some money to put a snippet of code in your web pages for a specific product. Before you do so, find out more about the company and how the number of clicks and sales will be counted and reported. WARNING: Adding any extraneous code to your web site could compromise its security. The code may be a backdoor disguised as an advertisement that could expose all your confidential data or turn your website into a spambot.

Some web site owners have reported that after running advertisements in web pages that have thousands of page views they received no payments because supposedly there were no sales. A web site owner is dependent on the honesty of the company or person who reports the sales. Large companies like Google or Amazon have reliable reporting mechanisms, but there are many companies that will take the profits and disappear without paying the web site owners what they promised. Read more about Fake Business Deals for web site owners.

Maintain and monitor your web site.
It is important to back up all the content of your web site and to keep software packages up to date to prevent hackers from using your web site as a platform for sending spam or other activities that may damage the reputation of your web site. Packages like phpMyAdmin, which handles the administration of MySQL databases through a web browser, or WordPress, which is a popular blogging and Content Management System (CMS) tool, are very convenient, but they may have vulnerabilities that allow hackers to gain control of your web site. These packages are constantly being updated to fix security flaws, but it is your responsibility to keep the software updated.

Check your web site for broken links at least once a year. This is especially important for external links that may have changed location or may no longer be available on the web. Your web site can also be improved by coding a 404 error handler. A 404 error occurs when the page name typed by a user cannot be found, such as "nodles.html" instead of "noodles.html". The 404 error handler should display a page that allows the user to navigate the site and search for the relevant information.

How do you know that your web site has a problem? Your first hint that there is something wrong is when the traffic to your web site suddenly drops or your e-mail input folder starts getting a lot of messages that bounced because they could not be delivered. When you check your sent mail folder, you find no evidence that the messages were sent from your e-mail address. This is an indication that your e-mail address has not been hacked, but that 1) someone is sending spam from another site using your e-mail address as the return address or 2) your web site has been compromised and hackers are sending e-mails using a PHP mail function or something similar. If you look through your web site's logs, you may find evidence of exceeded e-mail quotas. When you suspect a problem, you have to change the passwords to all your web site accounts and databases. Rename and delete all the directories with old software packages, and re-install the latest versions of the packages. You may also need to rebuild your web site from your backup files.

These are some links to get you started on the basics for writing web pages:
  1. HTML tutorial
  2. CSS tutorial
  3. PHP tutorial
  4. SQL tutorial
  5. Sitemaps XML format
  6. Help Google serve the correct language or regional URL

© Copyright  - Antonio Zamora