3 Ways of Applying Style Sheets to a Web Page

January 14th, 2009

I already gave you some basic CSS tutorial, but I’m pretty sure you’d like to know more. So, in this post I’m going to give you one more simple tutorial on CSS, specifically on applying style sheets to a web page.

Well, just to remind you – CSS or Cascading Style Sheets is a stylesheet language and the most common way to style HTML and XHTML pages.

There are a few ways to apply style sheets to a web page.

Inline styles:

To use inline styles you need to place a ’style’ attribute in a HTML tag. This attribute may assert any CSS information.

<p style=”color: white; font-sizer: 12pt”>
Web templates membership </p>

Remember: You need a ‘;’ to separate the properties.

Internal Style Sheets:

When a web master wants to give a  particular look to a particular web page that distinguishes from others in a web site he usually uses internal style sheets. Internal style sheets are usually placed between the head tags in a HTML document. CSS is applied with the use of <style> tags.

<head>
<style type=”text/css”>
body {background-color: #3e5e11;
text-family: arial;
text-size: 12pt}
</style>
</head>

External Style Sheets:

It’s probably the most popular way of applying style sheets to a web page. With external style sheets a separate document containing all the CSS information is created.
You need to place <link> tags in the HTML document so the browser can read the information from the style sheet document. The <link> tags are placed between the <head> tags.

<head>
<link rel= ”stylesheet” type=”text/css” href=”style.css” />
</head>

Insert the name of your style sheet file in the ‘href’ attribute and the browser will read the info in that file and format properly.
You have to save your style sheet file with the .css extension. As your style sheet document has already been saved as a CSS extension it doesn’t need any <style> tags.
Here’s an example of how a style sheet file can look like:

Quote:
body {background-image: url(“image/logo.jpg”);
font-family: arial;
font-size: 12pt}
p {color: green;
font-family: aria}
h1 {font-size: 14pt}

Well, these were 3 ways of applying style sheets to a web page. Now feel free to have a look on some of our CSS web templates.

The First Hot Update from LayoutsPack.com

July 15th, 2008

It hasn’t been long since we entered the market but we have been able to gain pretty many grateful customers who left their complimentary testimonials. Feeling inspired with them we started updating our collection as we promised.

The first item to be added is a Business Co flash animated template. Created in soft pale colors it conveys the idea of trustworthiness and stability.

A Business solutions flash animated template comes next in the row. It is a perfect solution for an online company.

A B2B flash animated template is a very stylish business layout. Created in red, green and white it is also Earth-centered with the image of our green planet.

The fourth in our update is again a Business company flash animated template, so, you see while enlarging our collection we take into consideration the demand and the recent trends in the market.

The last supplement to our range of web templates is a Real estate flash animated template. Convenient navigation and layout make this template a worthy item in our offer.

Here it is – the first update of our collection. It is going to be a regular thing at our website, so, follow our blog not to miss further updates.