Basic CSS document
Programming Stuff :: HTML :: CSS
Page 1 of 1 • Share •
Basic CSS document
Cascading Style Sheet
is mostly used to get the same style for text in all the html pages of ure website, and to change it on an easy way because if you change stylesheet (CSS) it will also change all the pages where you used it.
now if you want to use this in a HTML file you need to add this line into the HTML file;
between the <head></head> tags
to get some part of text use the stylesheet but the part you made around it so for as an example html file you would get something like this:
note: you cant use every name you want as an CSS part.. so sometimes it doesnt work then you should change the name.
is mostly used to get the same style for text in all the html pages of ure website, and to change it on an easy way because if you change stylesheet (CSS) it will also change all the pages where you used it.
- Code:
a
{
font-family: sans-serif;
color: red;
text-align: left;
font-size: 12pt
}
q
{
font-family: arial;
color: purple;
text-align: left;
font-size: 14pt
}
b
{
font-family: sans-serif;
color: yellow;
text-align: left;
font-size: 16pt
}
body
{
font-family: arial;
color: blue;
text-align: left;
font-size: 18pt
}
now if you want to use this in a HTML file you need to add this line into the HTML file;
- Code:
<link rel="stylesheet" href="style.css" type="text/css" />
between the <head></head> tags
to get some part of text use the stylesheet but the part you made around it so for as an example html file you would get something like this:
- Code:
<html>
<head>
<title>CSS</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<br>
<br>
<a> This is CSS style - A</a>
<br>
<b> This is CSS style - B</b>
<br>
<q> This is CSS style - Q</q>
<br>
<body> This is CSS style-Body</body>
</body>
</html>
note: you cant use every name you want as an CSS part.. so sometimes it doesnt work then you should change the name.

Robin- Moderator

- Number of posts: 11
Age: 18
Location: Holland
Registration date: 2008-08-31
Permissions of this forum:
You cannot reply to topics in this forum





