<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'></script>
Letakan keseluruhan script ini dibawah tag <head> atau diatas tag </head>- <script type="text/javascript" src="CodeHighlighter.js"></script>
- <script type="text/javascript" src="javascript.js"></script>
- <script type="text/javascript" src="css.js"></script>
- <script type="text/javascript" src="html.js"></script>
Kode CSS
.javascript .comment {
color : green;
}
.javascript .string {
color : teal;
}
.javascript .keywords {
color : navy;
}
.javascript .global {
color : blue;
}
.javascript .brackets {
color : navy;
}
.css .comment {
color : gray;
}
.css .properties {
color : navy;
}
.css .selectors {
color : maroon;
font-weight : bold;
}
.css .units {
color :red;
}
.css .urls {
color :green;
}
.html .tag {
color : purple;
}
.html .comment {
color : gray;
font-style: italic;
}
.html .string {
color : navy;
}
.html .doctype {
color : teal;
}
pre {
border: 1px solid black;
margin : 2em;
padding : 1em;
line-height: 1.5;
background:#debe94;
overflow: auto;
}
code {
font-size: 1.2em;
}
Perhatikan CSS yg dibedakan warnanya itu, biasanya itu sudah ada kalau yg sudah mengedit template :-? (harap dicek dolo) Kalau sudah ada tidak usah pakai lagi maksudnya mah ;)) Tinggal kode CSS yg lainnya ajah yg diedit-edit :P biar gaya dan full stylish :-" Untuk kode HTML terpakai ketika kita akan memosting kode HTML, CSS, atau Javascript tentunya sudah diphrase terlebih dahulu ;) Gunakan tag sbbcolor : green;
}
.javascript .string {
color : teal;
}
.javascript .keywords {
color : navy;
}
.javascript .global {
color : blue;
}
.javascript .brackets {
color : navy;
}
.css .comment {
color : gray;
}
.css .properties {
color : navy;
}
.css .selectors {
color : maroon;
font-weight : bold;
}
.css .units {
color :red;
}
.css .urls {
color :green;
}
.html .tag {
color : purple;
}
.html .comment {
color : gray;
font-style: italic;
}
.html .string {
color : navy;
}
.html .doctype {
color : teal;
}
pre {
border: 1px solid black;
margin : 2em;
padding : 1em;
line-height: 1.5;
background:#debe94;
overflow: auto;
}
code {
font-size: 1.2em;
}
- Untuk Javascript mode.
- Untuk HTML mode.
- Untuk CSS mode.
<pre><code class="javascript">
YOUR CONTENT IS HERE
</code></pre>
<pre><code class="html">
YOUR CONTENT IS HERE
</code></pre>
<pre><code class="css">
YOUR CONTENT IS HERE
</code></pre>
Happy highlighters \m/
Tidak ada komentar:
Posting Komentar