Saturday, March 14, 2009

ssr......underconstruction!!!


SSR


A solid state relay (SSR) is a solid state electronic component that provides a similar function to an electromechanical relay but does not have any moving components, increasing long-term reliability. With early SSR's, the tradeoff came from the fact that every transistor has a small voltage drop across it. This voltage drop limited the amount of current a given SSR could handle. As transistors improved, higher current SSR's, able to handle 100 to 1,200 amps, have become commercially available. Compared to electromagnetic relays, they may be falsely triggered by transients.


Operation


Voltage applied to the control line of an SSR causes the LED to shine on the photo-sensitive diode. This produces a voltage between the MOSFET source and its gate, causing the MOSFET to turn on. An SSR based on a single MOSFET, or multiple MOSFETs in a paralleled array works well for DC loads.

There is an inherent substrate diode in all MOSFETs that conducts in the reverse direction. This means that a single MOSFET can't block current in both directions. For AC (bi-directional) operation, two MOSFETs are arranged back to back with their source pins tied together. Their drain pins are connected to either side of the output. The substrate diodes then are alternately reverse biased in order to block current when the relay is off. When the relay is on, the common source is always riding on the instantaneous signal level and both gates are biased positive relative to the source by the photo-diode.

It is common to provide access to the common source so that multiple MOSFETs can be wired in parallel if switching a DC load. There is also commonly some circuitry to discharge the gate when the LED is turned off, speeding the relay's turn-off.

Friday, March 13, 2009

Again... It's Interfacing!



The connection and interaction between hardware, software and the user. Users "talk to" the software. The software "talks to" the hardware and other software. Hardware "talks to" other hardware. All this is interfacing. It has to be designed, developed, tested and redesigned; and with each incarnation, a new specification is born that may become yet one more de facto or regulated standard.

Hardware Interfaces

Hardware interfaces are the plugs, sockets, cables and electrical signals traveling through them. Examples are USB, FireWire, Ethernet, ATA/IDE, SCSI and PCI.

Software/Programming Interfaces

Software interfaces (programming interfaces) are the languages, codes and messages that programs use to communicate with each other and to the hardware. Examples are the Windows, Mac and Linux operating systems, SMTP e-mail, IP network protocols and the software drivers that activate the peripheral devices.

User Interfaces

User interfaces are the keyboards, mice, commands and menus used for communication between you and the computer. Examples are the command lines in DOS and Unix, and the graphical interfaces in Windows, Mac and Linux.

Format & Function

Every interface implies a structure. Electrical signals are made up of voltage levels, frequencies and duration. The data passed from one device or program to another has a precise format (header, body, trailer, etc.).

Every interface implies a function. At the hardware level, electronic signals activate functions; data are read, written, transmitted, received, checked for error, etc. At the software level, instructions activate the hardware (access methods, data link protocols, etc.). At higher levels, the data transferred or transmitted may itself request functions to be performed (client/server, program to program, etc.).

Language & Programming

An interface is activated by programming language commands. The complexity of the functions and the design of the language determine how difficult it is to program.

User Interface, Protocol, API and ABI

The design of the interaction between the user and the computer is called a "user interface." The rules, formats and functions between components in a communications system or network are called "protocols." The language and message formats between routines within a program or between software components is called an "application programming interface" (API). The specification for an operating system working in a specific machine environment has been known as an "application binary interface" (ABI), but this term is not widely used.

All the above interactions are interfaces. Regardless of what they are called, they all create rules that must be precisely followed in a digital world.

A Whole Lot of Talking To

No matter what they're called, interfaces boil down to a format and language that defines the services one system is capable of delivering to another.

Saturday, March 7, 2009

Solid state relay



This week we just studied about the Solid state relay which plays a big role in our project(computer interfacing-"push botton").


What is Solid state relay(SSR)?


Solid state relay(SSR) is an electronic switch, which, unlike an electromechanical relay, contains no moving parts. The types of SSR are photo-coupled SSR, transformer-coupled SSR, and hybrid SSR. A photo-coupled SSR is controlled by a low voltage signal which is isolated optically from the load.


Operation

Voltage applied to the control line of an SSR causes the LED to shine on the photo-sensitive diode. This produces a voltage between the MOSFET source and its gate, causing the MOSFET to turn on. An SSR based on a single MOSFET, or multiple MOSFETs in a paralleled array works well for DC loads.
There is an inherent substrate diode in all MOSFETs that conducts in the reverse direction. This means that a single MOSFET can't block current in both directions. For AC (bi-directional) operation, two MOSFETs are arranged back to back with their source pins tied together. Their drain pins are connected to either side of the output. The substrate diodes then are alternately reverse biased in order to block current when the relay is off. When the relay is on, the common source is always riding on the instantaneous signal level and both gates are biased positive relative to the source by the photo-diode.
It is common to provide access to the common source so that multiple MOSFETs can be wired in parallel if switching a DC load. There is also commonly some circuitry to discharge the gate when the LED is turned off, speeding the relay's turn-off.

Friday, March 6, 2009

wHat do We hAve???

We are currently making our project regarding the topic "computer interfacing using C". In this project,some materials that we used are:::::


Resistors


A resistor is a two-terminal electronic component designed to oppose an electric current by producing a voltage drop between its terminals in proportion to the current.

Resistors are used as part of electrical networks and electronic circuits. They are extremely commonplace in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).


PCB


PCB is an interactive printed circuit board editor for the X11 window system. PCB includes a rats nest feature, design rule checking, and can provide industry standard RS-274-X (Gerber), NC drill, and centroid data (X-Y data) output for use in the board fabrication and assembly process. PCB offers high end features such as an autorouter and trace optimizer which can tremendously reduce layout time.


Capacitors


A capacitor or condenser is a passiveelectronic component consisting of a pair of conductors separated by a dielectric. When a voltagepotential difference exists between the conductors, an electric field is present in the dielectric. This field stores energy and produces a mechanical force between the plates. The effect is greatest between wide, flat, parallel, narrowly separated conductors.


Transistors


A transistor is a semiconductor device commonly used to amplify or switch electronic signals. A transistor is made of a solid piece of a semiconductor terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals.The transistor is the fundamental building block of modern electronic devices, and is used in radio, telephone, computer and other electronic systems. Some transistors are packaged individually but most are found in integrated circuits.


TRIAC


A TRIAC, or TRIode for Alternating Current is an electronic component approximately equivalent to two silicon-controlled rectifiers (SCRs/thyristors) joined in inverse parallel (paralleled but with the polarity reversed) and with their gates connected together. The formal name for a TRIAC is bidirectional triode thyristor.


Heatsink


A heat sink (or heatsink) is an environment or object that absorbs and dissipates heat from another object using thermal contact (either direct or radiant). Heat sinks are used in a wide range of applications wherever efficient heat dissipation is required; major examples include refrigeration, heat engines, cooling electronic devices and lasers.


Drill bits


Drill bits are cutting tools used to create cylindrical holes. Bits are held in a tool called a drill, which rotates them and provides torque and axial force to create the hole. Specialized bits are also available for non-cylindrical-shaped holes.

Again??? With Application???

Interface in Computer Science Field

Interface generally refers to an abstraction that an entity provides of itself to the outside. This separates the methods of external communication from internal operation, and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide multiple abstractions of itself. It may also provide a means of translation between entities which do not speak the same language, such as between a human and a computer. Because interfaces are a form of indirection, some additional overhead is incurred versus direct communication.

The interface between a human and a computer is called a user interface. Interfaces between hardware components are physical interfaces. This article deals with software interfaces, which exist between separate software components and provide a programmatic mechanism by which these components can communicate.


Interfaces in practice

A piece of 'software' provides access to computer resources (such as memory, CPU, storage, etc.) by its underlying computer system; the availability of these resources to other software can have major ramifications—sometimes disastrous ones—for its functionality and stability. A key principle of design is to prohibit access to all resources by default, allowing access only through well-defined entry points, i.e. interfaces.[citation needed]

The types of access that interfaces provide between software components can include: constants, data types, types of procedures, exception specifications and method signatures. In some instances, it may be useful to define variables as part of the interface. It often also specifies the functionality of those procedures and methods, either by comments or (in some experimental languages) by formal logical assertions.

The interface of a software module A is deliberately kept separate from the implementation of that module. The latter contains the actual code of the procedures and methods described in the interface, as well as other "private" variables, procedures, etc.. Any other software module B (which can be referred to as a client to A) that interacts with A is forced to do so only through the interface. One practical advantage of this arrangement is that replacing the implementation of A by another one that meets the same specifications of the interface should not cause B to fail—as long as its use of A complies with the specifications of the interface .

Friday, February 27, 2009

computer interfacing☺

Computer Interfacing

This week we tackled about computer interfacing and the parallel printer port.

The Parallel Printer Port

The PC parallel printer port is an interface between the computer and the printer. It is called parallel because the data is sent in parallel or by group of bits at a time unlike serial flow wherein data is sent one bit at a time.

While the parallel port is designed specifically for the printer, it can also be used as an interface to other electronic/electrical devices.



Introduction to Parallel Ports

    The Parallel Port is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks. The port is composed of 4 control lines, 5 status lines and 8 data lines. It's found commonly on the back of your PC as a D-Type 25 Pin female connector. There may also be a D-Type 25 pin male connector. This will be a serial RS-232 port and thus, is a totally incompatible port.

    Newer Parallel Port’s are standardized under the IEEE 1284 standard first released in 1994. This standard defines 5 modes of operation which are as follows,

      1. Compatibility Mode.
      2. Nibble Mode. (Protocol not Described in this Document)
      3. Byte Mode. (Protocol not Described in this Document)
      4. EPP Mode (Enhanced Parallel Port).
      5. ECP Mode (Extended Capabilities Mode).

    The aim was to design new drivers and devices which were compatible with each other and also backwards compatible with the Standard Parallel Port (SPP). Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware which can run at faster speeds, while still being downwards compatible with the Standard Parallel Port.

    Compatibility mode or "Centronics Mode" as it is commonly known, can only send data in the forward direction at a typical speed of 50 kbytes per second but can be as high as 150+ kbytes a second. In order to receive data, you must change the mode to either Nibble or Byte mode. Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer. Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte (8 bits) of data in the reverse direction.

    Extended and Enhanced Parallel Ports use additional hardware to generate and manage handshaking. To output a byte to a printer (or anything in that matter) using compatibility mode, the software must,
      1. Write the byte to the Data Port.
      2. Check to see is the printer is busy. If the printer is busy, it will not accept any data, thus any data which is written will be lost.
      3. Take the Strobe (Pin 1) low. This tells the printer that there is the correct data on the data lines. (Pins 2-9)
      4. Put the strobe high again after waiting approximately 5 microseconds after putting the strobe low. (Step 3)

    This limits the speed at which the port can run at. The EPP & ECP ports get around this by letting the hardware check to see if the printer is busy and generate a strobe and /or appropriate handshaking. This means only one I/O instruction need to be performed, thus increasing the speed. These ports can output at around 1-2 megabytes per second. The ECP port also has the advantage of using DMA channels and FIFO buffers, thus data can be shifted around without using I/O instructions.

Hardware Properties

    Below is a table of the "Pin Outs" of the D-Type 25 Pin connector and the Centronics 34 Pin connector. The D-Type 25 pin connector is the most common connector found on the Parallel Port of the computer, while the Centronics Connector is commonly found on printers. The IEEE 1284 standard however specifies 3 different connectors for use with the Parallel Port. The first one, 1284 Type A is the D-Type 25 connector found on the back of most computers. The 2nd is the 1284 Type B which is the 36 pin Centronics Connector found on most printers.

    IEEE 1284 Type C however, is a 36 conductor connector like the Centronics, but smaller. This connector is claimed to have a better clip latch, better electrical properties and is easier to assemble. It also contains two more pins for signals which can be used to see whether the other device connected, has power. 1284 Type C connectors are recommended for new designs, so we can look forward on seeing these new connectors in the near future.

    Pin No (D-Type 25)
    Pin No (Centronics)
    SPP Signal
    Direction In/out
    Register
    Hardware Inverted
    1
    1
    nStrobe
    In/Out
    Control
    Yes
    2
    2
    Data 0
    Out
    Data
    3
    3
    Data 1
    Out
    Data
    4
    4
    Data 2
    Out
    Data
    5
    5
    Data 3
    Out
    Data
    6
    6
    Data 4
    Out
    Data
    7
    7
    Data 5
    Out
    Data
    8
    8
    Data 6
    Out
    Data
    9
    9
    Data 7
    Out
    Data
    10
    10
    nAck
    In
    Status
    11
    11
    Busy
    In
    Status
    Yes
    12
    12
    Paper-Out / Paper-End
    In
    Status
    13
    13
    Select
    In
    Status
    14
    14
    nAuto-Linefeed
    In/Out
    Control
    Yes
    15
    32
    nError / nFault
    In
    Status
    16
    31
    nInitialize
    In/Out
    Control
    17
    36
    nSelect-Printer / nSelect-In
    In/Out
    Control
    Yes
    18 - 25
    19-30
    Ground
    Gnd
    Table 1. Pin Assignments of the D-Type 25 pin Parallel Port Connector.

    The above table uses "n" in front of the signal name to denote that the signal is active low. e.g. nError. If the printer has occurred an error then this line is low. This line normally is high, should the printer be functioning correctly. The "Hardware Inverted" means the signal is inverted by the Parallel card's hardware. Such an example is the Busy line. If +5v (Logic 1) was applied to this pin and the status register read, it would return back a 0 in Bit 7 of the Status Register.

    The output of the Parallel Port is normally TTL logic levels. The voltage levels are the easy part. The current you can sink and source varies from port to port. Most Parallel Ports implemented in ASIC, can sink and source around 12mA. However these are just some of the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so the least current is drawn from the Parallel Port.




wHats nEwWw????..hhhHHHmmmMMM



Computer Interfacing


The art of connecting computers and peripherals. In a lot of circumstances, it looks more like magic than art. It is not uncommon that you end up removing all unnecessary hardware from your computer to get that communication device to work. Despite all plug-and-play internal hardware solutions for the PC, connecting a number of external devices still requires some amount of technical knowledge and experience.




Cable information


In computer interfacing it is often difficult to find the right cable for a specific purpose. Although the USB interface tries to solve this problem, there are many situations where you need to search for the right cable. This can be the case when you need a RS-232 or parallel cable to connect a device to your computer. There is also information about modular cables and cables for connecting PLC's if you happen to work in the industrial automation business.





General interfacing information


Interfacing is not just about cables. In a lot of circumstances you need also background information, to select the right null modem cable for example. These pages contain detailed—yet readable—information about RS-232, RS-422, RS-423, RS-485, USB and how interfacing in the PC is organized using I/O ports and interrupts and UART's. Also ASCII is covered. After all this standard made computer interfacing possible in the first place.


Crime Scene Investigation??? Haha!!!

Cascading Style Sheets


Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including SVG and XUL.

CSS can be used locally by the readers of web pages to define colors, fonts, layout, and other aspects of document presentation. It is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation (written in CSS). This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices. CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.

The CSS specifications are maintained by the World Wide Web Consortium (W3C). Internet media type (MIME type) text/css is registered for use with CSS by RFC 2318 (March 1998).

Syntax

CSS has a simple syntax, and uses a number of English keywords to specify the names of various style properties.

A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of semicolon-separated declarations in braces. Each declaration itself consists of a property, a colon (:), a value, then a semi-colon (;).[1]

In CSS, selectors are used to declare which elements a style applies to, a kind of match expression. Selectors may apply to all elements of a specific type, or only those elements which match a certain attribute; elements may be matched depending on how they are placed relative to each other in the markup code, or on how they are nested within the document object model.

In addition to these, a set of pseudo-classes can be used to define further behavior. Probably the best-known of these is :hover, which applies a style only when the user 'points to' the visible element, usually by holding the mouse cursor over it. It is appended to a selector as in a:hover or #elementid:hover. Other pseudo-classes and pseudo-elements are, for example, :first-line, :visited or :before. A special pseudo-class is :lang(c), "c".

A pseudo-class selects entire elements, such as :link or :visited, whereas a pseudo-element makes a selection that may consist of partial elements, such as :first-line or :first-letter.

Selectors may be combined in other ways too, especially in CSS 2.1, to achieve greater specificity and flexibility.[2]

Use of CSS

Prior to CSS, nearly all of the presentational attributes of HTML documents were contained within the HTML markup; all font colors, background styles, element alignments, borders and sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to move much of that information to a separate stylesheet resulting in considerably simpler HTML markup.

Headings (h1 elements), sub-headings (h2), sub-sub-headings (h3), etc., are defined structurally using HTML. In print and on the screen, choice of font, size, color and emphasis for these elements is presentational.

Prior to CSS, document authors who wanted to assign such typographic characteristics to, say, all h2 headings had to use the HTML font and other presentational elements for each occurrence of that heading type. The additional presentational markup in the HTML made documents more complex, and generally more difficult to maintain. In CSS, presentation is separated from structure. In print, CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics. It can do so independently for on-screen and printed views. CSS also defines non-visual styles such as the speed and emphasis with which text is read out by aural text readers. The W3C now considers the advantages of CSS for defining all aspects of the presentation of HTML pages to be superior to other methods. It has therefore deprecated the use of all the original presentational HTML markup.

Sources

CSS information can be provided by various sources. CSS style information can be either attached as a separate document or embedded in the HTML document. Multiple style sheets can be imported. Different styles can be applied depending on the output device being used; for example, the screen version can be quite different from the printed version, so that authors can tailor the presentation appropriately for each medium.

  • Author styles (style information provided by the web page author), in the form of
    • external stylesheets, i.e. a separate CSS-file referenced from the document
    • embedded style, blocks of CSS information inside the HTML document itself
    • inline styles, inside the HTML document, style information on a single element, specified using the "style" attribute.
  • User style
    • a local CSS-file specified by the user using options in the web browser, and acting as an override, to be applied to all documents.
  • User agent style
    • the default style sheet applied by the user agent, e.g. the browser's default presentation of elements.

One of the goals of CSS is also to allow users a greater degree of control over presentation; those who find the red italic headings difficult to read may apply other style sheets to the document. Depending on their browser and the web site, a user may choose from various stylesheets provided by the designers, may remove all added style and view the site using their browser's default styling or may perhaps override just the red italic heading style without altering other attributes.

File highlightheaders.css containing:

h1 { color: white; background: orange !important; }
h2 { color: white; background: green !important; }

Such a file is stored locally and is applicable if that has been specified in the browser options. "!important" means that it prevails over the author specifications.

History

Style sheets have existed in one form or another since the beginnings of SGML in the 1970s. Cascading Style Sheets were developed as a means for creating a consistent approach to providing style information for web documents.

As HTML grew, it came to encompass a wider variety of stylistic capabilities to meet the demands of web developers. This evolution gave the designer more control over site appearance but at the cost of HTML becoming more complex to write and maintain. Variations in web browser implementations made consistent site appearance difficult, and users had less control over how web content was displayed.

To improve the capabilities of web presentation, nine different style sheet languages were proposed to the W3C's www-style mailing list. Of the nine proposals, two were chosen as the foundation for what became CSS: Cascading HTML Style Sheets (CHSS) and Stream-based Style Sheet Proposal (SSP). First, Håkon Wium Lie (now the CTO of Opera Software) proposed Cascading HTML Style Sheets (CHSS) in October 1994, a language which has some resemblance to today's CSS. Bert Bos was working on a browser called Argo which used its own style sheet language, Stream-based Style Sheet Proposal (SSP). Lie and Bos worked together to develop the CSS standard (the 'H' was removed from the name because these style sheets could be applied to other markup languages besides HTML).

Unlike existing style languages like DSSSL and FOSI, CSS allowed a document's style to be influenced by multiple style sheets. One style sheet could inherit or "cascade" from another, permitting a mixture of stylistic preferences controlled equally by the site designer and user.

Håkon's proposal was presented at the "Mosaic and the Web" conference in Chicago, Illinois in 1994, and again with Bert Bos in 1995. Around this time, the World Wide Web Consortium was being established; the W3C took an interest in the development of CSS, and it organized a workshop toward that end chaired by Steven Pemberton. This resulted in W3C adding work on CSS to the deliverables of the HTML editorial review board (ERB). Håkon and Bert were the primary technical staff on this aspect of the project, with additional members, including Thomas Reardon of Microsoft, participating as well. By the end of 1996, CSS was ready to become official, and the CSS level 1 Recommendation was published in December.

Development of HTML, CSS, and the DOM had all been taking place in one group, the HTML Editorial Review Board (ERB). Early in 1997, the ERB was split into three working groups: HTML Working group, chaired by Dan Connolly of W3C; DOM Working group, chaired by Lauren Wood of SoftQuad; and CSS Working group, chaired by Chris Lilley of W3C.

The CSS Working Group began tackling issues that had not been addressed with CSS level 1, resulting in the creation of CSS level 2 on November 4, 1997. It was published as a W3C Recommendation on May 12, 1998. CSS level 3, which was started in 1998, is still under development as of 2009.

In 2005 the CSS Working Groups decided to enforce the requirements for standards more strictly. This meant that already published standards like CSS 2.1, CSS 3 Selectors and CSS 3 Text were pulled back from Candidate Recommendation to Working Draft level.

Difficulty with adoption

Although the CSS1 specification was completed in 1996 and Microsoft's Internet Explorer 3 was released in that year featuring some limited support for CSS, it would be more than three years before any web browser achieved near-full implementation of the specification. Internet Explorer 5.0 for the Macintosh, shipped in March 2000, was the first browser to have full (better than 99 percent) CSS1 support[citation needed], surpassing Opera, which had been the leader since its introduction of CSS support 15 months earlier. Other browsers followed soon afterwards, and many of them additionally implemented parts of CSS2. As of July 2008, no (finished) browser has fully implemented CSS2, with implementation levels varying (see Comparison of layout engines (CSS)).

Even though early browsers such as Internet Explorer 3 and 4, and Netscape 4.x had support for CSS, it was typically incomplete and afflicted with serious bugs. This was a serious obstacle for the adoption of CSS.

When later 'version 5' browsers began to offer a fairly full implementation of CSS, they were still incorrect in certain areas and were fraught with inconsistencies, bugs and other quirks. The proliferation of such CSS-related inconsistencies and even the variation in feature support has made it difficult for designers to achieve a consistent appearance across platforms. Some authors commonly resort to using some workarounds such as CSS hacks and CSS filters in order to obtain consistent results across web browsers and platforms.

Problems with browsers' patchy adoption of CSS along with errata in the original specification led the W3C to revise the CSS2 standard into CSS2.1, which may be regarded as something nearer to a working snapshot of current CSS support in HTML browsers. Some CSS2 properties which no browser had successfully implemented were dropped, and in a few cases, defined behaviours were changed to bring the standard into line with the predominant existing implementations. CSS2.1 became a Candidate Recommendation on February 25, 2004, but CSS2.1 was pulled back to Working Draft status on June 13, 2005,[3] and only returned to Candidate Recommendation status on July 19, 2007.[4]

In the past, some web servers were configured to serve all documents with the filename extension .css as mime type application/x-pointplus rather than text/css. At the time, the Net-Scene company was selling PointPlus Maker to convert PowerPoint files into Compact Slide Show files (using a .css extension).[citation needed]

Variations

CSS has various levels and profiles. Each level of CSS builds upon the last, typically adding new features and typically denoted as CSS1, CSS2, and CSS3. Profiles are typically a subset of one or more levels of CSS built for a particular device or user interface. Currently there are profiles for mobile devices, printers, and television sets. Profiles should not be confused with media types which were added in CSS2.

CSS 1

The first CSS specification to become an official W3C Recommendation is CSS level 1, published in December 1996.[5] Among its capabilities are support for:

  • Font properties such as typeface and emphasis
  • Color of text, backgrounds, and other elements
  • Text attributes such as spacing between words, letters, and lines of text
  • Alignment of text, images, tables and other elements
  • Margin, border, padding, and positioning for most elements
  • Unique identification and generic classification of groups of attributes

The W3C maintains the CSS1 Recommendation.[6]

CSS 2

CSS level 2 was developed by the W3C and published as a Recommendation in May 1998. A superset of CSS1, CSS2 includes a number of new capabilities like absolute, relative, and fixed positioning of elements, the concept of media types, support for aural style sheets and bidirectional text, and new font properties such as shadows. The W3C maintains the CSS2 Recommendation.[7]

CSS level 2 revision 1 or CSS 2.1 fixes errors in CSS2, removes poorly-supported features and adds already-implemented browser extensions to the specification. While it was a Candidate Recommendation for several months, on June 15, 2005 it was reverted to a working draft for further review.[8] It was returned to Candidate Recommendation status on 19 July 2007.

CSS 3

CSS level 3 is currently under development.[9] The W3C maintains a CSS3 progress report. CSS3 is modularized and will consist of several separate Recommendations. The W3C CSS3 Roadmap provides a summary and introduction.[10]

Browser support

A CSS filter[11] is a coding technique that aims to effectively hide or show parts of the CSS to different browsers, either by exploiting CSS-handling quirks or bugs in the browser, or by taking advantage of lack of support for parts of the CSS specifications. Using CSS filters, some designers have gone as far as delivering entirely different CSS to certain browsers in order to ensure that designs are rendered as expected. Because very early web browsers were either completely incapable of handling CSS, or render CSS very poorly, designers today often routinely use CSS filters that completely prevent these browsers from accessing any of the CSS. Internet Explorer support for CSS began with IE 3.0 and increased progressively with each version. By 2008, the first Beta of Internet Explorer 8 offered support for CSS 2.1 in its best web standards mode.

An example of a well-known CSS browser bug is the Internet Explorer box model bug, where box widths are interpreted incorrectly in several versions of the browser, resulting in blocks which are too narrow when viewed in Internet Explorer, but correct in standards-compliant browsers. The bug can be avoided in Internet Explorer 6 by using the correct doctype in (X)HTML documents. CSS hacks and CSS filters are used to compensate for bugs such as this, just one of hundreds of CSS bugs that have been documented in various versions of Netscape, Mozilla Firefox, Opera, and Internet Explorer (including Internet Explorer 7).[12][13]

Even when the availability of CSS-capable browsers made CSS a viable technology, the adoption of CSS was still held back by designers' struggles with browsers' incorrect CSS implementation and patchy CSS support. Even today, these problems continue to make the business of CSS design more complex and costly than it should be, and cross-browser testing remains a necessity. Other reasons for continuing non-adoption of CSS are: its perceived complexity, authors' lack of familiarity with CSS syntax and required techniques, poor support from authoring tools, the risks posed by inconsistency between browsers and the increased costs of testing.

Currently there is strong competition between Mozilla's Gecko layout engine, the WebKit layout engine used in Apple's Safari, the similar KHTML engine used in KDE's Konqueror browser, and Opera's Presto layout engine - each of them is leading in different aspects of CSS. As of 2007, Internet Explorer's Trident engine remains the worst at rendering CSS as judged by World Wide Web Consortium standards. [14] [15] In April 2008 Internet Explorer 8 beta fixes many of these shortcomings and renders CSS 2.1.[citation needed] The IEBlog claims that it passes some versions of the ACID2 test.[16]

Friday, February 20, 2009

...Let's Clarify!

(HyperText Markup Language) The document format used on the Web. Web pages are built with HTML tags (codes) embedded in the text. HTML defines the page layout, fonts and graphic elements as well as the hypertext links to other documents on the Web. Each link contains the URL, or address, of a Web page residing on the same server or any server worldwide, hence "World Wide" Web.

HTML 2.0 was defined by the Internet Engineering Task Force (IETF) with a basic set of features, including interactive forms capability. Subsequent versions added more features such as blinking text, custom backgrounds and tables of contents. However, each new version requires agreement on the tags used, and browsers must be modified to implement those tags. See HTML tag.

HTML Itself Is Not a Programming Language

HTML is a markup language (the ML in HTML) that uses a fixed set of markup tags. A markup language can also be thought of as a "presentation language," but it is not a programming language. You cannot "if this-do that" like you can in Java, JavaScript or C++. However, in order to make pages interactive, programming code can be embedded in an HTML page. For example, JavaScript is widely interspersed in Web pages (HTML pages) for that purpose. See JavaScript and VBScript.

HTML was conceived as a simple markup language to render research documents. No one originally envisioned Web pages turning into multimedia extravaganzas. HTML pages have been reworked, jury-rigged and extended into full-blown applications. As a result, the source code behind today's Web pages is often a hideous concoction of tags and scripting. See HTML tag, XML, XHTML and SGML.

World Wide Web Linking
Accessing a Web document requires typing in the address, or URL (Uniform Resource Locator), of the home page in your Web browser. The home page is an HTML document, which contains hypertext links to other HTML documents that can be stored on the same server or on a server anywhere in the world.
Web Server Fundamentals
Web browsers communicate with Web servers via the TCP/IP protocol. The browser sends HTTP requests to the server, which responds with HTML pages and possibly additional programs in the form of ActiveX controls or Java applets.

Thursday, February 19, 2009

CSS


Cascading Style Sheets (CSS)


Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can be applied to any kind of XML document, including SVG and XUL.

CSS can be used locally by the readers of web pages to define colors, fonts, layout, and other aspects of document presentation. It is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation (written in CSS). This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, and reduce complexity and repetition in the structural content (such as by allowing for tableless web design). CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on Braille-based, tactile devices. CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.

Use of CSS

Prior to CSS, nearly all of the presentational attributes of HTML documents were contained within the HTML markup; all font colors, background styles, element alignments, borders and sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to move much of that information to a separate stylesheet resulting in considerably simpler HTML markup.

Headings (h1 elements), sub-headings (h2), sub-sub-headings (h3), etc., are defined structurally using HTML. In print and on the screen, choice of font, size, color and emphasis for these elements is presentational.

Prior to CSS, document authors who wanted to assign such typographic characteristics to, say, all h2 headings had to use the HTML font and other presentational elements for each occurrence of that heading type. The additional presentational markup in the HTML made documents more complex, and generally more difficult to maintain. In CSS, presentation is separated from structure. In print, CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics. It can do so independently for on-screen and printed views. CSS also defines non-visual styles such as the speed and emphasis with which text is read out by aural text readers. The W3C now considers the advantages of CSS for defining all aspects of the presentation of HTML pages to be superior to other methods. It has therefore deprecated the use of all the original presentational HTML markup.

it's new

CSS

What is CSS?
  • CSS stands for Cascading Style Sheets
  • Styles define how to display HTML elements
  • Styles are normally stored in Style Sheets
  • Styles were added to HTML 4.0 to solve a problem
  • External Style Sheets can save you a lot of work
  • External Style Sheets are stored in CSS files
  • Multiple style definitions will cascade into one

Cascading is something that makes CSS even more powerful. Style sheets cascade when The Web Writer or user (or both) have created an order of precedence for the browser to apply the style rules in multiple sheets. The style rule or sheet that has the highest precedence is the one that is used. The following list is a simplification of how your browser decides precedence for a style:

  1. Look for the style element that is created, if it is not in the document, use the default rules in the browser.
  2. Determine if any of the style rules are marked as important and apply those to the appropriate elements.
  3. Any style rules in the document will have precedence over the default browser settings.
  4. The more specific the style rule, the higher the precedence it will have.
  5. Finally, if two rules apply to the same element, the one that was loaded last will have the highest precedence.

History

Style sheets have existed in one form or another since the beginnings of SGML in the 1970s. Cascading Style Sheets were developed as a means for creating a consistent approach to providing style information for web documents.

As HTML grew, it came to encompass a wider variety of stylistic capabilities to meet the demands of web developers. This evolution gave the designer more control over site appearance but at the cost of HTML becoming more complex to write and maintain. Variations in web browser implementations made consistent site appearance difficult, and users had less control over how web content was displayed.

To improve the capabilities of web presentation, nine different style sheet languages were proposed to the W3C's www-style mailing list. Of the nine proposals, two were chosen as the foundation for what became CSS: Cascading HTML Style Sheets (CHSS) and Stream-based Style Sheet Proposal (SSP). First, Håkon Wium Lie (now the CTO of Opera Software) proposed Cascading HTML Style Sheets (CHSS) in October 1994, a language which has some resemblance to today's CSS. Bert Bos was working on a browser called Argo which used its own style sheet language, Stream-based Style Sheet Proposal (SSP). Lie and Bos worked together to develop the CSS standard (the 'H' was removed from the name because these style sheets could be applied to other markup languages besides HTML).

Unlike existing style languages like DSSSL and FOSI, CSS allowed a document's style to be influenced by multiple style sheets. One style sheet could inherit or "cascade" from another, permitting a mixture of stylistic preferences controlled equally by the site designer and user.

Håkon's proposal was presented at the "Mosaic and the Web" conference in Chicago, Illinois in 1994, and again with Bert Bos in 1995. Around this time, the World Wide Web Consortium was being established; the W3C took an interest in the development of CSS, and it organized a workshop toward that end chaired by Steven Pemberton. This resulted in W3C adding work on CSS to the deliverables of the HTML editorial review board (ERB). Håkon and Bert were the primary technical staff on this aspect of the project, with additional members, including Thomas Reardon of Microsoft, participating as well. By the end of 1996, CSS was ready to become official, and the CSS level 1 Recommendation was published in December.

Development of HTML, CSS, and the DOM had all been taking place in one group, the HTML Editorial Review Board (ERB). Early in 1997, the ERB was split into three working groups: HTML Working group, chaired by Dan Connolly of W3C; DOM Working group, chaired by Lauren Wood of SoftQuad; and CSS Working group, chaired by Chris Lilley of W3C.

The CSS Working Group began tackling issues that had not been addressed with CSS level 1, resulting in the creation of CSS level 2 on November 4, 1997. It was published as a W3C Recommendation on May 12, 1998. CSS level 3, which was started in 1998, is still under development as of 2009.

In 2005 the CSS Working Groups decided to enforce the requirements for standards more strictly. This meant that already published standards like CSS 2.1, CSS 3 Selectors and CSS 3 Text were pulled back from Candidate Recommendation to Working Draft level.

timeline ...

HTML

HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document — by denoting certain text as links, headings, paragraphs, lists, and so on — and to supplement that text with interactive forms, embedded images, and other objects. HTML is written in the form of tags, surrounded by angle brackets. HTML can also describe, to some degree, the appearance and semantics of a document, and can include embedded scripting language code (such as JavaScript) which can affect the behavior of Web browsers and other HTML processors.

HISTORY OF HTML

Origins

In 1980, physicist Tim Berners-Lee, who was an independent contractor at CERN, proposed and prototyped ENQUIRE, a system for CERN researchers to use and share documents. In 1989, Berners-Lee and CERN data systems engineer Robert Cailliau each submitted separate proposals for an Internet-based hypertext system providing similar functionality. The following year, they collaborated on a joint proposal, the WorldWideWeb (W3) project, which was accepted by CERN.

First specifications

The first publicly available description of HTML was a document called HTML Tags, first mentioned on the Internet by Berners-Lee in late 1991. It describes 22 elements comprising the initial, relatively simple design of HTML. Thirteen of these elements still exist in HTML 4.


Berners-Lee considered HTML to be, at the time, an application of SGML, but it was not formally defined as such until the mid-1993 publication, by the IETF, of the first proposal for an HTML specification: Berners-Lee and Dan Connolly's "Hypertext Markup Language (HTML)" Internet-Draft, which included an SGML Document Type Definition to define the grammar.[5] The draft expired after six months, but was notable for its acknowledgment of the NCSA Mosaic browser's custom tag for embedding in-line images, reflecting the IETF's philosophy of basing standards on successful prototypes.Similarly, Dave Raggett's competing Internet-Draft, "HTML+ (Hypertext Markup Format)", from late 1993, suggested standardizing already-implemented features like tables and fill-out forms.


After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group, which in 1995 completed "HTML 2.0", the first HTML specification intended to be treated as a standard against which future implementations should be based.Published as Request for Comments 1866, HTML 2.0 included ideas from the HTML and HTML+ drafts. There was no "HTML 1.0"; the 2.0 designation was intended to distinguish the new edition from previous drafts.


Further development under the auspices of the IETF was stalled by competing interests. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the World Wide Web Consortium (W3C).However, in 2000, HTML also became an international standard (ISO/IEC 15445:2000). The last HTML specification published by the W3C is the HTML 4.01 Recommendation, published in late 1999. Its issues and errors were last acknowledged by errata published in 2001.