test to look at copy-paste with code tags, copy for forum, and copy for html

void setup(){
  Serial.begin(9600);
}
void loop(){
  if (Serial.available()){
    delay(500);
    Serial.print(Serial.read());
  }
}

Huh - either can be highlighted & copied into the Arduino IDE - the color and bold tags seem to be ignored. Not sure what other editors/IDEs might do.

void setup(){
Serial.begin(9600);
}
void loop(){
if (Serial.available()){
delay(500);
Serial.print(Serial.read());
}
}

Not this mess tho - not sure what’d it be useful for.

void setup(){
  Serial.begin(9600);
}
void loop(){
  if (Serial.available()){
    delay(500);
    Serial.print(Serial.read());
  }
}

you can do this

void setup(){
  Serial.begin(9600);
}
void loop(){
  if (Serial.available()){
    delay(500);
    Serial.print(Serial.read());
  }
}

[ code=Arduino]
or
[ code=Processing]

void setup(){
  Serial.begin(9600);
}
void loop(){
  if (Serial.available()){
    delay(500);
    Serial.print(Serial.read());
  }
}

but no syntax HL yet

a variation ...

void setup()
{
  Serial.begin(9600);
}

...

CrossRoads:
Not this mess tho - not sure what'd it be useful for.

Makes it easy to paste into HTML:
http://www.baldengineer.com/projects/arduino-copypaste-test/

Thanks for the comments. Can do interesting things with the code tags.
I tried pasting HTML into Nvu, which is a web page editor, and did't see that it did anything useful when I previewed the page.

Make sure it knows you're pasting HTML and not text.

With paste special, or similar? I'll try that. Thanks.

e.g. if you use [ php] you can get (PHP) syntax highlighting ! - as PHP and C++ are close enough it is almost useful.
drawback - it does not create the scrollbar :frowning:

void setup()
{
  Serial.begin(9600);  // adjust baudrate as needed 
}

CrossRoads:
With paste special, or similar? I'll try that. Thanks.

I don't know how Nvu works.

In my wordpress example I pasted the code into the text editor and then in the html editor.