Monday, June 11, 2007

A more complete guidance for HTML

For beginners, I would like direct you to W3schools' HTML Tutorial. W3schools is a place where you can find good tutorials for most of web technologies.

For advanced programmer, you may want to read the Specification of HTML 4.01 and the Specification of XML 1.1.

I also collection some interesting knowledge about HTML.

  • Define an expression in HTML. Although I cannot find any standard describing this. This works in IE 6 but not in Netscape 7 and not tested in Firefox yet.
    Click Here to test if you are using IE
    The code is as below.
    <div id="mycode" expr="alert('hah!')" onclick="eval(document.all.mycode.expr)" > Click Here to test if you are using IE</div>
    
    You can even execute your script stealthily when the document is loaded. This is often used by malicious code to be executed stealthily. Since IE is more tolerant for those codes, IE is not as secure as Netscape and Firefox.
    <div id="mycode" expr="alert('hah!')" style="background:url('javascript:eval(document.all.mycode.expr)')"> 
    

No comments: