/

HTML / CSS / JavaScript Tutorial

HTML Attributes

[this page | pdf | back links]

Different HTML elements can have attributes that specify how they should be formatted or interpreted or allow further characterisation of the element. Attributes come in two basic types:

 

(a)    Standard attributes, which describe or characterise the element further, and

(b)   Event attributes, almost all of which begin with on…. These indicate what scripts should be run if an event occurs (e.g. the mouse button is clicked, an element is dragged, dropped or copied, etc.)

 

HTML attributes can also be set programmatically using JavaScript by modifying the properties of the corresponding HTML DOM elements. Listed here are the JavaScript DOM properties that correspond to most of the HTML attributes recognised in HTML 5.

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Attributes


Desktop view | Switch to Mobile