Skip to main content
Active reading.
Source Link
Peter Mortensen
  • 31.6k
  • 4
  • 22
  • 14

This is a suggestion for a specific kind of question that requires html/css/jsHTML, CSS, JavaScript constructs. I have observed that many users present their code by using the code sample instead of a code snippet. For instance, users will post something like:

HTML

<div>my<div>My htmlHTML code</div>

CSS

div {
   ...some cssCSS...
}

JSJavaScript

var myJs;

This is a clear situation where the code snippet is better suited since it will produce a running example that can be visualized inside the thread.

If possible to catch this case, the user could be presented a callout indicating that her code could be structured inside a snippet to create a running example.

This is a suggestion for a specific kind of question that requires html/css/js constructs. I have observed that many users present their code by using the code sample instead of a code snippet. For instance, users will post something like:

HTML

<div>my html code</div>

CSS

div {
   ...some css...
}

JS

var myJs;

This is a clear situation where the code snippet is better suited since it will produce a running example that can be visualized inside the thread.

If possible to catch this case, the user could be presented a callout indicating that her code could be structured inside a snippet to create a running example.

This is a suggestion for a specific kind of question that requires HTML, CSS, JavaScript constructs. I have observed that many users present their code by using the code sample instead of a code snippet. For instance, users will post something like:

HTML

<div>My HTML code</div>

CSS

div {
   ...some CSS...
}

JavaScript

var myJs;

This is a clear situation where the code snippet is better suited since it will produce a running example that can be visualized inside the thread.

If possible to catch this case, the user could be presented a callout indicating that her code could be structured inside a snippet to create a running example.

Source Link

This is a suggestion for a specific kind of question that requires html/css/js constructs. I have observed that many users present their code by using the code sample instead of a code snippet. For instance, users will post something like:

HTML

<div>my html code</div>

CSS

div {
   ...some css...
}

JS

var myJs;

This is a clear situation where the code snippet is better suited since it will produce a running example that can be visualized inside the thread.

If possible to catch this case, the user could be presented a callout indicating that her code could be structured inside a snippet to create a running example.