Linked Style Sheets
Linked style sheets are placed in a separate text file and saved in the root directory.
The file is saved with a css extension.
The link to the file is placed in the head section of each document.
Linked style sheets contribute to the creation of consistency throughout your web pages.
Code in Head Section:
<head>
<link rel="stylesheet" href="mystyle.css" type="text/css">
</head>
Example of lines in mystyle.css text file:
body {
max-width: 1200px;
margin: 0 auto;
font-family: Arial, sans-serif ;
font-size : 18px ;
color: #000000
}
p {
text-indent : 16px;
text-align: left}
h1 {
font-size : 22px;
text-align :center
}
strong{
font-weight : 700;
color: #876541
}
p.red{ font-weight : 600;
color : #ff0000
}
#reddiv {
width: 100%;
background: #ff3300
}
See also: Class Attribute
Free Tools We Recommend
- Free Ebook How to Code in HTML5 and CSS3
- "How to Code in HTML5 and CSS3" is a free e-book about making websites in HTML5 and CSS for absolute beginners. It doesn't require any experience in IT to start....
- Free Logo Generator Turbologo.com
- If you are building a website for business you need to begin thinking about creating a brand identity. An unforgettable logo could be just the start you need. You can create it free at Turbologo.com. They also provide generators for business cards and letterheads.
- FREE HTML Editor (Windows): NoteTab Light
- All the features of a commercial HTML editor.
- FREE Apache Server (Windows): IndigoAmpp
- Set up a real time server environment right on your PC. Test forms and scripts before uploading to your web space.
- Linux Users
- If like us, you've left the insane world of Microsoft Windows for the even worse experience of Linux, we recommend the BlueFish HTML editor. You'll find it in your software repository. It does have some QUIRKS, but it's FREE.
- For image resizing we've found the easiest Linux tool to be Krita.