JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Form Demo</h1>
<p>
<form>
<fieldset>
<legend>User Information</legend>
<label>Sex</label>
<input type="radio"
name="sex"
id="male"
value="male"/>
<label for="male">Male</label>
<input type="radio"
name="sex"
id="female"
value="female"/>
<label for="female">Female</label>
</fieldset>
<fieldset>
<legend>Description</legend>
<label>Name</label>
<input type="text">
<p></p>
<label>Describe the object</label>
<textarea></textarea>
</fieldset>
</form>
CSS
body {
width: 400px;
margin-left: auto;
margin-right: auto;
font-family: sans-serif;
}
label:nth-child(2) {
font-weight:bold;
}
fieldset {
margin-top: 30px;
}
input {
display: block;
}
textarea {
display: block;
max-height: 200px;
max-width: 350px;
}
input[type=radio] {
display: inline
}