- You are here:
- WebsiteTips Home
- Articles, Tutorials, Tips
- CSS
- Convert Content to CSS
- Step 2
Converting Existing Content to CSS, Step 2
CSS Style Blocks
by Shirley E. Kaiser, M.A., SKDesigns
Copyright © 2001-2021, Shirley E. Kaiser, M.A., SKDesigns. All rights reserved. Published at websitetips.com with permission.
For Step 2 of this tutorial we'll set up a style block within the sample Web page using the style
element between the head
element tags of the document. This will define the styles for your sample page. Later in this tutorial are instructions for using an external style sheet, too.
On this page:
To add a style block to your Web page, you'll use the style
element tags placed between the head
element tags of your Web page, as highlighted below:
<head>
<style type="text/css">
</style>
</head>
<body>
Your markup should now look like this (the new style block markup is shown in bold and the color red:
Markup with style block added. (A separate window will open.)
Now we're ready to start adding elements to your style block.