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.
Jul
22nd

Why does the invalid HTML work?

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

The reason why people do not validate the HTML is that whenever they test, the page will seem to display without any problem. Why that is the web browsers, will be able to display the HTML, which is technically incorrect? Does this mean that we need not worry about the HTML or the invalid HTML (or PHP or JavaScript or CSS)?

For this the answer is:

When the web browsers were invented, most of the programmers recognized that there was much possibility that there would be thousands of people writing the HTML and creating the web pages as well. When so many people are trying to use the markup language or programming language like that of HTML, then it could be more frustrating quickly if each tiny results are shown in the page. So then, the programmers of the web browser decided that the browsers should be more forgiving.

All these means is that if the web browser views the WebPages, then it has the rule of HTML and it attempts to interrupt them in order to display your own WebPages. However, when it comes across something or the other, which is unexpected, from the older specification or incorrect, then the browser will ignore and tries to guess what the designer will want.

This will mean that a lazy or a novice designer will be able to get away with the incorrect code and have the pages that will display in browser window eve without a single problem. Some of the errors that occur are minor and the errors will be like that of leaving off alt attribute in the image tag. This is invalid technically but in anyway the browser will display the image. Some of the errors that occur are bigger kike that of leaving the closing the table tag off. In the old version of the Netscape, this problem could cause a table and each and everything would be after it in the HTML in order to simply disappear. IE did not mind the missing of the table tag and it would also display the page. Most of the designers who all did this would not test in the Netscape and would not know what the problem is for about long periods.

Why do you want to bother with the valid HTML?
While almost all the browsers will try to attempt the HTML even if the errors are there, so there are few good reasons in order to validate the HTML.

The HTML might display and it might display entirely different than if it was written correctly.
The errors that occur will compound each other.
Most of the browsers are really forgiving.
The invalid HTML especially if it is been deprecated then it might be supported by the browsers

Therefore, it will be good if you test your WebPages in the Web browser but by validating the HTML and CSS will surely help you to make that stand the test of new browsers and time as well.


Apr
3rd

What is the HTML download tag?

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

Whenever you create a link in a particular Webpage, it’s obvious that most of the Web browsers will automatically attempt to open that particular link in the browser window. At present, with the use of various plug-ins and many other features, browsers will be able to open more files the files that they were forced to download. In times, this is the one we want mostly as after all we are building WebPages. You’ll also post your files sometimes to your Website where you want the browsers to download in to their hard-drive rather than just viewing in the Website’s browser window.

If you want the browsers to download the content from your Website, an HTML download tag would be the perfect solution. But unfortunately there is no such tag as an HTML download tag. If you want to set up some file download files in your Website, you just link the file in same way as you would link a particular file in order to open in that browser window. Without a HTML download tag, you can initiate your download, as there are some ways to do it.

Do tell your Website readers regarding their Browser functionality

The browsers that are coming today are very modern in nature that has context menu. If you right click the mouse button this context menu will appear (or options plus mouse button for a one button Macs). Whenever you right click on a particular link, one of the options that appear on the context menu is “save link as…” or “save as…” if you choose this, that file which is on the other side of that link will be downloaded to a hard drive even though it could be opened in that browser.

To emulate HTML download tag, the simplest way or method is by telling the people to just right click on any of the particular link that is to be downloaded and you can write some thing like this as mentioned below

(Option-click or right-clicks on that particular link and then choose to do “save as…” in order to download that link to the hard disk directly)

In Order to download, compress the file

If you want to automatically download the file, then compress your file using your using your operating system and the compression is done by just zipping the file. The files that are zipped will automatically download.

With PHP trick the browser

At last, if you have the knowledge of some PHP, you can just use 5 simple line of PHP script, so that you cab force the Web Browser in order to download the particular file even without zipping the file or else you can ask the readers to do whatever they want. This type of method relies only on HTTP headers in order to tell the browser that this file is just an ordinary attachment rather than it is a Web document. (This PHP will just allow you to change HTTP headers).


Apr
1st

Ever wonder how much programming a Web Designer does?

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

If you want to decide what kind of Web developer you would like to be, this question is very tricky. There are several options where you can choose from.

Design:
It includes “Layouts” and “CSS” as well as “Graphic Designing”

Programming:
Writing “Flash Applications” or “Ajax Web2.0 Applications or “CGIs”

Content:
In this there will be creation of images and also writing the text that will be displayed on Websites.

Databases:
“Database Administration”, “Working with XML” and “Connecting Sites to Database”.

Information Architecture:
“Setting up of informatics behind Websites” and also “making the Websites easier to navigate and use”.

Metrics:
In this it is only to watch the page views and to track in order to validate the efficiency of “Web design work”.
There are many more options where you can choose from

If you want to be a Web Programmer, some of the languages like Perl. C++, JSP, ASP, Java or PHP will be heavily featured in your works daily. But, usually content writers and Web designers do not use these languages at all. C++ is one language you may use to write scripts and CGIs in order to make your WebPages more interactive and to have dynamic look.

In the field of Web, there are several other jobs that will not require any kind of programming and these jobs will be having the titles like program manager, designer, content co-ordinator, information architect and several other titles. Here you can choose either programming or non-programming route. Here you will be working with designers who will know programming and also with designers who will not know programming.

Money and job prospects in this Web Programming

It may or may not be true that only Web programmers are the ones who could make more money than Web designers and other than these both DBA would make more money. If you do Web programming only for the sake of money, you will not be able to do it and if you do it also, you will not be good at it. Here you will not be making money like the people who really loves doing Web programming and also the person who is really good at Web programming. This is also true with Web designing and with DBA as well. Before taking up any job, you have to be interested first.

When you take up a particular job, you have to even work on all the segments like content, code and design where you have to do some part of the equation as well. If you work with designers who do not know code writing, they will come up with the design the way that you might work and also the designs that they want to look. Then you might work on building some of the codes (JSP or CGI or other languages) that will be used to make the design work.

You have to focus on some parts of the job and have to enjoy working and you will get better.


Mar
23rd

Steps for including one HTML File in another File

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

If you have surfed Web for the whole day, in the Websites you will notice that almost all the Websites have themes for their site’s design and this design will be repeated across all the pages of that particular Website. On any of the Web design Website, there are lots of elements that will be repeated in many ways including left navigation and the header portion of that particular page.

When you write an article everyday, you don’t need to write HTML to add some of the standard elements. All you want to do is to write articles. The templates that are needed will be built by “content management tool and if you do not have the access to this tool, there are several ways to manage your Website without editing each and every page by hand.

What are includes?

In HTML, an include section is not just an HTML document itself but it is just a portion of another page and using programming these can be included in your complete Web pages.0020unofrtunately this is supported by HTML. So, you will require some type of scripts or programs to add your include files in to your pages. Most of the include files are the things that are repeated on several pages of a particular Website without changing the things like navigation, contact notices and copyright information.

“Server Side Includes”

SSI was the first one to be developed that allows the Web developers to include all the HTML documents in to another page. If at all your Web server supports SSI, you can easily create templates for your Websites.

Firstly, you have to save HTML for all the common elements of your Website as a separate file. For example: you can save your navigation files as navigation.ssi or as navigation.html.
Secondly you have to use SSI tag to add that HTML in each page of your Website. The SSI tag is “#include virtual” = “Path to File/include-file.html”.
Thirdly, you can use the same tag in all the pages which you want to include.

“PHP”
PHP is another level of server programming language. This language will let you to include all of your HTML documents in another page. This language is much like SSI. This PHP is also a Server level language like that of SSI. In order to add pages using PHP you have to follow these steps

Firstly, you have to save all your files separately in another document. For example: your navigation files can be saved as navigation.php or navigation.html.
Secondly, use this PHP code to include the page. The code is
<? Php
require ($DOCUMENT_ROOT. “Path to file/include-file.html”) ;?>
Thirdly, use the same code with each page to add your file.

“ASP”
ASP or “Active Server Pages” is just another way to add your files in another page. The method is same as PHP but the code is different. The code is
“#include file=”path to file/include-file.html”

JavaScript
This is also another way to add your files into another file. But this does not require server level programming. This is little bit complicated compared to other server level includes.

Firstly, you have to save HTML common elements in JavaScript style. In this file, any HTML written should be printed with the “document, write”.
Secondly you have to use the code “<script type=”text/JavaScript” src=”path to file/include-file.js”> < /script>”
Thirdly you can use the same code for including files in all the pages.


Feb
13th

Evaluating and deciding on a Web Editor

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

It can be hard or an easy decision to chose a Web Editor. There are a lot of products available in the market today. Web Editors should not be chosed on the basis of price and what the others are using. It’s pretty important to choose a Web Editor which satisfies your needs and budget. There are little useful tips in buying Web Editor which makes a great one.

Operating system and price

These are the facts which have to be kept in mind- if an Editor won’t work for your OS (operating system) or it is not affordable, then don’t download or buy it. Than the price there are a lot of other features to a good Web Page Editor or whether the Editor it runs Mac OS or other OS.

What type of a Web Editor is it?

There are 3 types of Editors available, they are:

Text Editors: these Editors let you to edit HTML tags directly and not in a visual way.
WYSIWYG Editors: these Editors let you to edit WebPages in visual manner and not the HTML directly
Combo Editors: these editors let you to edit either text or WYSIWYG depending upon your style or mood.

An Editor that offers you both will be more useful and gets more points than the one that is only text or WYSIWYG. What ever type of Editor you use it has come with HTML validator attached to it so that you can gain more points. Having an HTML validator saves you a lot of time in the long run. Text Editors should come with tag completion and colour coding.

Managing web pages:

Many Web Editors which are more powerful comes attached with Site Managers (projects). This site manager helps you to keep the files of one Website at a particular place. By doing so the Web Editor manipulates the files as sites rather than a single file. Here Web Editors manipulate the single files through FTP. Using replace and search, Web Editors help you to manage the files.

Images

Some of the Webpage Editors provides you with limited image editing in its tool like resizing and cropping. If these Web Editors can connect to other (outside) image editors, it makes more convenient to use.

Special characters, CSS and Java script

In most of the Editors these days you can write CSS styles, if the Editor is embedded with style library, CSS validator and CSS editor. With Web Editor it is easy to write CSS WebPages. This is the same case with Java script.
Web designers mostly forget about special characters. If the text is written in English, it’s easy to assume that, for an accented character you will not require to know the codes for that.

Conveniences of Web Editors

The ability of the Web Editors to connect with data base
Support for the languages like ASP, JSP, cold fusion and PHP.
Spell checkers ignoring tags will be critical.
Some of the Editors provide you with photo gallery maker


Jan
23rd

The Uses of Pre-Processed HTML

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

When was the last time that you wished that a copyright notice could be added in all your web pages at once? Or perhaps if you want to ensure that all your web pages contain the same header and footer on them. You also have the option of using the databases for creating the dynamic content as well as the standard content across your web pages. But the biggest drawback of using almost all o these systems is that they are quite expensive.

There is an option of using the HTML pre-processor, which is an application that runs majorly on your servers and has the ability to filter the HTML before sending it to the browser. They can be used in a variety of ways, but they become invaluable for all the web developers as they can create dynamic pages using common elements. It is a common practice to run the pre-processors only after the data files have been created. Your web pages can be easily updated by running the pre-processor for converting the data files into HTML. Some pre-processors such as the hypertext database work in this fashion while the others such as Cold Fusion work on the fly as the web pages are accessed.

But there are many pre-processors available in the market, which are not only freeware but also quite easy to use and set up.

• PHP: Hypertext Processor: It is also known as the open source HTML pre-processor. However, its role is just not restricted to a pre-processor, it acts much more than that. It also functions as an HTML scripting tool and helps in including logic in HTML as well as the other programming functions. This hypertext processor runs on the web server. It comes in the Windows binary distribution and also the source code for compiling on other platforms. It is an Open source freeware.
• GTML: GTML enables you to group all your web pages into Projects or replace capabilities and instant search across the whole project. Macros of different sections which are to be reused, of your site can be created. GTML simply builds the HTML for you by just putting in one word representation of the entire code. GTML is basically a Perl script and runs on any platform that would support Perl. Open Source freeware.
• Htmlppl – The HTML Pre-processor: This html pre-processor also has quite a few of the similar features as mentioned in the other pre-processors. But one of the most amazing facts here is that the Perl code can be embedded and the output can be included on your HTML pages. This pre-processor can also be used for querying flat file databases as well. GNU Open Source freeware.
• HPP: This is quite an interesting looking Perl script which is still under development, which helps in processing directives sent to it through GET requests within the web pages. For example, if you would be writing your PHP enabled web page and then accessing it on the command line of your browser. This ultimately helps you in giving a lot of freedom for including the results of the Perl Scripts dynamically in your web pages. Alpha level open source freeware.


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.