リファレンス createSpan()

createSpan()

<span></span>要素を作成します。

<span></span>要素は、インライン要素のコンテナとして 一般的に使用されます。例えば、<span></span>は 文章の一部を異なるスタイルで 保持することができます。

パラメータhtmlはオプションです。新しい<span></span>の 内部HTMLを設定する文字列を受け入れます。

実例

シンタックス

createSpan([html])

パラメーター

html
String:

新しい<span></span>要素の内部HTML。

リターン

p5.Element: 新しいp5.Elementオブジェクト。
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!

関連するリファレンス