Adding CSS to PHP

Can you add CSS to PHP code ? I have a bunch of PHP code within one PHP file but I want to stylize them individually, only thing each PHP code has <h1> and <p> tags. I suppose there is no way each <h1> tag can be stylized different if all this can even be done?

You can create a .css file that contains all this <h1> <h2> and other tags you have in your php code and then add it to the php file and it will pull in all the data in the css and style your php code.

Just add the fallowing line to the top of your php file.

<link type="text/css" href="../stylesheets/whateverfile.css" rel="stylesheet" media="all" />

and it will pull in all the data to the php file you have.

The only practical way is to use an embedded style sheet or inline styles. Then just output the appropriate style information to the page. I normally use embedded styles in the head rarely inline.

php files are the same as html files, except you can also add php code in places

Oh, alright it seems simple enough. I will do just that then !