HTML CSS examples for CSS Selector:first-of-type
CSS: First Selector
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> dl {<!--from w ww . j av a2 s.com--> padding:26px 0px 26px 0px; } dt { clear:left; float:left; text-align:left; width:91px; } dd { margin:0 0 0 91px; padding:0 0 0 0; } dt, dt+dd { margin-top:16px; } dt:first-of-type, dt+dd:first-of-type { margin-top:0px; } </style> </head> <body> <dl> <dt> Lorem ip </dt> <dd> Lorem ip </dd> <dd> Lorem ip </dd> <dd> Lorem ip </dd> <dt> Lorem ip </dt> <dd> Lorem ip </dd> <dd> Lorem ip </dd> <dd> Lorem ip </dd> </dl> </body> </html>