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
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.


Nov
11th

HTML Email: Rich Media the Right Way

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

Although Java scripts are known to be an exceptional and proprietary element but still it can cause a major problem for the HTML email. The major reasons for this is that there are a wide variety of email clients, updates, browsers, service packs and security settings thereby making it difficult predicting the behavior of the java script against any given email client. It’s quite surprising that Java scripts are actually capable of disabling any kind of active scripting that would be contained in the email document. Therefore it is always advisable to always test the java script that you would be interested in including in your email.

All the email clients are actually not capable of handling the java scripts. And in fact, most of the web based systems are known to disable the script by default just for preventing any kind of malicious code from getting executed in the system. Although you can make use of Java based navigation forms but that is also possible only with the email clients which are not web based. This is because most of the java script navigation forms do not work with maximum number of web based email clients. It is a very important point to note that almost all the web based email browsers are FORMS themselves and always make use of Java script in some way or the other. Therefore, it is very important that the script is always safe so that it doesn’t really interfere with any of their products.

These days Flash has been greatly used in the emails for actually impressing the clients, news letter subscribers or for that matter the prospects. As a matter of fact email HTML browsers are just no in no way equal to their web browsers. The complexity is further increased because of the settings, versions, preferences, third party applications and the security settings. Always remember to avoid the use of flash as far as possible in your HTML email unless and until you are absolutely sure that the email client that is being used by your recipient client is actually capable of handling the Flash content. Further, you should only think of sending the Flash content only to those clients who have actually requested for it or with whom you have certain marketing relationship.

And in case you have no other option but to send the Flash content via email then there are certain important considerations to be made in order to avoid any kind of problems. Firstly one should never try controlling the Flash content by making use of active scripting. Secondly, it is very important that one should try and consider the option of sending links. It has been most commonly seen that the majority of the web based clients are actually capable of stripping the flash content. Therefore it is always better to attach or a send a link instead of actually including the content in the email itself. This way you can have the option of playing around with a lot of limitations that are imposed b y the browsers and the email clients. And last but not the least always ensure that your files should be controlled by a trigger, an onClick or any other event but should not immediately start playing. The main reason for this is to give the user or the recipient time to open to the flash content whenever ready instead of a surprise and thereby causing unnecessary problems.


Nov
10th

Maximising and Restoring HTML Images

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

While viewing any ecommerce site, it is a very common observance that you can maximise and restore the image within the same page. There is usually small clickable area on the image. Whenever you click on that particular area the image is maximized and on this maximized image there is yet more clickable area on which when you click the image is restored to its normal or original size. There is a special method where in there is no special clickable area but once you click on the image anywhere for that matter, it gets maximized covering all the minutest details even the text of any kind. And once you click again on the image it restores back to its original size.

One way of achieving this would be to buy a program that would do the required task wherein you are not really aware about the program that is being written but are just able to produce the image with effects. Another method that is not known to all and is a special method that uses HTML, CSS and java script called the layered method can also be used for achieving this. For this you just need to be aware about the basics of HTML, CSS and java script.

According to this Layer Method, the image as we all know has an event called the onclick event, which calls the Java Script function. In Java Script there is a special global variable which is used to indicate whether the image is maximized or not. The java script function makes use of this variable for changing the dimensions as well as the layer of the image by changing the CSS properties. Here the term Layering simply indicates that one HTML element is capable of appearing in front of the other HTML element thereby covering the rear image completely or partially. However many of the browsers do not actually support this concept of layering in the format that has been specified by the W3C.

Whenever you place the mouse on the HTML element its title attribute produces a tool tip. The image that is being considered is further given a title attribute which reads Click To Maximize. Therefore whenever the mouse is clicked the image gets to its maximum size and the value of tool tip changes to Click To Restore. When you further click the image the image is restored to its original size and the tool tip value further changing to Click To Maximise again.

It has most commonly been observed that whenever the image is increased in size or dimensions from its original size the resolution or the fineness is usually lost whereas the same is not true while reducing the size. The simple solution to this problem is to make the original size taken from the digital camera or the scanner to be the largest size that can be displayed on the web page. Let this be the size that would be downloaded on to the web page. Now the maximized size should never be greater than the original size which is obtained from the digital camera or the scanner.

Whenever the image is maximised its position is usually changed and it covers all the other elements around it. It may not be a major problem as during the enlargement of the image the main concentration is on the enlarged image rather than anything else. But still there is a solution to this problem. Browsers do not usually handle the CSS position: absolute property as it actually should. The maximised image is in the table cell. Therefore giving the Table Cell the attribute and value valign = top would perfectly solve the problem.