1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Accessibility and JavaScript

Tuesday March 17, 2009
JavaScript is best kept completely separate from your HTML

The original way that JavaScript was coded was to place script tags whereever in the page the JavaScript was needed with the JavaScript between the tags. Event handlers were coded directly into the tags that they applied to.

The modern way to code JavaScript is to place ALL of the JavaScript into a separate file and link that into your page using a script tag with a src attribute. This also has the effect of ensuring that the web page is still fully accessible to those without JavaScript.

So how do we make a start on making our web page more accessible with regard to our JavaScript?

Accessibility and JavaScript
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.