En php, tenés las funciones
highlight_file highlight_string
lamentablemente (antes de php 5) lo hace con etiquetas FONT, y en principio está pensado para código PHP, pero bueno, quizás te sirva.
(si no sabés usar PHP, pasate por las preguntas frecuentes del foro correspondiente o preguntá

)
Saludos.