textarea는 여러 줄의 긴 문장을 입력할 수 있는 양식입니다.
<textarea></textarea>
col 속성(attribute)으로 가로 크기를, row 속성으로 세로 크기를 정할 수 있습니다. 하지만, 크기 등 모양은 CSS에서 정하는 게 좋습니다.
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>HTML</title>
<style>
* {
font-size: 16px;
font-family: Consolas, sans-serif;
}
</style>
</head>
<body>
<form>
<p><textarea cols="50" rows="10"></textarea></p>
<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>
placeholder 속성으로 안내 문구를 넣을 수 있습니다.
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>HTML</title>
<style>
* {
font-size: 16px;
font-family: Consolas, sans-serif;
}
textarea {
width: 80%;
height: 100px;
}
</style>
</head>
<body>
<form>
<p><textarea placeholder="Input some text."></textarea></p>
<p><input type="submit" value="Submit"></p>
</form>
</body>
</html>
#html