Changing my site from html to css

K

kundrol

My website is currently in html and I want to change to CSS in order to clean
up the code, which is a mess. I've done the tutorial on CSS and understand
the basics, but don't see how to make the change over.
 
T

Trevor Lawrence

kundrol said:
My website is currently in html and I want to change to CSS in order to
clean
up the code, which is a mess. I've done the tutorial on CSS and understand
the basics, but don't see how to make the change over.

kundrol,
I can see all your posts together with the one that says you can't see the
posts

Anyway. all websites use HTML. CSS supports the HTML by using styles instead
of the HTML tag attributes. You can't "convert" it to HTML. What you can do
is remove attributes from the HTML tags and put them into CSS.

http://www.w3schools.com/ is a good resource
 
J

Jens Peter Karlsen

Open a page, remove outdated formatting markup (Like font=...) apply a
CSS stylesheet instead.

Regards Jens Peter Karlsen
 
K

kundrol

Trevor Lawrence said:
kundrol,
I can see all your posts together with the one that says you can't see the
posts

Anyway. all websites use HTML. CSS supports the HTML by using styles instead
of the HTML tag attributes. You can't "convert" it to HTML. What you can do
is remove attributes from the HTML tags and put them into CSS.

http://www.w3schools.com/ is a good resource

--
Trevor Lawrence
Canberra
Web Site http://trevorl.mvps.org


OK That makes sense. Thank you! So I don't have to redo all the pages starting with a style sheet as it says in the tutorial. I'm wondering if someone can give me an example of changing an html tag into css?
 
K

kundrol

Jens Peter Karlsen said:
Open a page, remove outdated formatting markup (Like font=...) apply a
CSS stylesheet instead.

Regards Jens Peter Karlsen

OK I'll try that. Thank you!
 
T

Trevor Lawrence

kundrol said:
OK That makes sense. Thank you! So I don't have to redo all the pages
starting with a style sheet as it says in the tutorial. I'm wondering if
someone can give me an example of > changing an html tag into css?

Well, this is a very simple example but if you had
<td id="part1" border="1px" width="30%" >

you could write
<td id="part1" >

and put this CSS in the <head> section

<style type="text/css">
td {border:1px; width: 30%;}
</style>

or you could apply the style to the id by
<style type="text/css">
#part1 {border:1px; width: 30%;}
</style>

or even to by tag name and id
<style type="text/css">
td#part1 {border:1px; width: 30%;}
</style>

Not all names (e.g border , width) are the same in CSS and in the tag
atributes, but w3schools should help. Start here
http://www.w3schools.com/css/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top