HTML <input> alt 속성
예시
제출 버튼을 나타내는 이미지가 있는 HTML 양식:
<form action="/action_page.php">
<label for="fname">First name:</label>
<input type="text" id="fname"
name="fname">
<input type="image" src="submit.gif" alt="Submit" width="48" height="48">
</form>
정의 및 사용
속성 은 alt
사용자가 어떤 이유로 이미지를 볼 수 없는 경우(느린 연결, src 속성의 오류 또는 사용자가 스크린 리더를 사용하는 경우) 대체 텍스트를 제공합니다.
참고: 속성 alt
은 에서만 사용할 수 있습니다
<input type="image">
.
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
alt | Yes | Yes | Yes | Yes | Yes |
통사론
<input alt="text">
속성 값
Value | Description |
---|---|
text | Specifies an alternate text for the image |
❮ HTML <입력> 태그