Wednesday 19 October 2016

HTML SYNTAX HIGHLIGHTER

HTML SYNTAX HIGHLIGHTER


-----------------------------------------------------------------------------------------------------------------
CODE:
------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='UTF-8'>
<title>View Source Button</title>
<link rel='stylesheet' href='https://css-tricks.com/examples/ViewSourceButton/css/style.css'>
<link rel='stylesheet' href='https://css-tricks.com/examples/ViewSourceButton/css/prettify.css'>
<style>
#source-code { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); }
#source-code:target { display: block; }
#source-code pre { padding: 20px; font: 14px/1.6 Monaco, Courier, MonoSpace; margin: 50px auto; background: rgba(0,0,0,0.8); color: white; width: 80%; height: 80%; overflow: auto; }
#source-code pre a, #source-code pre a span { text-decoration: none; color: #00ccff !important; }
#x { position: absolute; top: 30px; left: 10%; margin-left: -41px; }
.button { background: #00ccff; padding: 10px 20px; color: white; text-decoration: none; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="https://css-tricks.com/examples/ViewSourceButton/prettify/prettify.js"></script>
<script>
$(function() {
$("<pre />", {
"html":   '&lt;!DOCTYPE html>\n&lt;html>\n' +
$("html")
.html()
.replace(/[<>]/g, function(m) { return {'<':'&lt;','>':'&gt;'}[m]})
.replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'<a href="$1">$1</a>') +
'\n&lt;/html>',
"class": "prettyprint"
}).appendTo("#source-code");
prettyPrint();
});
</script>
</head>
<body>
<!-- /*
* PASTE YOUR CODE CSS WHAT U LIKE TO HEIGHLIGHT
*/ -->
<style>
.label-size:last-child {
margin-bottom: 3px;
}
</style>
<script type='text/javascript'>
document.write(fbgadgets("https://4.bp.blogspot.com/-aACo5Lf-lIk/WAPHHOHt59I/AAAAAAABb6c/iIzIRCsFMwkXIQOuYbVKe-4pz5XJq1DFQCLcB/s72-c/GENERIC%2BBLOGGER%2BTEMPLATE.png","Generic Blogger Template"));
</script>
<!-- /*
* PASTE YOUR CODE CSS WHAT U LIKE TO HEIGHLIGHT
*/ -->
<div id="page-wrap">
<h1>Fancy View Source Button</h1>
<p>Click a link, see the source of the page. Click the X or press the back button to close. This uses jQuery and CSS3. </p>
<a class="button" href="#source-code" id="view-source">Fancy View Source</a>
<h1>Primitive Version</h1>
<p>Only works in Firefox and Chrome. Maybe others, but definitely not Safari or Opera.</p>
<a class="button" onClick='window.location="view-source:" + window.location.href'>Primitive View Source</a>
<div id="source-code">
<a href="#" id="x"><img src="http://css-tricks.com/examples/ViewSourceButton/images/x.png" alt="close"></a>
</div>
</div>
</body>
</html>




0 comments:

Post a Comment

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets