Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Tuesday, February 27, 2007

The Anchor Tag

I used to think that the only way to make internal links inside a web page pointing to sections found in the same web page was to surround the target section with an anchor tag like this:
<a href="section-name">Some Link Text</a>
I just by coincidence while scanning the W3C documentation for anchor tags discovered that there is another method which in my case proved to be easier and more compact.
Let's say you have a section in your web page titled as follows:
<h2>My Section</h2>
If I wanted to link to such a section, I would modify it as follows:
<h2><a name="section-name">My Section</a>
But I discovered that I can alternatively write it as follows:
<h2 id="section-name">My Section</h2>
This has the exact same effect as the first method and looks neater and easier to write.

By the way, using internal anchors and linking to them from the same web page helps a lot in search engine optimization (SEO). Google seems to love web pages that have such links in them. They give spiders many clues and Google just loves this and usually ranks such web pages high.

Friday, February 02, 2007

ISO HTML

HTML is a web standard developed by the Word Wide Web Consortium. The ISO has taken HTML and made a neater standard out of it by removing deprecated HTML elements and bringing out a tighter edition of HTML. The ISO HTML standard is called ISO/IEC 15445:2000.

One of the interesting features for instance of ISO HTML is that if you use an <h1> tag you cannot use an <h3> tag directly after it, but you must follow the <h1> tag with an <h2> first then you may use an <h3> after that. I think this gives you the picture and a taste of what ISO HTML is all about. It tries to make HTML more neat by removing deprecated elements and adding some restrictions to come up with a tighter HTML than that of the W3C.

The question remains however on who will be using such a standard and whether it will ever gain popularity on the web. I personally believe it will not, yet still I find it interesting to use it.