CARVIEW |
Select Language
HTTP/2 200
content-type: text/html
x-guploader-uploadid: AAwnv3KsPlVU9rWSta4vytwsbRugqeflLgv5tfGI-jT00vg_FjOLwcfdeAQunqICOaKE2o4GK-JYQTY
cache-control: public, max-age=3600
expires: Mon, 06 Oct 2025 16:47:22 GMT
last-modified: Mon, 06 Oct 2025 01:12:10 GMT
etag: W/"3f6fb75fdf3ddebcbe68fc8946a3ece8"
x-goog-generation: 1759713130175360
x-goog-metageneration: 1
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 186897
x-goog-meta-goog-reserved-file-mtime: 1759711462
x-goog-hash: crc32c=YiTEPw==, md5=P2+3X9893ry+aPyJRqPs6A==
x-goog-storage-class: STANDARD
accept-ranges: none
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
alt-svc: clear
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
strict-transport-security: max-age=63072000
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net mdn.github.io live-samples.mdn.mozilla.net live-samples.mdn.allizom.net *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev interactive-examples.mdn.mozilla.net interactive-examples.mdn.allizom.net wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
x-frame-options: DENY
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
x-cloud-trace-context: 520e622dbdca2d65ab5d2b8d66d3c69b
date: Mon, 06 Oct 2025 15:47:23 GMT
server: Google Frontend
via: 1.1 google
vary: Accept-Encoding
content-encoding: gzip
x-cache: miss
HTML autocapitalize グローバル属性 - HTML | MDN
Toggle sidebar
>
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
HTML autocapitalize グローバル属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
autocapitalize
グローバル属性は列挙型の属性で、ユーザーによって入力/編集されたとき、入力文字列の先頭大文字化が自動的に行われるかどうか、どのように行われるかを制御します。これは次のものに関連します。
<input>
および<textarea>
要素contenteditable
が設定されたあらゆる要素。
autocapitalize
は、物理キーボードで入力する場合の動作には影響しません。モバイル端末の仮想キーボードや音声入力など、その他の入力メカニズムの動作に影響します。これにより、例えば各文の最初の文字を自動的に大文字にするなど、データ入力がより迅速かつ容易になり、ユーザーを支援することができます。
値
取りうる値は次の通りです。
none
またはoff
-
自動的な大文字化は適用されません。
sentences
またはon
-
各文の最初の文字を既定で大文字にします。
words
-
各語の最初の文字を既定で大文字にします。
characters
-
すべての文字が既定で大文字になります。
使用上のメモ
autocapitalize
は、<input>
と<textarea>
要素、およびそれらを含む<form>
要素に設定できます。autocapitalize
が<form>
要素に設定されている場合、その要素に含まれるすべての<input>
および<textarea>
要素の自動大文字化動作が設定され、含まれている要素に設定されているautocapitalize
の値は上書きされます。autocapitalize
は、自動大文字化が決して有効にならないurl
、email
、password
<input>
型には効果はありません。autocapitalize
が指定されていない場合、採用される既定の動作はブラウザーによって異なります。例を示します。- Chrome および Safari の既定値は
on
/sentences
です。 - Firefox の既定値は
off
/none
です。
- Chrome および Safari の既定値は
例
>HTML
html
<p>さまざまな自動大文字化設定を検査するためのフォーム</p>
<form>
<div>
<label for="default">既定: 自動大文字化の設定なし</label>
<input type="text" id="default" name="default" />
</div>
<div>
<label for="off">autocapitalize="off"</label>
<input type="text" id="off" name="off" autocapitalize="off" />
</div>
<div>
<label for="none">autocapitalize="none"</label>
<input type="text" id="none" name="none" autocapitalize="none" />
</div>
<div>
<label for="on">autocapitalize="on"</label>
<input type="text" id="on" name="on" autocapitalize="on" />
</div>
<div>
<label for="sentences">autocapitalize="sentences"</label>
<input
type="text"
id="sentences"
name="sentences"
autocapitalize="sentences" />
</div>
<div>
<label for="words">autocapitalize="words"</label>
<input type="text" id="words" name="words" autocapitalize="words" />
</div>
<div>
<label for="characters">autocapitalize="characters"</label>
<input
type="text"
id="characters"
name="characters"
autocapitalize="characters" />
</div>
<div>
<label for="characters-ta">autocapitalize="characters" on textarea</label>
<textarea
type="text"
id="characters-ta"
name="characters-ta"
autocapitalize="characters">
</textarea>
</div>
</form>
<hr />
<p contenteditable autocapitalize="characters">
このコンテンツは編集可能であり、 autocapitalize="characters" が設定されています。
</p>
div {
margin-bottom: 20px;
}
結果
仮想キーボードまたは音声入力を使用して、各入力に対する効果を検査してください(キーボード入力は動作しません)。
仕様書
Specification |
---|
HTML> # attr-autocapitalize> |
ブラウザーの互換性
Loading…