19 October, 2013

Setting up some HTML5 experiments

Recently, I have been increasing my knowledge about HTML5 and CSS by reading blogs and books. I have come across a wide range of information including the HTML5 specifications, tips, tricks, examples and best practices. To test my understanding, I am planning on creating some sample web sites and a few blogs posts.

To get started, I am creating a HTML5 page that contains some content and simple structure. It will be the base for examples, samples and experiments.


Putting styles in there place

  1. Put the style code in its own file or files.
  2. Don't use inline styles
  3. Link to the style sheet should be placed within the <head> tags.
By keeping the content separate from the styling information makes the HTML easier to read, makes the HTML easier to maintain, makes the CSS easier to read, makes the CSS easier to maintain.

Remember to close the tags

By closing the tags it reduces validation errors, makes the code easier to understand, and it is considered a best practice.

Make place for the JavaScript

  1. Place the scripts just before the closing </body> tag.
  2. Avoid using inline script
JavaScript within the HTML page can block the browser from parallel downloading.

Use the correct DocType 

By telling the browser what type of document the page, you get the benefit of more consistent results.

No comments:

Challenging myself to learn something new

I have recently set a big challenge for myself. I want to know about Machine Learning . To add to the challenge, I am trying out usin...