I want to highlight some css code but i do not want to use the pre tag.I have seen many methods based on the pre tag however that i don't want to use the that tag.What other methods can be used to highlight the syntax.
Thanks.
Have you tried Syntax Highlighter?
It has lots of feature to help you in syntax-highlighting.
By the way why do you not want to use <pre>
tag? It is the only tag in HTML that preserves syntax like white-spaces.
Syntax Highlighter can also be used with <script>
tag, see here.