Archive for the ‘Uncategorized’ Category

How does the CSS work? May 31st, 2009

admin

In this lesson you will learn how to create your first style sheet. They are the basic model of CSS to know and we will show what lines of code are needed to CSS in an HTML document.

Many of the properties specified in Cascading Style Sheets (CSS) are used in similar way to those of HTML. If you use HTML for layout purposes, you will probably recognize many codes. Let us consider a concrete example.

The basic syntax of CSS

Suppose we want a beautiful red color as the background for our web site. In HTML, we could have done the following: <body bgcolor=”#FF0000″>

With CSS, we reach the same result by: body (background-color: # FF0000;)

As you can see, the code in HTML and CSS is more or less identical. This example just shown you the basic CSS model.

Try it for yourself! Open Notepad (or the text editor of your choice) and create two files – an HTML document and a CSS file – with the following contents:

default.htm

<html>
<head>
<title> My Document </ title>
<link rel=”stylesheet” type=”text/css” href=”style.css” />
</ head>
<body>
<h1> My first stylesheet </ h1>
</ body>
</ html>

style.css

body (
background-color: # FF0000;
)

Now save both files in the same folder. Remember, save the files with correct extensions (“.Css” and “.Htm”). Open the default.htm in your browser and you will see that the page has a red background. Congratulations! You have just created your first stylesheet.

Continue reading...


 

What is the difference between CSS and HTML? May 27th, 2009

admin

A long long time, Madonna was a virgin and a guy called Tim Berners Lee invented the Internet. Then HTML was really only used for text structure. Author was able to highlight text, he could define it as “this is a headline” or “this is a text paragraph.” This was done with HTML tags such as <h1> <p> accomplished.

When the Internet became popular, designers tried to look for new ways to create layouts of online documents. That is why browser producers (at the time Netscape and Microsoft) invented new HTML tags.

This also led to a situation in which actual structural tags such as <table> applied to the layout of pages instead of the written structure have been abused. Many new layout tags, such as <blink> was only supported by one browser. Messages like: “You need browser X to view this page” or “Optimized for browser X” were more and more common.

CSS was invented to resolve this situation by providing web designers a tool to create adequate design, which all browsers supported. At the same time, the separation of appearance and content of a page became much more easier.

Continue reading...


 

Introduction to CSS May 25th, 2009

admin

Perhaps you have heard of CSS – but without really knowing what is behind it. In this lesson you will learn what CSS is and what CSS can do for you. CSS is the acronym for Cascading Style Sheets.

What can I do with CSS?

CSS is a style language, where the appearance of HTML documents is defined. CSS can be used to e.g. specify fonts, colors, edges, lines, heights, widths, background images, for advanced positioning and many other things to use.

HTML can be used for layout of web pages. But CSS offers more options and is also much more accurate and sophisticated. CSS is supported by all browsers.

After a few lessons of this tutorial, you will be able to use your own style sheets using CSS to create your web pages with a new great look.

What are the benefits of CSS to me?

CSS was a revolution in web design. The practical advantages are for example:

  • Control over the layout of many web pages from a single style sheet file;
  • Precise control over the layout;
  • Different layouts for different media types (screen, print, etc.);
  • A variety of advanced and sophisticated techniques.

In the next lesson we will look more closely at how CSS actually works and what is the best start.

Continue reading...