If you’re working in WordPress you will most likely come across a need to target one specific page with CSS. Since every page in WordPress has a unique ID it’s a great idea to dynamically add the page ID to the body tag as a class. This way you can target anything within the body tag specifically. Simply add the following to the body tag in the header.php of your website theme.
<body <?php body_class(); ?>>
Here is an example output, you’ll notice it also adds other great classes (allowing you other ways of targeting specific pages or groups of pages based on certain characteristics).
<body class="page page-id-1076 page-template page-template-default logged-in">