-
Step 1
Open an ASP page. Each ASP file that you create needs to have the CSS file linked in its header information. Open the file in which you want to insert the code.
-
Step 2
Save the CSS file. If you haven't already saved the file, save your class file in the directory where the ASP pages are located. The common name to use when saving a CSS file is styles.css.
-
Step 3
Insert the link code. Place the following code in your ASP page:
<link rel="stylesheet" type="text/css" href="styles.css">
This code must be placed between the title tags. The following is a sample of what the initial ASP code would look like:
<html>
<head>
<title>My First CSS Class File Link</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
My CSS file class.
</body>
</html> -
Step 4
Save the ASP file. Press the "Ctrl" and "S" keys at the same time to save the current ASP file.
-
Step 5
Test your code. Open your website in a browser to verify the link to the style class file. If your website reflects changes made in the CSS file, then you've correctly placed the HTML code in the ASP file.











