Semantically linking to code snippets
- by Tim
What's the most simple and semantic way of presenting code snippets in HTML?
Possible XHTML syntax
<a href="code_sample.php" type="text/x-php">
Example of widget creation
</a>
Example of linked file (code_sample.php):
// Create a new widget
$widget = new widget();
Pros:
Semantically uses title to describe the…