Jump to content
xisto Community

Simple Stylesheet Tutorial Stylesheet embedded in your site.

Recommended Posts

Hi - ill show you how to make a simple style sheet that will be embedded into your site.

OK make sure your site is set up already (like the standard tags)

To start and end off a stylesheet you need to do the following

<style type="text/css"></stlye>

Ok lets start

<style type="text/css">p{font-family: "Tahoma";font-size: 9;color: "red";} </style>

So when you come to put in

The text will appear red and will be in Tahoma.

I will now just show you how to change the background colour of the text.
<style type="text/css">span.hilightred {background-color: "red";}span.hilightblue {background-color: "blue";}span.hilightyellow {background-color: "yellow";}</style>

So when you do
<span class="highlightred">This colour is red!</span>

The text will then become higlighted red.

Share this post

Link to post
Share on other sites

Instead of an embedded style-sheet which is what you have posted above, I would recommend external stylesheets. Why you ask?


Lets say you want to make a change to the text color on your pages. You would have to go and edit every single file to make that change across your whole website. If you have 20 pages, it can be quite a waste of time.


With external stylesheets you can edit one file, and it adjusts all the pages linked to the stylesheet.


If you would like to learn more I highly suggest you read some of the materials here.



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

  • 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.