<form>
	<label>
		<input name="chk1" type="checkbox">
		<span>Apple</span>
	</label>
	<label>
		<input name="chk2" type="checkbox">
		<span>Orange</span>
	</label>
	<label>
		<input name="chk3" type="checkbox">
		<span>Pear</span>
	</label>
	<label>
		<input name="chk4" type="checkbox">
		<span>Grape</span>
	</label>
  <label>
		<input type="radio" name="fruit" value="plum" checked>
		<span>Plum</span>
	</label>
  <label>
		<input type="radio" name="fruit" value="pineapple">
		<span>Pineapple</span>
	</label>
	<label>
		<input type="radio" name="fruit" value="mango">
		<span>Mango</span>
	</label>
	<label>
		<input name="txt1" type="text">
		<span>Enter fruit</span>
	</label>	
</form>
body {
	font-family: arial;
}

form {
	padding: 20px;
	margin: 20px;
	border: 1px #ccc solid;
	width: 300px;
}

input[type="checkbox"] + span {
	font-weight: bold;
	font-style: italic;
	color: blue;
}

input[name="chk2"] + span {
	color: red;
}

form label {
	display: block;
	padding-bottom: 10px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.