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.
Jan
8th

CSS: The Low Down on Cascading Style Sheets

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

It has been around ten years since cascading style sheets or most commonly known as CSS have been around, considering from the beginning during its development in the year 1997. But, surprisingly it has been into public consciousness relatively for a short time now. The main reason for this is that until 2000, its features were not supported and recognized by most of the web browsers. Gradually down the line there have major improvements where almost all the web browsers support atleast the minimum level 1 of all the web browsers and a few support level 2 and some have even gone way beyond and support level 3 as well.

As a matter of fact, you cannot find even a single site which would not be utilizing CSS in some for or the other in their development and design. In fact, all the web sites that are completely developed using HTML are becoming extinct or following the footsteps of dinosaur. There are no two thoughts to the fact that both HTML and CSS are important aspects of web design and will continue to do so for years to come. CSS has been successful in bringing in a widespread impact upon W3C.

Originally CSS was developed just with the intent of providing the web developers a means for defining both the feel and the look of the web pages. Using this, web developers were able to treat both the design and the content of the web page as two different entities. As a result of this HTML was able to perfume its functions more in accord with its actual intended purpose which is to focus only on the markup of the content of any particular website.

The style sheet in CSS or cascading style sheet here refers to the document itself. This concept is nothing new for the web developers, infact the documents have been used by the web developers for many years now. To be more specific, style sheet can be defined as those specifications which are used for governing the layout of the particular website, whether it is on print or online. The cascading style sheets are not only capable of determining the technical specifications of any particular document on the web but also provides with an added functionality of communicating with the viewing vehicle, here the web browser. The most important thing to be remembered here is the keyword Cascade. The cascading style sheet, by virtue of their nature, is capable of flowing or cascading through any number of separate style sheets or documents.

In the areas of XML and XHTML markup, cascading style sheets go way beyond the font specifications. This clearly indicates that Cascading style sheets can be used for defining the look of any XML and XHTML markup language that is being used by you in your website. Cascading style sheets can be considered to be one of the most powerful tools that can be used by the web designers which can undoubtedly impact the entire feel and look of the website. It is crucial to have a thorough knowledge of CSS if you are planning to be a web designer.


Nov
26th

Converting Websites to XHTML and CSS

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

Many of the web designers and developers have been involved in creating web pages for years now and the best part is that one person alone is capable of creating a number of websites with any number of pages. The thought only of attempting to convert all of them is so overwhelming. But if your basic method of creating these websites has been either editors or hand coding then you would probably be having web pages that are not valid XHTML and at the same time make use of old HTML styles such as font tag etc. instead of the cascading style sheets.

The latest iteration of web designing is XHTML + CSS. The main advantage here is that, it allows the web designer to place his content in a document which is absolutely separate from the appearance or how the content should actually look. XHTML is easy to learn especially for those who are quite familiar with the HTML and at the same time is quite compatible and flexible with the databases, dynamic content and also to any kind of future developments in that field. CSS gives a lot of flexibility to the web designers in designing the look of the pages. Therefore, XHTML and CSS joined hands and collectively became XHTML+CSS.

The biggest issue that comes is here is the amount of work and effort that would be involved in converting those already existing websites to the XHTML+CSS format. But the fact is that it is really not that hard the way it appears and also the results obtained would be highly beneficial for the highly pro-active and forward thinking developers.

The advantages of using XHTML+CSS over the old HTML style are many; the most important would be maintenance. The sites are easy to maintain when designed using HTML+CSS as there are less number of tags that would be messing up with the display of the code. And also when the same design is passed on to the next designer, it would easier and simpler for him to understand the entire code. Also the web pages designed using HTML+CSS are faster and do not waste much time in downloading as these files are less bloated than the ones designed using their old counter parts.

There is less number of tables that are involved here because most of the design decisions are passed on to the CSS now, therefore less complexities. It is not only difficult to understand but also edit someone else’s designed tables, which in the case of XHTML+CSS is being handled by CSS. This concept is fairly new and the designers who have already got involved in using XHTML+CSS while designing their web pages are closer to the cutting edge as compared to the ones who don’t.

Instead of upgrading your editors you can just clean up your HTML by using making use of certain tools such as HTML Tidy. This tool will clean up your code entirely and the final result would be valid XHTML. And finally you just need to design the Cascading Style Sheet and attach to the XHTML produced earlier. All this can be achieved in just a matter of minutes.


Oct
14th

Cross Browser Compatibility

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

Cross browser compatibility can be well stated as compatibility of any given website with all the major browsers available such as Internet Explorer, Netscape, Firefox, Safari, Opera and JAWS. It is a very common feature that your ideal version of the site is not able to create a pixel perfect replication in all the browsers. A website designer always writes the code considering any particular web browser, most commonly internet explorer; as a result a website may be working fine with one browser but not supporting the other browsers the same way. Therefore it is very important that each website owner should always test for the cross browser compatibility of their respective websites.

Although you may be having your own preference for a browser but the visitors for your website may not be using the same web browser as you. This is where the cross browser compatibility makes all the difference. Cross browser compatibility mainly deals with the functionality of the website and not with how it would look like. Infact, it has very little to do with browsers as well and can be well stated as multi user agent compatibility. When we refer to the term compatibility here, we do not mean looks and behaves identically; instead here it typically means that it performs equivalently under alternative conditions.

Functionality is simply the absolute key to cross browser compatibility. A lack of cross browser compatibility does not mean that the site looks different on all the different types of browsers but it simply means that the site doesn’t work on all the other browsers except for one, for which it has been designed. It is entirely possible though occasionally, to make two browsers renders a same design, but only on a condition that you make certain factors such as the user settings constant. Everything would just go out of the window if you try to tamper with those settings. It is always desirable to make the designs of your website as similar as possible between various browsers, but at the same time it is quite important to understand that there are always certain limitations to it.

It is very important to take certain factors into consideration which designing any website which would aid in cross browser compatibility. Firstly, it is very important to use only standard compliant coding. The HTML tags and features used while coding should not be browser specific. As these would only work in those browsers that they have been created for and can even lead to breakage of the web page when viewed in any other browser. Always remember to validate all your web pages which include the HTML or XHTML coding and cascading style sheets using the free validation service from W3C.

There is nothing much that can be done to keep a similar view across all the different browsers, instead you should try and guarantee something which is achievable, i.e. an equivalent view for all. Equivalent here means that the users should be able to get the similar information and also use the website to perform similar functions. Our main goal with cross browser compatibility is to make the website viewable in all major browsers and at the same time have the pages rendered correctly. Always remember that a website that doesn’t work in any choice o browser will surely drive the visitors away.


Jul
16th

Classification of HTML

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

HTML can be classified into two categories namely SGML based HTML (traditional) pitted against XML based HTML (also called XHTML) and the second one being a strict versus transitional versus frameset. In this article, the former has been described in detail.

One notable difference between the traditional version and XHTML is the technical distinction between the two of them. However, Inspite of all the modifications being done, the root element name “HTML” has been kept the same. The area which requires loads of effort is the one where the limitations of XML start showing in comparison to the more complex SGML inspite of the W3C intended HTML 4.01 being identical to XHTML 1.0. Due to the similarity quotient between HTML and XHTML, they are documented in parallel at many times.

The difference between an XHTML 1.0 document and an HTML 4.01 document is mostly syntactic in each of the corresponding DTDs except for the different opening declarations applicable for the document. There are many shortcuts which XHTML does not allow but HTML allows because of the underlying syntax. Be it elements with optional opening or closing tags, empty elements not having an end tag, all these are examples of the shortcuts that a user can take advantage of in HTML. HTML requires all elements to have an opening tag or a closing tag.

After contemplating on the whole process, the developers of XHTML have also come out with a shortcut. The opening and closing of an HTML tag has to be done within the same tag but a slash (/) can be added before the closing of the tag. For demonstration of the concept, let us take this example: <avi/>, where “<” is the opening tag and “>” the closing tag, “avi” is a fictitious HTML tag and as mentioned above, the slash (/) comes before the tag is closed.

To properly understand the minute differences between HTML and XHTML, the tips listed below need to be kept in mind:

. XHTML makes use of XML’s built in language defining functionality attribute. The language for an element should be specified with a lang attribute rather than the XHTML attribute.
. The XML namespace has to be removed as HTML does not have a provision for namespaces.
. The document type declaration has to be changed from XHTML 1.0 to HTML 4.01.
. The empty-element syntax of an XML has to be developed into a style empty element of an HTML.

A technically well constructed XHTML document will always follow all the syntax requirements of XML. The structure of a document is thoroughly described by the content of XHTML and legitimate documents will religiously follow its specified data.

To migrate easily between HTML and XHTML, several conventions have been recommended by the W3C and by meticulously following these guidelines, a user will be able to easily interpret the document as HTML or XHTML. The XHTML 1.0 documents that have been made compatible in this way are permitted by the W3C to be served either as HTML or as XHTML.