CASCADING STYLE SHEETS TUTORIAL
Written by jon on 9:21 AMIn this CSS tutorial I will not be able to show you everything there is about CSS, but you will learn how to create nice looking CSS styled web pages.
After completing this tutorial, you should have enough information to explore CSS and web design even further.
- You can download the CSS and HTML files we build in this tutorial: CSS files
- You can check out what the page should look like here: CSS example page
THINGS TO REMEMBER ABOUT CSS:
Remember that CSS code is simply written instructions that tells Web browsers (like FireFox and Internet Explorer) how to display things on a page. For example:
- make text bold.
- position things a page.
- set the font style for a page or paragraph etc.
The sister language to CSS is HTML: code that tells the Web browser WHAT is actually in the page.
... I know you knew that already, I just wanted to remind you!
CSS REDUCES THE NUMBER OF TAGS USED
Because of the power of CSS, we will be able to reduce the number of HTML tags we use in a page big time, all the while still being able to layout great looking pages using only 6 types (for lack of better words) of HTML tags.
The tags we will use to layout the content:
1.
tag and the least important in a
tag.
An example of a heading:
CSS Template Layout
This tells the browsers and the search engines too, that this page is primarily about: 'CSS Template Layout'
All browsers have a default size (for each
) because they come out too big. But never fear, CSS is here. We will use CSS to make the text sizes more to our liking.
2.
The Paragraph tag is used to mark parts of the pages as being 'paragraphs', simple enough. Paragraph tags are what they call a 'block element'; that means that it acts like a block where a space is automatically inserted before and after each
tag pair. You see it work in the examples coming up.
3.
- and
- List tags will used to create our menus. The tag
- is the 'un-ordered list tag' that creates a list with bullets or other images/icons that do not specify or denote an order; hence the term 'un-ordered'. The other list tag mentioned (
- ) is the 'ordered list tag' and it creates a list that, instead of bullets, the list elements are marked with numbers or letters. Code examples to follow.
4.
That covers the HTML tags we will use in our layout! No need for table tags,
tags and nasty tags.
THE BASIC PAGE TEMPLATE
font-family: Georgia, "Times New Roman", Times, serif;
list-style-image: url(../images/arrowSmall.gif);
font-family: Georgia, "Times New Roman", Times, serif;
font-family: Georgia, "Times New Roman", Times, serif;
border-bottom: 1px solid #C6EC8C;
/**************** Pseudo classes ****************/
/************************* ID's *************************/
border-right: 1px solid #C6EC8C;
padding: 0 0 20px 0; /*top right bottom left*/
In between the tags you will need to insert this code:
And in between the tags you will need to insert this:
0 comments: Responses to “ CASCADING STYLE SHEETS TUTORIAL ”