id 选择器
<!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"> <head> <title>id 选择器</title> <style type="text/css"> div#outer { width: 500px; } div#inner { text-indent: 10%; } p { width: 200px; } #red { color: red; } </style> </head> <body> <div id="outer"> <div id="inner"> some text. some text. some text. <p id="red">这个段落是红色。</p> </div> </div> </body> </html>