Wired

Webmonkey

  • Web Dev & Design
    • Ajax
    • Backend
    • Blog Publishing
    • CSS
    • Databases
    • Fonts
    • Frameworks
    • HTML
    • HTML 5
    • JavaScript
    • Mobile
    • Multimedia
    • Programming
    • Security
    • UI/UX
    • Web Standards
  • Software & Apps
    • Browsers
    • Software
    • Web Apps
  • Platform & APIs
    • APIs
    • Identity
    • Location
    • Social
    • Web Services
  • Reference
    • Color Charts
    • HTML Cheat Sheets
    • Special Characters
    • Glossary
    • Templates
    • Code Snippets
  • twitter
  • facebook
  • RSS Feeds
Feb 15 2010
File Under: CSS

Embedded Stylesheet

  • By Webmonkey Staff

This is a simple example of an embedded stylesheet. This code goes into the <head> of your HTML document.


Code and Explanation

<style type="text/css">

   body {

        text-align:center;

	height:100%;

	font-size:62.5%;

	font-family: Helvetica, arial, sans-serif;

	color: #000;

        background: #eceae1 url(/images/bg_body.png) repeat-x 0 0;

	margin: 0;

	padding: 0;

        }



  a {

       color:#007CA5;

       text-decoration:none;

       outline: none;

      }

   a:visited { color:#666; }

   a:active  { color:#999; }



   img       { border: 0px; }



   h1, .h1 { font-size: 2.4em;}

   h2, .h2 { font-size: 2em;} /* article headline 20pt */

   h3, .h3 { font-size: 1.8em;} /*  should be 18pt */



</style>

Tags: wiki
  • Post Comment  | 
  • Permalink
  • Digg
  • Stumble Upon
  • Facebook
  • Delicious
  • Reddit
  • Kia Ceed
    O Thanks :d
blog comments powered by Disqus

Webmonkey’s Picks

Browse Our Tutorials

HTML, JavaScript, design and more

Cheat Sheets

HTML, CSS and special characters

Color Charts

Brighten up your pages

Cut & Paste Code

Templates and snippets you can steal

Recent Comments

  • How to Speed Up Your Site With YSlow and Page Speed | Tech Alps on New Google Tools Help Speed Up Your Website
  • Brent on How to Speed Up Your Site With YSlow and Page Speed
  • Using Microformats in HTML5 | Tech Alps on What Happened to the Microformats Support in Firefox 3
  • Devin Serpa on Browsers Turn Their Backs on Old Macs
  • Fgfdsf on DeviantArt’s Muro Drawing App Is Pure HTML5 Awesomeness
  • Recent Articles

  • Using Microformats in HTML5
  • How to Speed Up Your Site With YSlow and Page Speed
  • Browsers Turn Their Backs on Old Macs
  • Twitter Moves to OAuth: The OAuthcalypse Is Nigh
  • Google and Arcade Fire Get All HTML5y
  • Corrections | Sitemap | FAQ | Contact Us | Wired Staff | Advertising | Press Center | Subscription Services | Newsletter | RSS Feeds
    Condé Nast Web Sites:
    Webmonkey | Reddit | ArsTechnica | Details | Golf Digest | GQ | New Yorker

    Registration on or use of this site constitutes acceptance of our User Agreement (Revised 4/1/2009) and Privacy Policy (Revised 4/1/2009).

    Wired.com © 2010 Condé Nast Digital. All rights reserved.

    The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Condé Nast Digital.