Bold text in the from field: <input>?
Asked Answered
L

3

11

Today when I filled my calendar at google I saw that the description of the event is in bold font:

<input id=":g" name=":g" type="text" class="textinput" dir="ltr">

Is it possible to render the custom text style in the text input field?


Thanks Arman.

EDIT Simple search I fond that the jquery watermark plugin can do similar thing.

Lucent answered 16/3, 2011 at 9:50 Comment(0)
A
25

CSS can format text in text input field:

<html>
<head>
<style type="text/css">
   input {font-weight:bold;}
</style>
</head>
<body>
   <input type="text"/>
</body>
</html>
Aggressive answered 16/3, 2011 at 10:8 Comment(0)
R
7

try this you don't need to write css

 <input type="text" style="font-weight: bold;">
Ruler answered 3/11, 2012 at 8:1 Comment(3)
yeah... but its an alternate way for few styles we can write inline cssRuler
Indeed. I was only commenting on your "you don't need to write css" remark.Sacring
But.. Isn't font-weight: bold CSS? :DLeicester
A
2

With Bootstrap 5.0 you can use "fw-bold"

Aguish answered 19/3, 2024 at 11:25 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.