- Put the scripts at the bottom of the HTML document, right before the </body> tag except the scripts that need to run before the documents loads or as it loads
- Put any scripts that must be in the <head> right before the </head> tag, i.e. the last thing to load in <head>
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
Tuesday, 17 January 2012
Where to Place Scripts in HTML
Friday, 13 January 2012
Ways to display XML data on browser
- Open the xml file from IE
- Open XML file from IE using XSL
- Use jQuery to load the whole XML file into a container
- Use jQuery to parse the XML file into a container
- Display the XML file (with/without XSL) in an iframe tag of the HTML file
e.g. <iframe src="test.xml" scrolling="no" frameborder="0"></iframe>
Friday, 6 January 2012
What is Microdata and Microformats?
You don't want to surround all your content in DATA tags because it's
not all data. That's where microformats come in. Microformats help you
define the content of your pages as specific things beyond just data and
let that information be machine-readble as well.
Microdata is a set of human-readable libraries added to HTML to make that HTML more semantic, and thus more computer-readable as well. You use microdata with existing HTML tags and attributes to define data that computers can use and humans can read.
For example, an event that is marked up using microdata can then be added to a reader’s calendar without the reader needing to type in any of the event data. Instead, they would simply click a link and the event would be automatically added to their calendar including the start and end times, location, and any other information that is marked up with microformats.
Microformats use existing HTML attributes and elements like class, rel, and SPAN to define the microdata.
Microdata is a set of human-readable libraries added to HTML to make that HTML more semantic, and thus more computer-readable as well. You use microdata with existing HTML tags and attributes to define data that computers can use and humans can read.
For example, an event that is marked up using microdata can then be added to a reader’s calendar without the reader needing to type in any of the event data. Instead, they would simply click a link and the event would be automatically added to their calendar including the start and end times, location, and any other information that is marked up with microformats.
Microformats use existing HTML attributes and elements like class, rel, and SPAN to define the microdata.
http://webdesign.about.com/od/microdata/a/what-is-microdata.htm?nl=1
Tuesday, 3 January 2012
The ideal order for your HEAD element
- Meta charset tag
- Title tag
- Style tags or links
- Other meta tags and content
- Scripts that must be in the
HEAD(for optimal loading, scripts should be placed at the bottom of your web pages, just before the</bodytag)
Putting the
HEAD element in this order helps your web page load as quickly as possible.
Subscribe to:
Posts (Atom)