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.
Feb
11th

A Single Version of HTML is not enough

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

HTML History

HTML’s first version didn’t have the version number. HTML was just called as HTML. Back in 1989 to1995 HTML was used to put up some of the simple WebPages. HTML was standardized in the year 1995 by Internet Engineering Task Force (IETF) and numbered it as “HTML 2.0”.

W3C (World Wide Web consortium) presented the next version called “HTML 3.2” in 1997, in 1998 “HTML 4.0” and in 1999 “HTML 4.01” was released. Later on W3C made an announcement that, it would not be developing new versions of HTML and it would focus on extensible XHTML or HTML. W3C recommended web designers to use HTML 4.01 for their (web designers) HTML documents.

At this point of time, development of HTML split off. W3C drew its attention on XHTML 1.0 and from 2000 onwards basics of XHTML was recommended. As web designers weren’t interested to move to rigid parts of XHTML. In 2004, WHATWG (Web Hypertext Application Technology Working Group) began to develop the new version of HTML called HTML 5 which was not as rigid as XHTML. WHATWG are hopeful that their HTML 5 version will be eventually accepted as a W3C recommendation.

Deciding which version of HTML

While writing a Webpage, the first and foremost decision is whether to write in XHTML or HTML. If a webpage designer is using an editor like dreamweaver the choice of HTML is determined by the doctype chosen. If an XHTML doctype is chosen, then the page will be written XHTML or if an HTML doctype is chosen, then the page will be written in HTML.

Now XHTML is HTML 4.0 which has been rewritten as XML application. If XHTML is written, the attributes will be quoted, tags will be closed and it could be edited in XML editor. Than XHTML, HTML is lot looser because it can leave quotes of attributes like leave tags <p> without closing </p>tag and so on.

Why HTML is used

HTML occupies lesser space, where the download speed will be higher
Response of the older browsers will be more effective to HTML than to a XHTML.
Learning HTML is an easy process because it forgives, like if the tags in HTML are left off the codes still work.

Why XHTML is used

XTML is lot clearer at the beginning and at the end by which events and styles can be added in more easily. Because XHTML is XM, it integrates well into other programming languages. Some of the browsers available respond reliably to XHTML, so that the pages are displayed consistently.

Once decided on XHTML or HTML- which of these versions should be used

HTML
In this there are 3 versions still in regular use around the net. They are:
HTML 3.2, HTML 4.0 and HTML 4.01.

XHTML
In this there are 2 versions in current use, they are:
XHTML 1.0 and XHTML 2.0.

Once decided on a version

Ensure to use a doctype. Using a doctype is one more additional line in HTML documents. By using doctype, it ensures the pages are displayed the way they are intended to be displayed


Feb
7th

Why Use DOCTYPE Declarations in HTML

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

Definition of Doctype: it specifies the version of the HTML used in the document

When a doctype is used in one of your WebPages, you are telling the web browser how your webpage should be displayed in what versions of (X) HTML. Here the browser gets a list of supported tags from the DOCTYPE and it doesn’t include either proprietary tags (the tags of HTML that works on in the internet explorer) or deprecated tags (attributes and elements which has been deprecated in the latest versions of XHTML 1.0 and XHTML) in the list.

But generally HTML editors allow you to write any non HTML or HTML tags you wish to write inside your documents, even if a strict DOCTYPE is specified. Even if it’s incorrect, HTML editors allow you to write and save anything that you want unlike many XHTML editors.

Web Browsers are fairly forgiving

You can write incorrect or invalid HTML codes and get away with it because most of the Web Browsers which are being used are astonishingly forgiving. Web Browsers do not require a well informed or valid HTML because Web Browsers will display anything given to them as long as it is defined as text or HTML.

Unlike xml applications, Web Browser attempts to find at what the Web Page writer is aiming at and it displays however what it can display.

Web Browser Quirks Mode

When most of the Web Browsers are in the quirk mode it will display the WebPages slight differently. If your WebPages doesn’t have a DOCTYPE or a DOCTYPE without DTD attached to it you might notice some of the quirks, they are:
Class names of CSS are case insensitive
Colours of HTML are parsed differently (# is not necessary, missing digits are filled in a different way).
If a unit is left off sizes are calculated in pixels (px).
In its place of Modern Browsers, pages try to view similar to that of Netscape 4.

From where did the scroll bar come from?

IE 6 has an amazing feature to it that it adds to the documents that have got HTML tags which are proprietary from within its page and deprecated. It adds a horizontal bar to it.

One of the possible way to avoid the horizontal scroll bar, is to get rid of the HTML tags which are proprietary and deprecated HTML tags with a DOCTYPE declaration from with in a page

Why Use a DOCTYPE Declarations
It’s a pretty good idea to get in the habit of using DOCTYPE declarations on your web pages. You won’t be amused in that way that, how they display.
Do validate your HTM (to validate CSS, HTML and other web files with these HTML validators, they are: CSS validators, HTML validators, RSS validators, an XHTML validators and a p3p validator. They are all easy to use, just put the URL of the HTML and just click on the validate button to get validated) once you are comfortable using them, by validating the HTML you will not end with the surprises like horizontal scroll bar in IE 6.


Jan
9th

Your new Website is Inside

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

Today’s internet is lot different from what it initially used to be. With the latest developments such as web standards and the search engine optimisation, it is just not possible to cut the websites the same old way. The W3C lays down certain regulations and guidelines, which have to be followed by all the web designers so as to make their website functional as well as accessible as far as possible. Making the website compatible with standards of W3C ensures that your site is able to achieve its maximum potential across a wide range of systems. But the W3C standards keep on changing on a daily basis. But does this mean that your website will be suffering aesthetically? The simple answer is NO. With the evolution of CSS the web designers have the freedom to do almost anything on web. CSS also has the capability of giving much better usability, foundation for SEO and compliance with the web standards.

From the perspective of web designing, the biggest advantage of CSS is the cross browser compatibility. Almost every web designer would have tested his website on other computers just to ensure that layout is not mangled. The main reason for this is that different versions of the same web browsers as well as different web browsers would always display different websites differently. As a matter of fact, all the web site designers have to forcefully test their websites on as many browsers as possible so as to minimize these unwanted problems. As a web developer, it is virtually impossible for you to control all the variables present in your code but can definitely try to minimize these problems. It’s a well known fact that if the user has the ease and the comfort level on your, he will surely return back to the site.

Though all the website users are conversant with the powers of CSS but surely many of them have never utilised to its maximum capabilities. The cascading feature of CSS is actually the most important part of the web designing, yet it is most overlooked. The designer can easily alter one file, which is the style sheet and the entire site can be modified just by making the necessary changes in one file. CSS is capable of creating the code that is less bulky and cleaner as compared to the other scripting languages. Less code would just imply that the search engine would have a better access to the content of your web site. As a result of this your website will be indexed more effectively and will have more targeted users or clients.

Another great benefit of CSS that cannot be overlooked is its increased efficiency and ease in its use. Once you have successfully attained knowledge about the programming techniques, it is quite easy to control the designs of your website using CSS. For a website to work properly, it is not essential that it should be boring and simple. CSS surely does not limit the designing capabilities of your web site; instead it gives the designers the power of creating fully functional and aesthetically pleasing site.


Oct
10th

Graceful Degradation

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

To understand graceful degradation, it is very important to understand first Tag Degradation. Tag degradation is a phenomenon which describes the incompatibilities which could be either deliberate or accidental, in the web documents. All the web browsers follow one simple rule with respect to HTML tags which states that, “If you do not understand a tag, just ignore it.” Whenever a web browser encounters any tag and it fails to understand and display it, the result is degradation. This is where the concept of graceful degradation comes in. Graceful degradation is a simple but a powerful technique which ensures that a web page should be coded in such a way that just in case if the browser is not able to cope up with any of its effect or feature the page should yet be displayed in a simplified form.

When the degradation takes place, the content of your page will be either lost to the web browser or the content of your page will still be completely accessible, which will depend solely on whether the degradation is graceful or not. As we all know that HTML is continuously changing and different browser have different characteristics and each one supports different elements, therefore graceful degradation is the main element which ensures that all the pages are readable and accessible in all the browsers. The standards for HTML have been written keeping this important key i.e. graceful degradation in mind.

Graceful degradation has two basic rules. Firstly any browser should be able to view the content of the site and secondly any browser should be able to navigate the site. This simply indicates that the website should still be able to operate even when it is being viewed with less optimal software which does not support any kind of advanced features. You can add as many special effects as desired but always ensure that the site is very much operative and usable without them as well. The essence of quality web programming is ensuring graceful degradation. By definition, we all know that no HTML will run on all the browsers, errors are inevitable. Although a page might appear different in an older version of the browser in comparison to the latest ones but what is important is the fact that information should always be available to the user.

There are various good examples which can successfully describe graceful degradation, such as the use ALT attribute in IMG tags. By using alt, we are providing a text alternative to the browser. In case the browser is not able to display the image it can provide the relevant text information. Another example can be if CSS is used to describe the text color, and in case if the web browser does not support the style sheets the text will return to its default color which is black and thereby making the text readable by the user. Graceful degradation is only possible if the HTML used in the web pages should be valid which means that it should be grammatically correct. Browser should have something to fall back on. When the HTML is written badly, it would mean that when the browser tries to ignore certain parts which are not understandable, atleast the content can be displayed. And finally the tag should be closed at the end. If the tag is left open, it would completely fail.