Introduction to HTML

Before jumping directly into HTML5 and CSS3, it is important to understand, why and what is it. For that lets talk a little about HTML and browser. HTML is a set of instructions written in a difined way. The browsers know, how to understand these instructions. Depending upon these instructions browsers try and display the content. Well, then how these browsers understand these instructions?! This is an important question. The answer is simple, there are instructions written inside the browser itself to read the instructions of the page and understand it how/what to display. Now the question is, ” where it is written, how to write these instructions?” It is W3C, who used to do it for a long time. Then its moved to WHATWG (Web Hypertext Application Technology Working Group). If you visit WHATWG site, there is link toward the end of the home page, which shows what is the relation between W3C and WHATWG. The direct answer to the question is here, in the FAQ section of WHATWG website.
Now coming back to the instructions and how to write it. There are specifications for different types and versions of HTML. Basically there are 2 kinds of instructions one is based on only HTML standard and one is based on HTML and XML standards. So the names are HTML and XHTML. The versions of HTML are version 1.0, 2.0, 3.0, 3.2, 4.01 and then came XHTML1.0 and followed by XHTML 1.1 and XHTML 2.0. There are further more to add to this confusion are 3 different versions of each specification. Do not get scared, just read on. These different options are Strict, Transitional and Frameset. So the HTML instruction version could be HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset. All these versions have there own instruction set as to, how to write an HTML instruction. The part of this specification is, a detailed information about the structure of the HTML instruction as to where and how to write the instructions. This structural information is know as Document Type Definition, in short DTD of that specification.
HTML 3.0 specification
HTML 4.01 specification
XHTML 1.0 Specification
XHTML 2.0 Specification


HTML5 specification
CSS3 specification

A must read, which shows a little inside of browser implementations of the specification, if you read about the HTML version 3. A little history of HTML versions. By this time you must be getting an idea of relations between specification,browser and their behaviour.

Well, enough of this, lets move on to browsers and see how these specifications affect us. As we already have known that browsers can read our HTML instruction and display the content, the thing to remember here is different browsers understand these instructions differently. Thats because there are different logics put inside different browsers. These processing of the instruction is done by the part of the browser know as browser engine. This is basically the part which understands the HTML instruction and tells other part of the browser, how to go ahead for the instruction received. Previously these engines were kind of one per browser, but now these engines are also getting specific as to their implementation and responsibility, browser displaying engine, javascript engine etc. Lets consider the browser engine and see how specifications affect it. Since there are different browser engines to process one single set of instructions, there are different kind of behaviour happening in different browsers for the same HTML page. Now, I think, it makes sense to you as to why your html page looks different in 2 different browsers :)
Since HTML 4.01, CSS (Cascading Style Sheets) are introduced, more on it later. The browser vendors like Safari, Opera, Firefox, Internet Explorer update their engines to support new features according to the new specifications. Now you must see the reason, why there are different updated versions are coming for the same browser. Well, so the point is, if specification is updated to a new standard (supporting new feature), browser vendors must update their browser engine to support the specification so that a web designer using the latest specification can use the new browser to see it in action. There is always a race between the browsers as to who supports the new specification and to what level. Now as we see, there are browser enhancements happening, the browser vendors sometimes put their innovation into action by supporting some features, which might not be in the specification but their own choice to support. There comes the difference in the support for features. So when we see something is supported in a particular browser, and not supported in another browser, there might be a chance that each browser is having their own features or may be all the specifications are not yet implemented in a particular browser.
Coming back to CSS, its basically putting all our style definitions into a different file and saving it as .css extention. Thatway, any change to the content in the HTML page, does not affect us to re-write the styles and the same styles can be applied to different pages. Since these styles can be combined together, its known as cascading of styles and so the name, cascading style sheet. Similarly one can put javascript in a different file and link it to the html document, this is just to add behaviour to our html pages. We will be covering that more on coming days. Like HTML instruction processing, different browser owners make their own javascript processing engine and layout or style processing engines. Since implementation of these different kind of engines are different we generally get different behaviour on different browsers. All these CSS, javascsript have their own version specifications too like HTML. Now, it should be getting clear as to what web technology is and how easily browsers are hiding all these complexities inside themselves. Seems intereting ? Yes, its a lot of interesting things going on.
Now, coming back to our original discussion, HTML5 and CSS3, now probably it is a little clear to you as to what it is? Its basically the next version of HTML specification and CSS specification. Since there were no updation to the HTML for a long time, no browser updated it, till now in that area, we were kind of living with the older technologies for a long time. But things are changing very fast. The HTML5 specification is still a draft, that means its not finalised yet. Still the browser owners are putting their efforts to support all these draft specifications. That means, browsers are constantly updating themselves to support new features in the specification, even though these specifications are just ideas, which may or may not be in the final version of the HTML5. Same thing is happening for CSS3, there are new features and specifications coming up and browsers are trying to catch up.
Does that mean we should try HTML5, CSS3 or ignore it till the specifications are final. well, the decision is yours but then with this fast changing technology age, you never know what could come up next. So its better to be trying out new things. All most all major browsers support HTML5 and CSS3 upto certain level, so there is a good chance that we can leverage the ability of the technology while going forward.

Would love to listen your comments and feedbacks.

2 thoughts on “Introduction to HTML

  1. Pingback: Getting into web design action | saumya

  2. Pingback: javascript : Making a Library | saumya

Comments are closed.