ניתן גם לכלול הוראות CSS נפרדות באמצעות תגית ה-style שבאה בתוך תגית ה-head, לדוגמה באופן הבא:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> <head> <title>This title was intentionally left blank.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body { color: green; } </style> </head> <body> <h1>Excerpt from the Three Musketeers</h1> <p> A young man--we can sketch his portrait at a dash. Imagine to yourself a Don Quixote of eighteen; a Don Quixote without his corselet, without his coat of mail, without his cuisses; a Don Quixote clothed in a woolen doublet, the blue color of which had faded into a nameless shade between lees of wine and a heavenly azure; face long and brown; high cheek bones, a sign of sagacity; the maxillary muscles enormously developed, an infallible sign by which a Gascon may always be detected, even without his cap--and our young man wore a cap set off with a sort of feather; the eye open and intelligent; the nose hooked, but finely chiseled. Too big for a youth, too small for a grown man, an experienced eye might have taken him for a farmer's son upon a journey had it not been for the long sword which, dangling from a leather baldric, hit against the calves of its owner as he walked, and against the rough side of his steed when he was on horseback. </p> <p> Taken from <a href="http://www.gutenberg.org/etext/1257">the Project Gutenberg page</a>. </p> </body> </html>
כפי שניתן לראות מצילום המסך, הטקסט במסמך הוא ירוק:
ראוי לציין שבעוד ששימוש בתגית style טוב להתנסות, רצוי שלא לעשות בה שימוש בקוד הסופי. זאת מפני ששימוש בגיליון סגנון נפרד מאפשר יותר בקלות להחיל עיצוב אחיד לכל העמודים באתר, וכן חוסך בתעבורה וגורם לטעינת הדפים הבאים באתר להיות מהירה יותר.
בכל מקרה, אם ברצונכם עדיין להשתמש בתגית זאת, זכרו לכלול את התכונה type="text/css"
, או אחרת הדף לא יעבור אימות.