What you want to do is explained by Martin Koelewijn in a thread here:
https://forum.mendix.com/link/questions/109076
Copying the code just in case the other thread is ever deleted:
.starlabel label:after {
content:" *";
color: red;
}
You cannot style text in the same text widget differently. Though you can add to text widgets next to each other rendered as text (not paragraph) and these will be aligned automatically in a single row. specific styling cab be added to each separated widget
as example, these 3 tekst widgets result in below page rendering