[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/small [Back]  [Original]

String.prototype.small() - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

String.prototype.small()

HTML wrapper methods exist only for backwards compatibility. Use DOM APIs to create elements instead.

DOM

small() String <small> (<small>str</small>)

js
small()

<small> str </small>

small()

HTML

js
const contentString = "Hello, world";

document.body.innerHTML = contentString.small();

HTML

html
<small>Hello, world</small>

small() HTML document.createElement() DOM API

js
const contentString = "Hello, world";
const elem = document.createElement("small");
elem.innerText = contentString;
document.body.appendChild(elem);

ECMAScript 2027 LanguageSpecification
# sec-string.prototype.small


Web Proxy Viewer  |  New URL  |  Original Page