Tuesday 25th of July 2017 02:32:51 PM

Style Guide

CSS: Style Sheet Guidelines (1)

According to its creators at W3C, Cascading Style Sheets “is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.” Let's expand that definition to see what it means for Web designers and developers:

  1. CSS is a standard layout language for the Web—one that controls colors, typography, and the size and placement of elements and images.
  2. Though precise and powerful, CSS is easy to author by hand.
  3. It is bandwidth–friendly technology: a single 10K CSS document can control the appearance of an entire website, comprising thousands of pages and hundreds of megabytes. (For an example, see the Sophisticated Style Sheet on page 2.)
  4. CSS is intended by its creators (W3C) to replace HTML table-based layouts, frames, and other presentational hacks.
  5. CSS, together with other web standards such as XHTML, helps us separate style from content, making the Web more accessible, and opening it up to more powerful applications and technologies to come.

Laying out pages with CSS instead of HTML tables—or using CSS simply to replace redundant, non–standard HTML hacks, such as invalid extensions to the <font> tag or the <body> tag—provides the following benefits:

  1. Conserve bandwidth (less markup for visitors to download)
  2. Reduce design/development time
  3. App server developers are not restricted to using HTTP, they can transmit and recieve XML information using simple remote CORBA objects and RMI objects. The key is that by using XML, it makes these remote services or objects easier to build. And, by sticking with XML, any one of these technologies can be used in your design of your app server. You can use whatever technology is most appropriate to getting the job done, knowing that all the information flows as XML and can be processed by any part of the system. The reason Java object serialization did not achieve this is because it encodes object data to a binary format that is dependent on too many things (like the JVM version, and the existence of classes when things are deserialized, etc). XML is not limited by any of these restrictions (or problems), which makes it much easier to create systems that allow XML information to flow between different subsystems. Also by relying only on the data, large portions of the system can be replaced with better or different implementations for future-readiness.

    App servers traditionally give their client apps access to information in remote databases, remote file systems, remote object repositories, remote web resources, and even other app servers. All these information sources don't even need to reside on the machine that hosts the app server. These remote resources may be on other machines on the Intranet or the Internet. Using Java and XML, RMI, JDBC, CORBA, JNDI, Servlet and Swing, you can create app servers that can integrate all kinds of remote and local information resources, and client apps that allow you to remotely or locally access this information from the app server.

    In the future, with publicly available DTDs that are standardized for each vertical industry, XML based app servers will become very popular. Also when XML schema repositories become available and widely used, app servers will be able to take on a new role and provide application services that are not offered now. Companies will need to share information with other companies in related fields, and each company might have a different software system in which all their data is housed. By agreeing upon a set of DTDs or schemas (encoded in XML), these companies can exchange information with each other regardless of what systems they are using to store this information. If their app servers can exchange XML documents (based on some shared DTD or schema), then these disparate app servers can understand each other and share information. One of the uses for XML foreseen by the W3C is just this, vertical industries (like insurance and health care) creating sets of DTDs and schemas that all companies in the industry agree upon. Then these companies' app servers can talk to each other using some popular protocol (like HTTP or CORBA/IIOP) to exchange information between each other. This has the potential to save a lot of time and money in the daily business operations of these companies.

    Web-based Applications

  4. Reduce updating and maintenance time
  5. Increased accessibility (fewer, or no, HTML tables; no invalid junk markup)
  6. Adhere to W3C recommendations, improving interoperability and ensuring greater longevity (sites will not become obsolete)
  7. Better, more professional appearance (line–height, borders, padding, margins)
  8. Increased readability (line–height, borders, padding, margins)
  9. More easily transition in future to more powerful standards such as XML (because page content no longer contains junk markup)

On the next page, we explore the basics of CSS and its recommended usage at NYPL. »

« CSS Section Index | CSS Guidelines 2 »

You can include a BASEFONT tag at the start of your BODY section to specify the font SIZE, and, for some browsers, font FACE and font COLOR for your page: 
<BASEFONT SIZE="n" FACE="name" COLOR="color">
where n=3 references the client browser's default font size, typically 12-point, so that the allowable  n values 1 through 7 typically reference 8, 10, 12, 14, 18, 24 and 36 points respectively; "name" references a font name (Arial, Times New Roman or whatever); and "color" is an RGB hexadecimal triple or one of the 16 named
Figure 1-3

Figure 1-3. Combining linked style sheets

It's also possible to define alternate style sheets. These are marked with aREL of alternatestylesheet and come into play only ifthey're selected by the reader. Alternate style sheets