why Serial.write('10') not working but Serial.write('9') working

Hello i have a problem when i put Serial.write('10') it is not working and the color of '10' digit gets changed black in arduino ide but when i put 1 to 9 digit in it, it become blue and it started working perfectly i want to know why.

To send multiple characters you must use the double quotation marks
https://www.arduino.cc/en/Serial/write

  Serial.write("10");

Thanks for the reply i wanted to send byte only. so found the way Serial.write(10) instead of '10'.

That's the problem when the error description is "it is not working", nobody can know what you wanted to do.

And in the new context

Serial.write('9');

Does not work as expected.

okay so you give me the answer why it worked with 10 only instead of '10' and why '1' to '9' is working as a byte.

'1' is a byte. It has the value 49. When you put quotes you tell the compiler you mean ascii. So if you want to send 49 then '1' works. But if you want to send 1 that's a different story.

Serial.write(9);    // sends 0x09 (9)
Serial.write('9');  // sends 0x39 (57)
Serial.write('1');  // sends 0x31 (49)
Serial.write(10);   // sends 0x0A (10)
Serial.write('10'); // sends low part of a strange two byte character constant

okay so you give me the answer why it worked with 10 only instead of '10' and why '1' to '9' is working as a byte.

Sure. As soon as you post a picture of your keyboard with the 10 key circled. Single quotes are for single characters/keys. So we need to see a picture of your 10 key.