HOME

TheInfoList



OR:

JavaScript Style Sheets (JSSS) was a stylesheet language technology proposed by
Netscape Communications Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California, and then Dulles, Virginia. Its Netscape (web browser), Nets ...
in 1996 to provide facilities for defining the presentation of webpages. It was an alternative to the Cascading Style Sheets (CSS) technology. Although Netscape submitted it to the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
(W3C), the technology was never accepted as a formal standard and it never gained acceptance in the
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
market. Only
Netscape Communicator Netscape Communicator (or ''Netscape 4'') is a discontinued Internet suite produced by Netscape Communications Corporation, and was the fourth major release in the Netscape line of browsers. It was first in beta in 1996 and was released in Jun ...
4 implemented JSSS, with rival
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
choosing not to implement the technology. Soon after Netscape Communicator's release in 1997, Netscape stopped promoting JSSS, instead focusing on the rival CSS standard, which was also supported by Internet Explorer and had a much wider industry acceptance. The follow-up to Netscape Communicator, Netscape 6 (released in 2000), dropped support for JSSS. It now remains little more than a historical footnote, with web developers generally unaware of its previous existence. The proposal did not become a W3C standard.


Syntax

Using
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
code as a stylesheet, JSSS styles individual element by modifying properties of a document.tags object. For example, the CSS: h1 is equivalent to the JSSS: document.tags.H1.fontSize = "20pt"; JSSS element names are case sensitive. JSSS lacks the various CSS selector features, supporting only simple tag name, class and id selectors. On the other hand, since it is written using a complete
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
, stylesheets can include highly complex dynamic calculations and conditional processing. (In practice, however, this can be achieved using
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
to modify the stylesheets applicable to the document at runtime.) Because of this JSSS was often used in the creation of
dynamic web page A dynamic web page is a web page constructed at runtime (during software execution), as opposed to a ''static web page'', delivered as it is stored. A server-side dynamic web page is a web page whose construction is controlled by an application ...
s.


Example

The following example shows part of the source code of an HTML document: Similar to Cascading Style Sheets, JSSS could be used in a tag. This example shows two different methods to select tags.


Browser support

Javascript Style Sheets were only supported by Netscape 4.x (4.0–4.8) but no later versions. No other
web browser A web browser, often shortened to browser, is an application for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's scr ...
has ever implemented JSSS.


References


External links


Netscape's JavaScript-Based Style Sheets submission to the W3C
{{W3C standards Style Sheets Stylesheet languages Netscape