Thursday, January 24, 2008

week3- A2 q's

Using CSS over using HTML's physical tags is beneficial in many ways. First, it gives you more variety and say in your page, while HTML is very good for the logical tree layout, CSS can cover all physical tags that even some browsers have issues with rendering. Second, CSS allows you to link reference to a separate file, this allows you to make changes across every page in your website. Third, because you don't need to repeat the CSS information across all HTML pages, your overall website costs less bytes, which is a very good payoff because this means the site will render faster.

The difference between classes and ids is that ids are only for tags that will be unique to that page and classes are for tags that you will be using multiple times on a page. While, their importance may not seem to stand out right now, when you get to Javascript, it is important because a very commonly used function in javascript is .getElementById . If you mix up the classes and ids, the javascript won't do what you want it to do.

No comments: