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

String.prototype.small() - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

String.prototype.small()

Deprecated

Avoid using this feature in new projects. HTML wrapper methods exist only for backwards compatibility. Use DOM APIs to create elements instead. This feature may be a candidate for removal from web standards or browsers.

Consider using the following features instead: DOM.

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

In this article

js
small()

.

<small> str , </small>

small()

HTML document body .

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);

Specification
ECMAScript 2027 LanguageSpecification
# sec-string.prototype.small


Web Proxy Viewer  |  New URL  |  Original Page