1) HTML comments
<!--This is a comment. Comments are not displayed in the browser-->
The tricky part was to find out how to visualize this comment on the webpage, something that is not supposed to show-up! . The solutions comes down to this table
Result | Description | Entity Name | Entity Number |
---|---|---|---|
non-breaking space | |   | |
< | less than | < | < |
> | greater than | > | > |
& | ampersand | & | & |
¢ | cent | ¢ | ¢ |
£ | pound | £ | £ |
¥ | yen | ¥ | ¥ |
€ | euro | € | € |
§ | section | § | § |
© | copyright | © | © |
® | registered trademark | ® | ® |
As per above table, the HTML code necessary to show up HTML comments is
<!-- This is a comment. Comments are not displayed in the browser -->
Now the problem is- How do we visualize < ?
In this case we just need to write in the HTML source page:
&lt;
2) CSS comment
/* comment here */
3) Java script comment
// Comment here
Here you can find few examples from my HTML template page
The Jave script is commented becasue is delimited by <!-- -->
Whithin the Jave script code you can find additional comments //
In the CSS body element, you can find CSS comments /* */
<--
<script src='http://www.mathjax.org/MathJax/MathJax.js' type='text/javascript'> //
// This script call is what gets MathJax loaded and running
//
MathJax.Hub.Config({
jax: ["input/TeX","output/HTML-CSS"], // input is TeX and output is HTML-CSS format
extensions: ["tex2jax.js"], // use the tex2jax preprocessor
tex2jax: {
// inlineMath: [['$','$'],['\\(','\\)']], // uncomment to use $...$ for inline math
processEscapes: 1 // set to 1 to allow \$ to produce a dollar sign
}
});
-->
body {
/* background:$bgcolor; */ /* old code */
background:#d0e4fe; /* new code */
margin:0;
color:$textcolor;
font:x-small Georgia Serif;
font-size/* */:/**/small;
font-size: /**/small;
text-align: center;
}
No comments:
Post a Comment