◇◆
language Code Language
Programming or scripting language in which this code is written, e.g. “javascript”, for code written in “JavaScript 3.0”. (The “3.0” is recorded in the @language-version attribute.)
OPTIONAL on element: <code>
Value | Meaning |
---|---|
Text, numbers, or special characters | The lower case name of the programming or scripting language. |
Restriction | @language is an optional attribute; there is no default. |
Tagged Samples
Computer code written in C++
...
<code
code-type="user interface control"
language="C++"
language-version="11"
xml:space="preserve"
orientation="portrait"
position="anchor">
#include <conio.h>
#include<win_mous.cpp>
// Needed for mouse & win functions#define
...
</code>
...
Javascript coding
...
<code language="javascript">function myFunction() {
var x, text;
x = document.getElementById("numb").value;
if (isNaN(x) || x < 1 || x > 10) {
text = "Input not valid";
} else {
text = "Input OK";
}
document.getElementById("demo").innerHTML = text;
}</code>
...