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

Tuesday, May 15, 2012

HTML

Complete list of HTML tags: http://www.w3schools.com/tags/default.asp

- HTML stands for Hyper Text Markup Language
- HTML is not a programming language, it is a markup language
- Practically speaking, there is no difference between the htm and html extensions
- In XHTML, all elements must be closed. Adding a slash inside the start tag, like
, is the proper way of closing empty elements in XHTML (and XML)
- HTML tags, attribute names and attribute values are not case sensitive but World Wide Web Consortium (W3C) recommends lowercase in HTML 4, and demands lowercase tags in XHTML. Newer versions of (X)HTML will demand lowercase attributes
- In XHTML, XML, elements with no end tag (closing tag) are not allowed
- attribute id vs name: id must be unique and is used as an identifier of an HTML element while name is used for form elements and form elements can share the same name
- HTML comment sample:
 <!-- This is a comment --> 
- The <center>, <font>, <basefont>, <s>, <strike> and <u> tags and align, bgcolor and color attributes are deprecated in HTML 4, and removed from HTML5. Style sheets (CSS) should be used to define the layout and display properties for many HTML element
- Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two requests to the server, the server will first add a slash to the address, and then create a new request like this: href="http://www.w3schools.com/html/"
- HTML frames are obsolete in HTML5. Cons: http://webdesign.about.com/od/framesprosandcons/a/aaframesyuck_2.htm
- The doctype declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly. 
 <!-- This is a comment --> 

Reference: http://www.w3schools.com