# Good practice: Styling input fields in HTML

**URL:** <https://forum.universal-robots.com/t/good-practice-styling-input-fields-in-html/1011>\
**Category:** HTML\
**Created:** [July 25, 2017, 12:53pm UTC](https://forum.universal-robots.com/t/good-practice-styling-input-fields-in-html/1011 "2017-07-25T12:53:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [July 25, 2017, 12:53pm UTC](https://forum.universal-robots.com/t/good-practice-styling-input-fields-in-html/1011/1 "2017-07-25T12:53:12Z")

</div>

When your URCap may contain multiple input fields, it is often desired to shape and size these differently, depending on the type of input (text, small numerics, long numbers etc.)

Using the CSS class element in input elements, allows you to design multiple sizes and appearances of input elements.

E.g. this HTML code:

```auto
<!DOCTYPE html>
<html>
	<head>
		<title>My Installation</title>
		<style>
			input.bignum {
				display: inline-block;
				width: 120px;
				height: 25px;
			}
			input.smallnum {
				display: inline-block;
				width: 50px;
				height: 25px;
			}
			input.bigsquarebut {
				display: block;
				width: 100px;
				height: 100px;
			}
			div.spacer {
				padding-top: 10px;
	 		}
		</style>
	</head>
	<body>
		<h3> Settings </h3>
		<p> Please input information: </p>
		<form>
			My big number: <input class="bignum" id="bignumber" type="number" step="1" min="0"> <br>
			My small number: <input class="smallnum" id="smallnumber" type="number" min="0"> <br>
			<div class="spacer">&nbsp;</div>
			<input class="bigsquarebut" id="somebutton" type="button" />
		</form>		
	</body>
</html>

```

Will yield the following result:  
 ![](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/1X/89da2d9778f8a8fadb36b6598203220aaac4634b.png)  
Hence, by adding the `class="bignum"`or other pre-defined style class to the input element, this will inherit these settings.

In this case, the text in the button is set in the same way as a [multiline label](http://forum.universal-robots.com/t/multiline-label/977) with `BUTTON.setText("<html>SQUARE<br>BUTTON<br>TEXT")` from the Java layer.
