--- title: String.prototype.big() slug: Web/JavaScript/Reference/Global_Objects/String/big tags: - Deprecated - HTML wrapper methods - JavaScript - Method - Prototype - Reference - String translation_of: Web/JavaScript/Reference/Global_Objects/String/big --- <div>{{JSRef}} {{deprecated_header}}</div> <p><strong><code>big()</code></strong> メソッドは、文字列が大きなフォントで表示されるように HTML の {{HTMLElement("big")}} 要素を生成します。</p> <div class="note"> <p><strong>使用上の注意:</strong> <big> 要素は <a href="/ja/docs/Web/Guide/HTML/HTML5">HTML5</a> で廃止されており、今後使用するべきではありません。代わりにウェブ開発者は <a href="/ja/docs/Web/CSS">CSS</a> プロパティを使用してください。</p> </div> <h2 id="Syntax" name="Syntax">構文</h2> <pre class="syntaxbox notranslate"><var>str</var>.big()</pre> <h3 id="Return_value" name="Return_value">返値</h3> <p>HTML の {{HTMLElement("big")}} 要素を含む文字列です。</p> <h2 id="Description" name="Description">解説</h2> <p><code>big()</code> メソッドは、文字列を <code><big></code> 要素の中に、 "<code><big>str</big></code>" のように埋め込みます。</p> <h2 id="Examples" name="Examples">例</h2> <h3 id="big_の使用">big() の使用</h3> <p>以下の例では文字列のメソッドを使用して、文字列の大きさを変更しています。</p> <pre class="brush: js notranslate">var worldString = 'Hello, world'; console.log(worldString.small()); // <small>Hello, world</small> console.log(worldString.big()); // <big>Hello, world</big> console.log(worldString.fontsize(7)); // <fontsize=7>Hello, world</fontsize> </pre> <p>{{domxref("ElementCSSInlineStyle/style", "element.style")}} オブジェクトを使用すると、要素の <code>style</code> 属性を使用して、次のようにもっと汎用的に操作することができます。</p> <pre class="brush: js notranslate">document.getElementById('yourElemId').style.fontSize = '2em'; </pre> <h2 id="Specifications" name="Specifications">仕様書</h2> <table class="standard-table"> <thead> <tr> <th scope="col">仕様書</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('ESDraft', '#sec-string.prototype.big', 'String.prototype.big')}}</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> <p>{{Compat("javascript.builtins.String.big")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>{{jsxref("String.prototype.fontsize()")}}</li> <li>{{jsxref("String.prototype.small()")}}</li> </ul>