How can CSS be used to style PHP output in a webpage?

To style PHP output in a webpage using CSS, you can add HTML elements with classes or IDs to the PHP code and then apply styles to those classes or IDs using CSS. This allows you to control the appearance of the PHP output on the webpage.

<?php
echo "<div class='php-output'>Hello, World!</div>";
?>
```

```css
.php-output {
  color: blue;
  font-size: 20px;
}