# の無い16進数 (6桁・3桁) での色指定 (XML 宣言無し)


box-sample01
box-sample02
box-sample03
box-sample04
box-sample05
box-sample06
box-sample07

DOCTYPE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

X/HTML

<div id="box-sample01">box-sample01</div>
<div id="box-sample02">box-sample02</div>
<div id="box-sample03">box-sample03</div>
<div id="box-sample04">box-sample04</div>
<div id="box-sample05">box-sample05</div>
<div id="box-sample06">box-sample06</div>
<div id="box-sample07">box-sample07</div>

CSS

div#box-sample01 {
  color: ffcc00;
}

div#box-sample02 {
  border-color: ffcc00;
  border-width: 5px;
  border-style: solid;
}

div#box-sample03 {
  border: 5px solid ffcc00;
}

div#box-sample04 {
  border: ffcc00 5px solid;
}

div#box-sample05 {
  background-color: 999999;
}

div#box-sample06 {
  background: url(pink-elephant.png) left top no-repeat 999999;
}

div#box-sample07 {
  background: 999999 url(pink-elephant.png) left top no-repeat;
}

Taichi Kaminogoya.