banner
Welcome to HTML.co.uk, the number one resource for all news, information, and happenings regarding HTML.

Updates: HTML.co.uk has just been relaunched. Subscribe to our RSS Feed to stay on top of HTML news and techniques.
Dec
29th

Help Understanding HTML Colour Codes

Author: Editor | Files under HTML Tutorials
Tags for this article: , , , ,

Whenever dealing with web pages, it is always better to edit the HTML directly rather than relying on the programmes such as Adobe GoLive or Microsoft Front Page for the Layout of the web pages. One of the major issues for almost all the web designers is to understand as to what exactly the HTML Colour code means and exactly to use them. To explain it better, HTML colour codes can be described as six character wide colour codes for example #80FF12.

The next obvious question is going to be how can a colour be described by numbers?

The simplest method adopted by the computers is to mix all the specified values of Blue, Green and Red which have been mixed together for achieving the desired colours. As and when you keep on varying the quantities of these basic colours, almost any colour can be created.

Why do the colours and their corresponding numbers relate to the computers?

All display devices such as an LCD television, or Computer Display, make use of the pixels for displaying everything what is viewed on the screen. These pixels have their colour values specified in Red, Blue and Green or RBG value. To understand this better, let us take a simple example. If the resolution of your PC monitor is set to 1024 x 768 resolution, this means that there are 768 lines which are running across your PC screen from top to bottom and each line consists of 1024 little dots or pixels in it. And, surprisingly each pixel or small dot is further made up of light sources or smaller dots, which are red, blue and green.

How are these RGB colour values represented by computers?

RGB values are stored by the computers as three separate values and each one in the rage between 0 – 255. And if you consider 0 also a value then there will be 256 values. And when these values of Red, Blue and Green are combined to get a colour, you have the option of (256 x 256 x 256) 16.7 million colours available for you. These are considered to be true colours by almost all the people as they can represent almost all the images and photographs quite naturally and accurately.

But what is a Hex Value?

Most of the computers store all the information in the form of 0s and 1s. Each of this tiny or single value is referred to as bit. Eight of these bits combine to make a byte. In maths we use the base 10 decimal, when we use 0 and 1, we take it to the base 2 or binary but in computers we take it to the base 16 of hexadecimal. Hex uses 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. For example if we want to represent 128, in Hex, it will be simply represented in 2 digits, 80. Therefore by making use of hex values in HTML and other programming languages, we actually end up saving a lot of space.

How is it related to HTML colour codes?

As a matter of fact, HTML colour codes are made up of three sets of hexadecimal numbers, one for red, one for blue and one for green.

For example, 000000 would represent black where Red, Blue and Green values are all zeros.

Similarly, FFFFFF would represent white where all the three colours have 255 values.

FF0000 will be all red where red has the value 255 and the remaining two blue and green will have value 0

00FF00 will be Blue and so on.

Hopefully this will help you in understanding the colour codes in HTML and how are they saved in the computers.


Dec
25th

How Useful is your 404 Page?

Author: Editor | Files under HTML Tutorials
Tags for this article: , , , ,

Once you have finished with the creation of your web site, the next important thing that should be considered is creating page not found, an error page or as commonly known as 404 page. This page is useful both for you and the reader as it will help you get more out of the website. These important tips will help in creating better 404 pages.

• 404 page should never be redirected to the home page: It is a common irresistible practice followed by almost all the websites to just have a plain error page not found error. Redirecting to the home page groups both with the programs and the scripts that make use of the 404 HTTP code for displaying information, such as link checkers and the search engines. But this can actually confuse your readers to a great extent. For example if you click on a link which should actually direct you to some specific article but due to error it takes you to the home page.

• Do not presume that your writers are aware what they have been looking for: It is quite possible that the reader would have just clicked on some link on the other website and is just not aware about the layout of your website. You can always put a search box on your 404 HTTP error page and also give the option of including other links and information. In fact it would be a real great idea to make this page fairly link heavy. But don’t forget to keep them clearly categorized so that your customers are able to locate what they have been looking for.


• Don’t try to guess why they got the back link:
You can always put in the messages like we just happen to recognise our website on your 404 page. This will immediately make the page outdated. If they get the message that they happen to reach that page just because of mistyping the URL, might seem quite strange.

• Give suggestions on what can be done by the reader so as to find the missing page: This is done quite well by the 404 error page of eBay. The main idea behind this is providing alternative ways for getting to the information which could be either by doing a search or navigating to the web page form the directory or simply by checking the URL for obvious typos. Finally, don’t forget to remind your customers that there could be a possibility of your page simply getting lost.

• Keep your site navigation on the 404 page: The experience of clicking on the link and finally arriving at a white page which has written in huge letters, page not found, is quite disconcerting. Instead if you put the standard site navigation on that 404 error page, it can atleast by the customers for navigation purposes for finding the pages that they want.

• Script your 404 page if possible: The best 404 pages would be the ones which consider all the information that is available and based on that provide to its customers a customized response. The information that can be used includes:
1. The URL that was not found
2. The area of the site the customer would be in or came from
3. The referring page


• Include a report form to report the error:
It is very important that you provide an easy method of reporting bad links to you. The best option would be to include a form on 404 page that would include the URL of the referring page, the URL page that you did not find and any other details you would want to collect. This would help in providing all the necessary information about the bad links.

Try to make good use of your 404 pages, don’t just abuse them.


Dec
4th

Including One HTML File in another using Dreamweaver

Author: Editor | Files under HTML Tutorials
Tags for this article: , , , , ,

One of the most common problems that all the web developers come across is how to include one bit of the HTML code into some other web page without actually rewriting the code every time. Unfortunately that cannot be achieved using straight HTML; you will have to opt for some other technology especially the server technology such as PHP or SSI or JAVA Script. HTML’s editor, Dreamweaver understands this problem and comes to rescue. Any web developer who would have got involved in building a website with more than ten pages would definitely recognize the value in having shared include files which once edited can be used for updating the entire website.

These special include files are most commonly referred to as the library files and are generally stored in the Files tab in the assets of your web site. Before creating a library file it becomes quite essential to first create a Dreamweaver site and then the library item can be made available as an asset to the entire site. In order to create Dreamweaver library Include file first you will have to open the library panel simply by clicking on the window Assets and then getting on to choose the library button. Now you will have to select that particular portion of the HTML that you would want to be converted to the HTML. This could be either a either a block of HTML or simply a section of the page in design view.

This selected HTML block is now to be dragged the library pane and finally dropped it there. Finally a name should be given to the library item which will help you in the future reference. Once your library item has been created it can further be used onto any page on your website by simply dragging the library item onto the new page and then Dreamweaver will do its part of job by displaying the relevant code and displaying it as a library item. The work does not get over just by creating the library item. Its main power is by re-using them as and when required.

The library can easily be placed on any page on the Dreamweaver website where it has been defined in. Once you edit this library item Dreamweaver will automatically update all the pages that are making use of this library item. You can achieve this by first opening the library item that needs to be edited by simply double clicking on that particular library item in the asset pane. Edit the library item whatever you want to and simply click save. Dreamweaver would immediately ask you if all the files that use this particular library item need to be updated; you will have click update and finally close all the log windows. If a lot of files need to be updated, it would take a little till the entire process is over. Always remember, once you have finished updating all the files it is mandatory to upload all the files on to your server. If this is not done then your customers will not have the access to the changed content.


Dec
1st

Things to know before buying a Web Analytics Solution

Author: Editor | Files under General Website Information
Tags for this article: , , ,

If your business is totally dependent on the websites for generating revenues or more business, then it becomes extremely important for you to know exactly how everything is working and what your websites are doing. This means that you not only need to track your website but also measure the total effectiveness of your website. You can make use of either the spreadsheets or the log files for measuring the success of your website. There are software solutions available that integrate perfectly with your servers or some of the log analysis tool that come with the hosting packages.

It is a common thought by almost all the small business owners that the software installed on their local machines is the only solution they have for web analytics. But the fact is that there are tools which are hosted at the outside site and web analytics tool that are placed directly on your web servers. There are both the hosted as well as the server solutions available with each one having their own advantages. The main advantage of the server solutions being that they offer a greater flexibility and the hosted solutions are maintained outside or by someone else. You will need a solution on your web servers or for that matter hard drive if your main intention is to keep all your statistics a secret.

Whenever you select any web analytics tools it is very important that it should incorporate certain standard reports such as referrers, pageviews, visits and unique visits, HTTP errors, robots, entry as well as exit pages, countries, domains, operating systems, web browsers and authenticated users. Besides these standard reports there should also be an option wherein you can create your customised reports for getting the analytics of any specific area.

One of the most common methods adopted by any web analytics package to tack any web pages is to tag each and every page with a unique identifier. This way with the help of these tags the tools will have more accurate information about the pages that are being displayed and requested for. But for ensuring this you would need a tag assigned to each page. Another method of achieving good analytics would be by setting cookies for each customer that visits the site. This would enable the tools to have much better vision and information about the browsers that visit the site which would also include the unique visitors along with the information about the session lengths.

The two most important aspects of web analytics are flexibility and scalability. The more custom reports generated by you, the better for you as you will be able to generate and get more information out of it. In order to get maximum out of your tool, you should be able to find the one that is able to provide maximum support. The next important thing to be considered is the total cost that would be involved. To avoid any kind of problems later always remember to include recurring costs into your decision.