Jump to content

How to link HTML page to CSS file


winwin

Recommended Posts

Hi,I'm new to this forum and very much new to web site designing. Resently I came to know that by using CSS one can save a lot of time in redesigning or maintaining a site.Could someone please explain me how to creat this CSS file and how to link HTML pages to this CSS file.I have little knowledge about CSS but don't know how to link these two ( CSS and HTML)

Link to comment
Share on other sites

create a css file, save as lets say "styles.css"make sure the css file is in the same directory as your html fileinclude:<link href="styles.css" rel="stylesheet" type="text/css">in the document HEAD of the html file.e.g.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html lang="en"><head><title>#</title><link href="styles.css" rel="stylesheet" type="text/css"></head><body>etc. etc.

Link to comment
Share on other sites

Hi,I'm new to this forum and very much new to web site designing. Resently I came to know that by using CSS one can save a lot of time in redesigning or maintaining a site.Could someone please explain me how to creat this CSS file and how to link HTML pages to this CSS file.I have little knowledge about CSS but don't know how to link these two ( CSS and HTML)
Hi Win WinI'm also new to CSS. I can highly reccomend the tutorials in W3Schools. ALso once you sort of know what you're looking for, just google for it and you'll find quite a few CSS templates out there that you can modify and customise to suit your needs. I have found this the best way to get to grips with CSS. Also, I use an HTML editor with a built in viewer, this is a great way of seeing your changes straight away without having to upload them to a server or open a seperate browser.
Link to comment
Share on other sites

Also, I use an HTML editor with a built in viewer, this is a great way of seeing your changes straight away without having to upload them to a server or open a seperate browser.
You just need both your text editor and your browser open, make a change hit f5 see the change. takes no time at all. And hand coding allows for greater control, flexibility & more efficient code. Well in my experience anyway.
Link to comment
Share on other sites

....but not so easy when you're learining, the editor I use is a code editor but has common stuff built in such as 'insert image'. I find it a good way of learning some of the more common markup. I've no doubt that as you become more experienced the need for this goes away.But then everybody is different I guess.

Link to comment
Share on other sites

Ok now let me ask one thing in W3school CSS tutorials they have given the html coding part but not CSS coding part.So I'm confused how to get the CSS and HTML code for the same thing?Found another site www.howtocreate.co.uk/tutorials/css

Hi Win WinI'm also new to CSS. I can highly reccomend the tutorials in W3Schools. ALso once you sort of know what you're looking for, just google for it and you'll find quite a few CSS templates out there that you can modify and customise to suit your needs. I have found this the best way to get to grips with CSS. Also, I use an HTML editor with a built in viewer, this is a great way of seeing your changes straight away without having to upload them to a server or open a seperate browser.
Thanks hp1 !I just didn't come to my mind, now i'm searching the codes on google and find it very easy and convenient.can you tell me which HTML editor you are using?
Link to comment
Share on other sites

in W3school CSS tutorials they have given the html coding part but not CSS coding part.
what? w3schools has probably got the most comprehensive css tutorials on the net
Link to comment
Share on other sites

Link to comment
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...