HTML CSS examples for HTML Tag:code
code element marks for computer code.
code element summary
Item | Value |
---|---|
Element | code |
Local local attributes | none |
Changed in HTML5 | N/A |
Style convention
code {
font-family: monospace;
}
The following code shows how to use code element.
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <code> var items = ["CSS", "HTML", "mangoes", "Oracle"]; <br> document.writeln("I like " + items.length + " items"); </code> </body><!--from w w w. j a va 2s .c o m--> </html>