It is the language for HTML, for the web, for servers, PCs, laptops, tablets, phones, and more.
A scripting language is a lightweight programming language.
document.write(“<p>This is a paragraph</p>”);
|–||You can only use document.write in the HTML output. If you use it after the document has loaded, the whole document will be overwritten.|
The onclick event is only one of the many HTML events you will learn about in this tutorial.
You will often see document.getElementById(“some id“). This is defined in the HTML DOM.
The DOM (Document Object Model) is the official W3C standard for accessing HTML elements.
You will find several chapters about the HTML DOM in this tutorial.
Changing the style of an HTML element, is a variant of changing an HTML attribute.
x.style.color=”#ff0000″; //Change the style
Did You Know?
7,908 total views, 1 views today