Custom Search

Wednesday, October 21, 2009

Style Sheets CSS

There is a great deal of information on CSS all over the web. Since it’s a reasonably open web development methodology with lots of options this can quickly lead to confusion and frustration.
What is CSS? CSS is short for Cascading Style Sheets. It is a new web page layout method that has been added to HTML to give web developers more control over their design and content layout. Using CSS allows a designer to create a standard set of commands (either embedded inside the web page or from an external page) that controls the style of all subsequent pages. With CSS you can add style (fonts, colors, spacing, size. links) to web documents. More advanced techniques control the layout of the page without the use of tables or other cumbersome HTML. The most important thing for web designers to understand about CSS is that CSS separates the layout and the styles of a web page. This is often difficult for comprehend for web designers that are used to compiling their creative and HTML coding in a single web page document. Styles such as fonts, font sizes, margins, can be specified in one place, then the Web pages feed off this one master list, with the styles cascading throughout the page or an entire site.
What are the benefits of using CSS? Until recently web page layout was not an exact science. It has been managed by inventive designers who mastered table-based HTML layouts enough to create compelling sites. With CSS all of that has changed as standards are finally being set for the present and future of web design. CSS is beneficial to the designer because of the a fore mentioned control they have over their web site design and how it will be appear across platforms and browsers. Web sites designed in CSS are faster to change and update. Because the coding is reduced the pages are more efficient and require less bandwidth. Cost saving functions like these is causing businesses to demand CSS from their designers which are forcing less hold-out designers to convert because their clients demand it. The main benefit to designers and to companies is that CSS speeds the time it takes to develop and update site layouts. Communication is easier among multiple developers because the workflow is standardized. All in all, CSS is a development method that every designer will be using in the near future, and one that is very beneficial to everyone involved, from the designer through to the end user.
CSS RULES Cascading Style Sheets are a set of rules that govern the display of the document through a web browser. The rules simply are lines of command codes that tell the browser how to display the information. It is crucial with CSS to get the syntax of the command lines correct to keep any frustrating errors from popping up.
What does a rule look like?
The SELECTOR selects (determines) which HTML element you’re working with. HTML elements are common tags like <body>, <H1>,<p>. Often the selector is referred to as an element selector or a type selector. The DECLARATION tells the browser what to do with the Selected element. It consists of two parts: The PROPERTY, which identifies which attribute like font type, size and color, for example, is called into play. The VALUE, determines how the attribute works, in other words it causes the action that changes the font type, size and color to what the property asks for. A declaration is always signaled by a { bracket and is ended with a closing }. A property is separated by a : and a ; ends each declaration. An example of a Declaration:
Why does the code look like this? Browser can read the code in single lines or in staggered lines like the example above. The reason for the staggered line is so our eyes can more easily catch silly errors that can end up costing valuable programming time. Ok, so you're thinking that you could get the same result by just tagging <H1> each with <font color="blue" face="arial">. You could, but what if you have a 20 page site and you want to change the from blue to orange. With one simple change you can change the entire site, and quickly change it back if you hate the new look. That's the beauty of CSS.

Thursday, April 9, 2009

Example Tags

Example <html> tag
A simple HTML document, with the minimum of required tags:
<html>
<head>
<title> Title of the document </title>
</head>
<body>
The content of the document ......
</body>
</html>

Example <h1> to <h6> tag
The six different HTML headings:
<h1> This is heading 1 </h1>
<h2> This is heading 2 </h2>
<h3> This is heading 3 </h3>
<h4> This is heading 4 </h4>
<h5> This is heading 5 </h5>
<h6> This is heading 6 </h6>

Example <p> tag
A paragraph is marked up as follows:
<p> This is some text in a paragraph. </p>
<p align="left"> Paragraph text align to the left side. </p>
<p align="center"> Paragraph text align to center. </p>
<p align="justify"> Paragraph text align to justify. </p>

Example <br> tag
A line break is marked up as follows:
This text contains <br/> a line break.

Example <hr> tag
A horizental line is marked up as follows:
Some text here <hr/> and some text here. it make horizontal line between the text
Attribute are align (center, left, right)
noshade
size (specifies the thickness of the horizontal rule. value is in pixels)
width(specifies the width of the horizontal rule. value is in %)

<hr align="center" size =10 width=50% >

Tuesday, April 7, 2009

Lesson Three

TEXT LINKS

The tags used to produce links are the <a> and </a>.
The <a> tells where the link should start and the </a> indicates where the link ends.
Everything between these two will work as a link.
The target of the link is added to the <a> tag using
the href="http://www.whateverpage.com" setting.
The example below shows how to make the word here work as a link to yahoo
click <a hrep-"http://www.yahoo.com"> here </a> to go to yahool.
Click here to go to yahoo.
You simply:
• Specify the target in the <a href=" ">.
• Then add the text that should work as a link.
• Finally add an </a> tag to indicate where the link ends.

TEXT FORMAT

These are the tags for text formats:
<b>text</b> write text as bold
<i>text</i> write text in italics
<u>text</u> write underlined text
<sub>text</sub> lower text and makes it smaller
<sup>text</sup> lifts text and makes it smaller
<blink>text</blink> guess yourself! (Note: Netscape only.)
<strikek>text</strike> strikes a line through the text
<tt>text</tt> writes text as on a classic typewriter
<pre>
text
</pre>
writes text exactly as it is, including spaces.
<em>text</em> usually makes text italic.
<strong>text</strong> usually makes text bold.

TEXT SIZE

These are the tags for changing the font size.
<big>text</big> increase the size by one
<small>text</small> decrease the size by one
<h1>

text

</h1>
writes text in biggest heading
<h6>
text
</h6>
writes text in smallest heading
<font size="1">text</font> writes text in smallest fontsize. (8 pt)
<font size="7">text</font> writes text in biggest fontsize (36 pt).

Saturday, April 4, 2009

Lesson Two

Font
The <font> tag will change the font.
Example: How the output looks in the browser.
Hello! This is my First page.
This local text looks different.
This text looks like the first line.
HTML: The code to produce the above example.
<html>
<head>
<title>My Page</title>
</head>
<body>
<basefont color="green" face="arial" size="4">
Hello! This is my page.<br><br>
<font color="red" face="arial" size="2">
This local text looks different.
</font>
<br><br>
This text looks like the first line.
</body>
</html>

Lessson One

It is possible to create webpages without knowing anything about the HTML source behind the page.
There are excellent editors on the market that will take care of the HTML parts. All you need to do is layout the page.
However, if you want to make it above average in webdesign, it is strongly recommended that you understand these tags.
The most important benefits are:
• You can use tags the editor does not support.
• You can read the code of other people's pages, and "borrow" the cool effects.
• You can do the work yourself, when the editor simply refuses to create the effects you want.

All you need to do is type in the code, then save the document, making sure to put an .html extension or an .htm extension to the file (for instance "mypage.html").

Basically, a computer sees an "A" as simply an "A" - whether it is (bold, italic, big or small).
To tell the browser that an "A" should be bold we need to put a markup in front of the A.
Such a markup is called a Tag.
All HTML tags are enclosed in < and >.
Example: a piece of text as it appears on the screen.
This is an example of bold text.
HTML: the HTML for the above example:
This is an example of <b>bold</b> text.
As you can see, the start tag indicates that whatever follows should be written in bold. The corresponding end tag indicates that the browser should stop writing text in bold.

Page Structure

All normal webpages consist of a head and a body.
• The head is used for text and tags that do not show directly on the page.
• The body is used for text and tags that are shown directly on the page.
Finally, all webpages have an <html> tag at the beginning and the end, telling the browser where the document starts and where it stops.
The most basic code - the code you will use for any page you make, is shown below:
<html>
<head>
This section is for the title and technical information of the page
</head>
<body>
This section is for all that you want to show on the page.
</body>
</html>

The body of the document contains all that can be seen when the user loads the page.
In the rest of this tutorial you can learn in detail about all the different aspects of HTML, including:
 • Text
    Formatting
    Resizing
    Layout
    Listing

 • Links
    To local pages
    To pages at other sites
    To bookmarks
 
 • Images
    Inserting images (GIF and jpg)
    Adding a link to an image
 
 • Backgrounds
    Colors
    Images
    Fixed Image

 • Tables
 • Frames
 • Forms
 • Metatags
 • Hexadecimal Colors

Wednesday, March 25, 2009

Structure Tags

To use any of the following HTML tags, simply select the HTML code you'd like and copy and paste it into your web page.
Structure Tags
Function Start Tag Attribute Ending Tag
HTML File <html> none </html>
File header <head> none </head>
File title <title> none </title>
Comments <!--> Your comments go between the start and end tags. Put a space between the -- and your comments. <!-->
Body <body> background="filename"
bgcolor="color value"
text="color value"
link="color value"
vlink="color value
</body>
Division <div> align="right/left/center"
style="property:value;"
class="classname"
</div>
Span (inline) <span> style="property:value;"
class="classname"
</span>

Basic Text Tags

Basic Text Tags
Function Start Tag Attributes End Tag
Line Break <br> Clear="left/right/all" </br> or <br/>
Paragraph <p> align="center/right" </p>
Bold <b> none </b>
Italic <i> none </i>
Typewriter Text <tt> none </tt>
Headline <h1>to<h6> align="center/right" </h1> ---</h6>
Font <font> face="name, name"
size="+/-value/fixed size"
color="color value"
Note: the font tag is being phased out in favor of CSS styles.
</font>
Horizontal Rule <hr> size="XX"
width ="XX/XX%"
noshade
</hr> --- <hr/>
Block Quote <blockquote> none </blockquote>
Division <div> align="left/center/right" </div>