How to have multiple format in image title?

Does anyonw know if it is possible to change the format/type in image title/decription so part of it has another format? eg. “Hello 123”, where “Hello” is written with italic and “123” is regular. Could it be done with some custom code or is there another way around? The example below is a gallery connected to a dataset.