PHP HTML CCS help or something

Status
Not open for further replies.
Hello everyone.

I have a website on which I post programs written in assembly lanuage.

I would like to know if there is a way of changing the font colour of words depending on what the word is.

Here is an example of one of my programs, you can see my colour scheme.
Jake's Electronics - Tutorial
But if you check out the source (View, Source), you'll see I have had to change the colour of every word except the comments, which is the page default, being grey.

I want to be able to 'store' a list of words in the <head> of the page, and if that word is typed in the <body>, change colour to what ever I say.
Like have a default of grey, but if GOTO is typed, make that blue.

My method at the moment is extreamly tendious, and it makes adding longer porgrams very hard and time consumming.
Is it clear what want to do?
Is anyone on here good at web programming?
I posted a thread on a html forum, but it got moved inside a forum that was inside a forum that was inside a forum....that was inside a forum. With 1 person viewing....
Didn't get much help lol

Thanks,
Jake.
 
Hi Jake,

I'm actually a professional PHP developer.. It's my main job

What CMS system are you using? It may very well already have a highlighter for code.. What is the language of the code you will be coloring?

This page may help:


Regards,
EM
 
I'm actually a professional PHP developer..
well, I couldn't have asked a better person.

I no pro, so by CMS I'm guessing you mean Content Management System (thanks google), and by that ill say i don't know.

What is the language of the code you will be coloring
The language i want to color is Assembly language (programming uC's)
That page link in my first post is an example of what i want to do colour wise...

The link you provided looks promising.
I will check it out and write back if I have further comments...
Thanks EM!
 
To make it clearer on what I want to do,

I want to have a webpage template that I can simply copy a block of code onto, and when the page is veiwed, I want it to have a colour sheme.
So the next time I have a new code to publish, I can simply open my template, copy and paste my new code into it, and the code when viewed on the webpage will have that colour sheme
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…