2.14 Code-Related Elements
As a programmer, you’ll sometimes want to look up coding syntax and coding examples on the Web. It’s amazing how much code is out there. To accommodate web developers who want to make web pages that show code, the HTML5 standard provides several coding-related elements—code, kbd, samp, and var.
The code element indicates that its enclosed text is programming code. The kbd element indicates that its enclosed text represents input for a program. The “kbd” stands for “keyboard.” The samp element indicates that its enclosed text represents output for a program. The “samp” stands for “sample.” The var element indicates that its enclosed text represents a programming variable or a mathematical variable. The “var” stands ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access