コンピューター コードの断片を表す。
フレージング内容が期待される場所。
どちらのタグも省略不可。
マークアップされているコンピューター コードの言語を示すための、正式な方法はない。使用される言語と一緒に CODE 要素をマークしたい著者は、たとえば構文強調表示スクリプトが正しい規則を使用できるように、たとえば要素に "language-" で始まるクラスを追加することによって、class属性を使用できる。
次の例は、句読点を含む、要素名とコンピューター コードをマークアップするために段落で要素が使用できる様子を示す。
<P>The <CODE>code</CODE> element represents a fragment of computer code.</P> <P>When you call the <CODE>activate()</CODE> method on the <CODE>robotSnowman</CODE> object, the eyes glow.</P> <P>The example below uses the <CODE>begin</CODE> keyword to indicate the start of a statement block. It is paired with an <CODE>end</CODE> keyword, which is followed by the <CODE>.</CODE> punctuation character (full stop) to indicate the end of the program.</P>
開始<CODE>ABCabcij.012*[]漢字</CODE>終了
表示内容: |
表示内容: |