Jump to content
xisto Community
Sign in to follow this  
KansukeKojima

Css Basics No.2 More basics of css

Recommended Posts

Well, if you found the first one useful, here you go.

 

CSS Basics No. 2

 

Description

Welcome to CSS Basics No. 2! In Basics No. 1 you learned how to write a simple CSS document. In this tutorial you will learn to apply what is in your CSS document to your webpages!

 

Try It Out

With CSS you have two methods of incorporating CSS into your webpages: an internal stylesheet, or an external stylesheet. First, we will cover the internal style-sheet.

 

The Internal Stylesheet

The internal stylesheet allows you to edit the entities of a single page. This is still quite useful, however, it is best used for single pages, or at least small website. Unless you enjoy a nice glass of workahol, then I'm sure you do not want to go through and edit every page on your website when you want to make a simple style change. O.K. we are ready to move onto the code :]

 

Example

<html>
<head>
<style>
Your CSS goes here.
</style>
</head>
<body>
Your content goes here.
</body>
</html>

 

Simple enough, place the style tags inbetween the head tags, then write your style code and content. Next we'll move onto the external stylesheet.

 

The External Stylesheet

CSS was created to make large chages to a websites style quickly and efficiently. The External Stylesheet is the epitome of efficiency. With it, you can change one value, to edit an entire website. Amazing, eh?

 

Example

<html>
<head>
<link rel="stylesheet" href="location of css document" type="text/css">
</head>
<body>
Your content goes here.
</body>
</html>

 

Bassically, whatever is on the CSS file is now included on the webpage. Congratualations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.