1
How do I assign a font size and colors using @Html.Label
?
I know if I use htmlAttributes I can use: @class = ...
i get via css. But I wish I could do it without using CSS. It’s like?
1
How do I assign a font size and colors using @Html.Label
?
I know if I use htmlAttributes I can use: @class = ...
i get via css. But I wish I could do it without using CSS. It’s like?
2
@Html.Label("MeuLabel", new { @style = "color: #000000" })
Just fill in the @style
with the CSS style you want.
Browser other questions tagged css asp.net-mvc-5 razor
You are not signed in. Login or sign up in order to post.
Now without the use of css is not possible, right?
– pnet
Right. There used to be some HTML tags that you could specify that, but they’ve been deprecated. Nowadays they’re off the charts.
– Leonel Sanches da Silva