CSS Basics

Example Tabs


CSS is

Basic format of CSS code:

3 ways of implementing code:

  1. In-line (the attribute style)
    <body style="background-color: #FF0000;">
  2. Internal (the tag style)
    <style type="text/css"> body {background-color: #FF0000;} </style>
  3. External (link to a style sheet)
    <link rel="stylesheet" type="text/css" href="style/style.css" >
    Note the css extention

Example of "calling an external CSS file
<html>
<head>
<title>My document</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
</head>
<body>

Example of external CSS file -- style.css
body {
background-color: #FF0000;
}

next page