Adding CSS to a HTML doc?
Ive written some basic html and have downloaded a free CSS template. How do combine the html with css so it is one file and can be previewed in a browser?
Public Comments
- Put both files in the same directory. Suppose your CSS file is called style.css. Then, you can get the HTML page to load the template by adding the following line of code to the <head></head> section of your HTML: <link rel="stylesheet" type="text/css" href="style.css"> If you don't have a head section, add it under the <html></html> section.
- Just linking to the CSS template is not going to make it work. You will have to go through the CSS file noting the style calls for the selector names and whether it is calling any images as background images. If you plan on using these images, then you need to have the in the same place as the CSS path shows or edit the path. You will have to closely work between your HTML file and the CSS file to get your page laid out according to the template. Ron
Powered by Yahoo! Answers