Formatting of the source code is done through named CSS styles. For example, the default style name for block comments is "block-comment". This means that when a block comment appears, the software will format it as follows:
<div class="block-comment">
/* The block
* comment goes
* here
*/
</div>
Code2Web will use either divs or spans, depending on the situation. If you are using the provided skins, they already use the default names. In general, you should not need to change the default names of the CSS styles, except in the following two situations:
All of the generated HTML conversion of the source code is enclosed in a top-level div tag. The sourceStyle property specifies the CSS class name applied to that div, and hence to all nested elements which do not override its settings. By default the style name is "source". .
| Eclipse | Netbeans | Monochrome | Citylights |
| source | source | source | source |
| HTMLConverter | String getSourceStyle() void setSourceStyle( String style ) |
|
| Code2Web | code2web ... --sourceStyle = xxxxx ... | |
| <c2w:convert> | <c2w:convert ... sourceStyle="style" ... > |