[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/String/big [Back]  [Original]

String.prototype.big() - JavaScript | MDN

Esta pgina foi traduzida do ingls pela comunidade. Saiba mais e junte-se comunidade MDN Web Docs.

View in English Always switch to English

String.prototype.big()

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.

O mtodo big() cria um elemento HTML <big> fazendo com que o texto dentro dele seja exibido uma uma fonte maior.

Nota: O elemento <big> foi removido no HTML5 e no deve mais ser usado. Em vez disso, web developers devem usar a propriedade CSS correspondente.

In this article

Sintaxe

str.big()

Valor retornado

Uma string contendo um elemento HTML.

Descrio

O mtodo big() cria uma string dentro de uma tag <big>: "<big>str</big>".

Exemplos

Usando big()

Os exemplos abaixo usam mtodos do objeto String para alterar o tamanho de uma string:

js
var worldString = "Ol, mundo";

console.log(worldString.small()); // <small>Ol, mundo</small>
console.log(worldString.big()); // <big>Ol, mundo</big>
console.log(worldString.fontsize(7)); // <fontsize=7>Ol, Mundo</fontsize>

Com o objeto element.style voc pode selecionar o atributo style do elemento e manipul-lo de forma mais genrica, por exemplo:

js
document.getElementById("#oIdDoElemento").style.fontSize = "2em";

Especificaes

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

Compatibilidade com navegadores

Veja tambm


Web Proxy Viewer  |  New URL  |  Original Page