Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is default font style of textarea in chrome? (text input vs textarea "size" of text)

What is default font style of textarea in chrome? What should to make it default look like? Purpose of my question is that I wanna make the text make same in input as in textarea. In text input is maybe too "bold" :P
The question should be: What are default font properties applied on textarea? What would I wrote if I wanna look like as default?

textarea {
font-???: ???;
etc.
}
like image 751
user1097772 Avatar asked Nov 16 '13 02:11

user1097772


People also ask

What is the default font for the textarea?

While the default font property of a input is font-family: Arial . Save this answer.

What is the default size text?

You should think of this as the normal font size, and basically everything else a variation on it. For instance, while 14sp is the default text size when the text can be quite long, when there's only a small modal with a bit of text, it's 16sp! Notice that it's a bit lighter to make up for this size boost.

What is the standard default text size in most browsers?

The default font size in all browsers tends to be approximately 16 pixels. A common practice is to set the root font-size to 62.5%, which translates the default 16px to approximately 10px. We do this to make the mental conversion of the font size easier when using em or rem (e.g. 1 rem = approx.

What is the default font size using in font element?

The HTML <font> size Attribute is used to specify the size of text which is present inside <font> element. Attribute Values: It contains a single value number that specifies the size of the text. The font size lies between 1 to 7. The default value of font size is 3.


2 Answers

To answer your question directly,

The default font property of a textarea is font-family: monospace

While the default font property of a input is font-family: Arial.

All the default styling properties of an element (in Chrome) can be found by looking at the computed styling of the element in the Chrome developer tool. For all the properties, view this (example)

like image 186
Josh Crozier Avatar answered Oct 19 '22 08:10

Josh Crozier


As mentioned in another answer, you can force textarea to inherit the font style, to make it look like default:

textarea {
  font-family: inherit;
}
like image 24
Deniz Ozger Avatar answered Oct 19 '22 09:10

Deniz Ozger