Change font size using @Html.Label

Asked

Viewed 873 times

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 answer

2


@Html.Label("MeuLabel", new { @style = "color: #000000" })

Just fill in the @style with the CSS style you want.

  • Now without the use of css is not possible, right?

  • Right. There used to be some HTML tags that you could specify that, but they’ve been deprecated. Nowadays they’re off the charts.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.