<div style="display:flex;">
    <label for="user-comment" style="margin-right: 0.5em;">댓글</label>
    <textarea id="user-comment" rows="6" cols="22"></textarea>
</div>
브라우저에서 실제 표시된 모습
<textarea rows="6" cols="22">
초깃값을 지정하려면 콘텐츠에 직접 삽입하면 됩니다.
</textarea>
브라우저에서 실제 표시된 모습
<textarea rows="6" cols="22"></textarea>
브라우저에서 실제 표시된 모습
<div style="display: flex;">
    <label for="user-comment" style="margin-right: 0.5em;">댓글</label>
    <textarea
        id="user-comment"
        rows="6"
        cols="22"
        placeholder="간단한 의견을 입력하세요..."></textarea>
</div>
브라우저에서 실제 표시된 모습
<textarea placeholder="댓글"></textarea>
브라우저에서 실제 표시된 모습
<textarea rows="6" cols="22" readonly>
readonly textarea
</textarea>
<br>
<textarea rows="6" cols="22" disabled>
disabled textarea
</textarea>
브라우저에서 실제 표시된 모습
<textarea
    rows="6"
    cols="22"
    minlength="10"
    maxlength="20"
    placeholder="10글자~20글자 범위에서 입력..."></textarea>
브라우저에서 실제 표시된 모습 텍스트를 직접 입력해 보세요.
<form>
    <div style="display: flex; margin-bottom: 1em;">
        <label for="user-comment" style="margin-right: 0.5em;">댓글</label>
        <textarea
            id="user-comment"
            rows="6"
            cols="22"
            placeholder="간단한 의견을 입력하세요..."
            required></textarea>
    </div>
    <button type="submit">제출</button>
</form>
브라우저에서 실제 표시된 모습 직접 테스트해 보세요.
<div contenteditable="true" style="padding: 15px; background: #eee; border-radius: 5px;">
    이 내용을 직접 편집해 보세요.
</div>
브라우저에서 실제 표시된 모습 직접 내용을 편집해 볼 수 있습니다.
textarea 태그와 관련 속성의 브라우저 호환성
태그와 관련 속성
데스크탑 Chrome
Chrome
데스크탑데스크탑 Edge
Edge
데스크탑 Firefox
Firefox
Safari
Safari
<textarea> 1 12 1 4
rows 1 12 1 4
cols 1 12 1 4
placeholder 4 12 1 4
readonly 1 12 1 4
disabled 1 12 1 4
minlength 40 17 51 10.1
maxlength 4 12 4 5
required 4 12 4 5