[html5] r1144 - /
whatwg at whatwg.org
whatwg at whatwg.org
Mon Dec 10 20:29:20 PST 2007
Author: ianh
Date: 2007-12-10 20:29:19 -0800 (Mon, 10 Dec 2007)
New Revision: 1144
Modified:
index
source
Log:
[] (0) Add a hint for what to do if you want to give the language of a <code> element's contents.
Modified: index
===================================================================
--- index 2007-12-11 02:45:22 UTC (rev 1143)
+++ index 2007-12-11 04:29:19 UTC (rev 1144)
@@ -11355,20 +11355,28 @@
of computer code. This could be an XML element name, a filename, a
computer program, or any other string that a computer would recognise.
- <p class=note>See the <code><a href="#pre">pre</a></code> element for more
- detais.
+ <p>Although there is no formal way to indicate the language of computer
+ code being marked up, authors who wish to mark <code><a
+ href="#code">code</a></code> elements with the language used, e.g. so that
+ syntax highlighting scripts can use the right rules, may do so by adding a
+ class prefixed with "<code title="">language-</code>" to the element.
<div class=example>
<p>The following example shows how a block of code could be marked up
using the <code><a href="#pre">pre</a></code> and <code><a
href="#code">code</a></code> elements.</p>
- <pre><pre><code>var i: Integer;
+ <pre><pre><code class="language-pascal">var i: Integer;
begin
i := 1;
end.</code></pre></pre>
+
+ <p>A class is used in that example to indicate the language used.</p>
</div>
+ <p class=note>See the <code><a href="#pre">pre</a></code> element for more
+ detais.
+
<h4 id=the-var><span class=secno>3.12.14. </span>The <dfn
id=var><code>var</code></dfn> element</h4>
@@ -44967,13 +44975,13 @@
David Håsäther, David Hyatt, Derek Featherstone, DeWitt
Clinton, Dimitri Glazkov, dolphinling, Doron Rosenberg, Doug Kramer, Eira
Monstad, Elliotte Harold, Erik Arvidsson, Evan Martin, fantasai, Franck
- 'Shift' Quélain, Geoffrey Sneddon, Håkon Wium Lie, Henri
- Sivonen, Henrik Lied, Ignacio Javier, Ivo Emanuel Gonçalves, J.
- King, James Graham, James M Snell, James Perrett, Jan-Klaas Kollhof,
- Jasper Bryant-Greene, Jeff Cutsinger, Jeff Walden, Jens Bannmann, Jeroen
- van der Meer, Joel Spolsky, John Boyer, John Bussjaeger, John Harding,
- Johnny Stenback, Jon Perlow, Jonathan Worent, Jorgen Horstink, Josh
- Levenberg, Joshua Randall, Jukka K. Korpela, Kai Hendry,
+ 'Shift' Quélain, Garrett Smith, Geoffrey Sneddon, Håkon Wium
+ Lie, Henri Sivonen, Henrik Lied, Ignacio Javier, Ivo Emanuel
+ Gonçalves, J. King, James Graham, James M Snell, James Perrett,
+ Jan-Klaas Kollhof, Jasper Bryant-Greene, Jeff Cutsinger, Jeff Walden, Jens
+ Bannmann, Jeroen van der Meer, Joel Spolsky, John Boyer, John Bussjaeger,
+ John Harding, Johnny Stenback, Jon Perlow, Jonathan Worent, Jorgen
+ Horstink, Josh Levenberg, Joshua Randall, Jukka K. Korpela, Kai Hendry,
<!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
黒澤剛志 (KUROSAWA Takeshi), Kristof Zelechovski,
Lachlan Hunt, Larry Page, Lars Gunther, Laurens Holst, Lenny Domnitser,
@@ -44983,19 +44991,18 @@
Dürst, Martin Honnen, Mathieu Henri, Matthew Mastracci, Matthew
Raymond, Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
Iannarelli, Michael A. Nachbaur, Michael A. Puls II<!--Shadow2531-->,
- Michael Gratton, Michael Powers, Michel Fortin, Mihai
- Şucan<!-- from ROBO
- Design -->, Mike Brown, Mike
- Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike Schinkel, Mike Shaver,
- Mikko Rantalainen, Neil Deakin, Olav Junker Kjær, Peter Kasting,
- Philip Taylor, Rajas Moonka, Ralph Giles, Rimantas Liubertas, Robert
- O'Callahan, Robert Sayre, Roman Ivanov, S. Mike Dierken, Sam Ruby, Sam
- Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia Pfeiffer, Simon
- Pieters, Stefan Haustein, Stephen Ma, Steve Runyon, Steven Garrity,
- Stewart Brodie, Stuart Parmenter, Tantek Çelik, Thomas Broyer,
- Thomas O'Connor, Tim Altman, Tyler Close, Vladimir
- Vukićević, Wakaba, William Swanson, Øistein E.
- Andersen, and everyone on the WHATWG mailing list for their useful and
+ Michael Gratton, Michael Powers, Michel Fortin, Michiel van der Blonk,
+ Mihai Şucan<!-- from ROBO Design -->, Mike Brown, Mike Dierken<!--
+ S. Mike Dierken -->,
+ Mike Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin,
+ Olav Junker Kjær, Peter Kasting, Philip Taylor, Rajas Moonka, Ralph
+ Giles, Rimantas Liubertas, Robert O'Callahan, Robert Sayre, Roman Ivanov,
+ S. Mike Dierken, Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun
+ Inman, Silvia Pfeiffer, Simon Pieters, Stefan Haustein, Stephen Ma, Steve
+ Runyon, Steven Garrity, Stewart Brodie, Stuart Parmenter, Tantek
+ Çelik, Thomas Broyer, Thomas O'Connor, Tim Altman, Tyler Close,
+ Vladimir Vukićević, Wakaba, William Swanson, Øistein
+ E. Andersen, and everyone on the WHATWG mailing list for their useful and
substantial comments.
<p>Special thanks to Richard Williamson for creating the first
Modified: source
===================================================================
--- source 2007-12-11 02:45:22 UTC (rev 1143)
+++ source 2007-12-11 04:29:19 UTC (rev 1144)
@@ -9417,20 +9417,30 @@
code. This could be an XML element name, a filename, a computer
program, or any other string that a computer would recognise.</p>
- <p class="note">See the <code>pre</code> element for more detais.</p>
+ <p>Although there is no formal way to indicate the language of
+ computer code being marked up, authors who wish to mark
+ <code>code</code> elements with the language used, e.g. so that
+ syntax highlighting scripts can use the right rules, may do so by
+ adding a class prefixed with "<code title="">language-</code>" to
+ the element.</p>
<div class="example">
<p>The following example shows how a block of code could be marked
up using the <code>pre</code> and <code>code</code> elements.</p>
- <pre><pre><code>var i: Integer;
+ <pre><pre><code class="language-pascal">var i: Integer;
begin
i := 1;
end.</code></pre></pre>
+ <p>A class is used in that example to indicate the language
+ used.</p>
+
</div>
+ <p class="note">See the <code>pre</code> element for more detais.</p>
+
<h4>The <dfn><code>var</code></dfn> element</h4>
<p><span>Strictly inline-level content</span>.</p>
@@ -40829,36 +40839,36 @@
Derek Featherstone, DeWitt Clinton, Dimitri Glazkov, dolphinling,
Doron Rosenberg, Doug Kramer, Eira Monstad, Elliotte Harold, Erik
Arvidsson, Evan Martin, fantasai, Franck 'Shift' Quélain,
- Geoffrey Sneddon, Håkon Wium Lie, Henri Sivonen, Henrik Lied,
- Ignacio Javier, Ivo Emanuel Gonçalves, J. King, James Graham,
- James M Snell, James Perrett, Jan-Klaas Kollhof, Jasper
- Bryant-Greene, Jeff Cutsinger, Jeff Walden, Jens Bannmann, Jeroen
- van der Meer, Joel Spolsky, John Boyer, John Bussjaeger, John
- Harding, Johnny Stenback, Jon Perlow, Jonathan Worent, Jorgen
- Horstink, Josh Levenberg, Joshua Randall, Jukka K. Korpela, Kai
- Hendry, <!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
- 黒澤剛志 (KUROSAWA Takeshi), Kristof
- Zelechovski, Lachlan Hunt, Larry Page, Lars Gunther, Laurens Holst,
- Lenny Domnitser, Léonard Bouchet, Leons Petrazickis,
+ Garrett Smith, Geoffrey Sneddon, Håkon Wium Lie, Henri
+ Sivonen, Henrik Lied, Ignacio Javier, Ivo Emanuel Gonçalves,
+ J. King, James Graham, James M Snell, James Perrett, Jan-Klaas
+ Kollhof, Jasper Bryant-Greene, Jeff Cutsinger, Jeff Walden, Jens
+ Bannmann, Jeroen van der Meer, Joel Spolsky, John Boyer, John
+ Bussjaeger, John Harding, Johnny Stenback, Jon Perlow, Jonathan
+ Worent, Jorgen Horstink, Josh Levenberg, Joshua Randall, Jukka
+ K. Korpela, Kai Hendry, <!-- Keryx Web, = Lars Gunther --> Kornel
+ Lesinski, 黒澤剛志 (KUROSAWA Takeshi),
+ Kristof Zelechovski, Lachlan Hunt, Larry Page, Lars Gunther, Laurens
+ Holst, Lenny Domnitser, Léonard Bouchet, Leons Petrazickis,
Logan<!-- on moz irc -->, Loune, Maciej Stachowiak, Malcolm Rowe,
Mark Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn
Wargers, Martin Atkins, Martin Dürst, Martin Honnen, Mathieu
Henri, Matthew Mastracci, Matthew Raymond, Matthew Thomas, Mattias
Waldau, Max Romantschuk, Michael 'Ratt' Iannarelli, Michael
A. Nachbaur, Michael A. Puls II<!--Shadow2531-->, Michael Gratton,
- Michael Powers, Michel Fortin, Mihai Şucan<!-- from ROBO
- Design -->, Mike Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike
- Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin,
- Olav Junker Kjær, Peter Kasting, Philip Taylor, Rajas Moonka,
- Ralph Giles, Rimantas Liubertas, Robert O'Callahan, Robert Sayre,
- Roman Ivanov, S. Mike Dierken, Sam Ruby, Sam Weinig, Scott Hess,
- Sean Knapp, Shaun Inman, Silvia Pfeiffer, Simon Pieters, Stefan
- Haustein, Stephen Ma, Steve Runyon, Steven Garrity, Stewart Brodie,
- Stuart Parmenter, Tantek Çelik, Thomas Broyer, Thomas
- O'Connor, Tim Altman, Tyler Close, Vladimir Vukićević,
- Wakaba, William Swanson, Øistein E. Andersen, and everyone on
- the WHATWG mailing list for their useful and substantial
- comments.</p>
+ Michael Powers, Michel Fortin, Michiel van der Blonk, Mihai
+ Şucan<!-- from ROBO Design -->, Mike Brown, Mike Dierken<!--
+ S. Mike Dierken -->, Mike Dixon, Mike Schinkel, Mike Shaver, Mikko
+ Rantalainen, Neil Deakin, Olav Junker Kjær, Peter Kasting,
+ Philip Taylor, Rajas Moonka, Ralph Giles, Rimantas Liubertas, Robert
+ O'Callahan, Robert Sayre, Roman Ivanov, S. Mike Dierken, Sam Ruby,
+ Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia Pfeiffer,
+ Simon Pieters, Stefan Haustein, Stephen Ma, Steve Runyon, Steven
+ Garrity, Stewart Brodie, Stuart Parmenter, Tantek Çelik,
+ Thomas Broyer, Thomas O'Connor, Tim Altman, Tyler Close, Vladimir
+ Vukićević, Wakaba, William Swanson, Øistein
+ E. Andersen, and everyone on the WHATWG mailing list for their
+ useful and substantial comments.</p>
<p>Special thanks to Richard Williamson for creating the first
implementation of <code>canvas</code> in Safari, from which the
More information about the Commit-Watchers
mailing list