You can apply CSS to an HTML document. There are three different ways to do this
1.The In-line /the attribute style
You can apply CSS to HTML by using the HTML attribute style. It can be applied this way:
<html>
<head>
<title>Ex.</title>
</head>
<body style="background-color: #FF0000;">
<p>Usinf the red page</p>
</body>
</html>
2. Internal /the tag style
You apply CSS codes using the HTML <style> tag. It would look like this:
<html>
<head>
<title>Ex.</title>
<style type="text/css">
body {background-color: #FF0000;}
</style>
</head>
<body>
<p>Red page</p>
</body>
</html>
3. External link to a style sheet
Another way to apply CSS into HTML is the external link to a style sheet. An external style sheet is a text file with the .css extension and you can place the style sheet on your hard disk or web server.
If you have the file style1.css as your style file it’s saved in the folder stylefolder. Create a link from your default.htm HTML document to the style.css style sheet. You can do this using the below HTML code:
<head>
<link rel="stylesheet" type="text/css" href="stylefolder/style1.css" />
</head>
How to Apply CSS to HTML documents
You can apply CSS to an HTML document. There are three different ways to do this
1.The In-line /the...
apply css documents html
Also tagged with one or more of these keywords: apply css, documents, html
Web Design →
CSS / HTML →
What files do I have to upload if I win a contest: vector or html?Started by webdev01, 06 Dec 2015 html, contest |
|
|
||
Web Design →
CSS / HTML →
Validating a check box in HTMLStarted by DesGuru, 07 Aug 2013 html, validating check box |
|
|
||
General chat →
Introduce Yourself →
New Member as Designer - Pleased to Meet You AllStarted by bumper22, 13 Jan 2013 design, design portfolio and 3 more... |
|
|
||
Web Design →
CSS / HTML →
Creating a moving navigation bar in HTMLStarted by OneDes, 11 Dec 2012 html, moving navigation bar |
|
|
||
Web Design →
CSS / HTML →
Converting a Word Documents to HTMLStarted by SmartWeb, 04 Dec 2012 converting word documents, html |
|
|
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users