Tech News

The ABCs of CSS |CSS Fulfills a Promise

Improving HTML

CSS (Cascading Style Sheets) was a technology recommended by the World Wide Web Consortium (W3C) in 1996. An easy way to understand the purpose of CSS is to view it as an addition to HTML that helps simplify and improve Web page design. In fact, some CSS effects are not possible via HTML alone. Another advantage of CSS is that it allows you to specify a style once, but the browser can apply that style many times in a document. For example, if you want some of the pictures displayed in your Web site to have a thin, blue frame around them, you can define this frame as a style in your CSS. Then, instead of having to repeat an HTML definition of the thin and blue frame — each and every time you want that particular frame — you can merely insert the CSS style as an attribute for each graphic element that you want framing.

Getting Efficient with CSS

Defining a style in one location as CSS does has several advantages. First, it eliminates redundancy: You don’t have to keep specifying its font size and color each time you use the

Tag in your document, for example. That makes Web page code easier to read and to modify later. If you’re familiar with computer programming, think of a simple CSS style rule as something like a programming language constant: You specify, for example, the local tax rate by making up a name such as Local Tax, and then assigning a value to it like this: Constant Local Tax = .07. Thereafter, throughout your program, you don’t need to repeatedly specify the .07. You merely use the constant’s name Local Tax.

Changing Web design for the better

HTML originally was designed to work something like an outline, specifying the structure of a document, without too much attention paid to the actual visual style, or design, of the document. An outline merely organizes ideas hierarchically: A, B, C, and so on are the major ideas. Within those categories, you have subdivisions such as 1, 2, 3, and 4 and even lower divisions such as a, b, c, d, and so on. The equivalent outline structure in HTML is described with various headline levels such as H1, H2, H3, and so on.

Being ready for anything

Of course, you’ll never have absolute control over Web pages if you create sites for the Internet. There will never be a truly stable, single, predictable display for Web pages. Why? Because, like some celebrities, a Web page never knows where it’s going to end up from minute to minute. It has to be prepared to be on display in all kinds of situations.

Designers Want to Design

It’s not surprising that designers, not to mention marketing people, want to build attractive Web pages. Color, transition effects, and even various kinds of animation and other special effects are all desirable attributes and, designers say, necessary goals in a competitive world.

Where CSS Fits with the Tools You Already Use

You can write a style sheet using any plain text editor, such as Notepad. However, you can also use specialized CSS editors that offer shortcuts to the creation of a style sheet. With editors like Microsoft’s Visual Studio or Top Style Pro from Magi Internet Studio, you can, for example, choose a text color from a palette, drag and drop a graphic from a toolbox, or select a font size from a list. Then the editor automatically translates your choices (generally made by dragging and dropping or clicking with the mouse) into the text descriptions that make up a style sheet. For such activities as moving page elements around to find the most attractive layout, mouse dragging can be a real-time-saver.

Lastly Comment

As an example of the great variety of effects available via filters, consider transition wipes. Transition wipes — just one of many kinds of effects you can use — provide smooth connections between two elements. These wipes are used in films and video as a way of moving from scene to scene, indicating moving through space or the passage of time, or some other transitional behavior — such as between reality and a dream. You can use them in Web pages for similar purposes.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button