| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title>This is a title</title> |
| 5 |
<style> |
| 6 |
/* comment */ |
| 7 |
#xyz { color: red; } |
| 8 |
h1 { font: "Comic Sans"; } |
| 9 |
</style> |
| 10 |
</head> |
| 11 |
<body class="ui main"> |
| 12 |
<p *ngFor="let name of names">Hello, {{ name }}!</p> |
| 13 |
</body> |
| 14 |
|
| 15 |
<!-- JavaScript code --> |
| 16 |
<script> |
| 17 |
document.body.appendChild(document.createTextNode('Hello World!')); // comment |
| 18 |
</script> |
| 19 |
|
| 20 |
<!-- TypeScript code --> |
| 21 |
<script type="text/typescript"> |
| 22 |
class Student { |
| 23 |
fullName: string; |
| 24 |
constructor(public firstName: string, public middleInitial: string, public lastName: string) { |
| 25 |
this.fullName = firstName + " " + middleInitial + " " + lastName; |
| 26 |
} |
| 27 |
} |
| 28 |
let a: null = null; |
| 29 |
let b: number = 12___3; |
| 30 |
</script> |
| 31 |
|
| 32 |
<!-- JSX code --> |
| 33 |
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> |
| 34 |
<script type="text/babel"> |
| 35 |
ReactDOM.render( |
| 36 |
<h1>Hello, world!</h1>, |
| 37 |
document.getElementById('root') |
| 38 |
); |
| 39 |
function Story(props) { |
| 40 |
const SpecificStory = components[props.storyType]; |
| 41 |
return <SpecificStory story={ props.story } attr2="&ref;" attr3="Hello\n" />; |
| 42 |
} |
| 43 |
</script> |
| 44 |
|
| 45 |
<!-- Mustache/Handlebars --> |
| 46 |
<script type="x-tmpl-mustache"> |
| 47 |
{{#movie}} |
| 48 |
<div> |
| 49 |
<h1>{{title}}</h1> |
| 50 |
<img src="{{poster}}" alt="{{title}}"/> |
| 51 |
</div> |
| 52 |
<div> |
| 53 |
Rating - {{ratings.critics_rating}} |
| 54 |
</div> |
| 55 |
{{/movie}} |
| 56 |
{{^movie}} |
| 57 |
<div> |
| 58 |
Movie Does Not Exist :( |
| 59 |
</div> |
| 60 |
{{/movie}} |
| 61 |
{{! comment }} |
| 62 |
</script> |
| 63 |
|
| 64 |
<!-- HTML template --> |
| 65 |
<script type="text/html"> |
| 66 |
<li><a href="link">Hello</a></li> |
| 67 |
</script> |
| 68 |
|
| 69 |
<!-- Close the block correctly after "?" in the JavaScript highlighter --> |
| 70 |
<script> |
| 71 |
? |
| 72 |
</script> |
| 73 |
|
| 74 |
</html> |
| 75 |
<!-- |
| 76 |
|
| 77 |
HTML Syntax Highlight Sample File (Standard) |
| 78 |
|
| 79 |
- Follow HTML5 standard. |
| 80 |
- Contain some valid, but not recommended syntax. |
| 81 |
- Can be rendered by modern web browsers. |
| 82 |
|
| 83 |
@author Guo Yunhe [email protected] |
| 84 |
@date 2016-09-17 |
| 85 |
|
| 86 |
--> |
| 87 |
|
| 88 |
<!DOCTYPE html> |
| 89 |
|
| 90 |
<html> |
| 91 |
|
| 92 |
<head> |
| 93 |
<meta charset="utf-8"> |
| 94 |
<title>HTML Syntax Highlight Sample File (Standard)</title> |
| 95 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
| 96 |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> |
| 97 |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
| 98 |
</head> |
| 99 |
|
| 100 |
<body> |
| 101 |
|
| 102 |
<!-- HTML5 defined elements --> |
| 103 |
|
| 104 |
<div> |
| 105 |
This is a div. <span>This is a span</span> |
| 106 |
<div> |
| 107 |
This is a div. |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
|
| 111 |
<p> |
| 112 |
This is a paragraph. <em></em> |
| 113 |
</p> |
| 114 |
|
| 115 |
<h1>This is heading 1</h1> |
| 116 |
<h2>This is heading 2</h2> |
| 117 |
<h3>This is heading 3</h3> |
| 118 |
<h4>This is heading 4</h4> |
| 119 |
<h5>This is heading 5</h5> |
| 120 |
<h6>This is heading 6</h6> |
| 121 |
|
| 122 |
<a href="http://www.w3schools.com">This is a link</a> |
| 123 |
|
| 124 |
<br> |
| 125 |
|
| 126 |
<img src="http://placehold.it/200x150" alt="This is an image" width="200" height="150"> |
| 127 |
|
| 128 |
<hr> |
| 129 |
|
| 130 |
<ul> |
| 131 |
<li>List item</li> |
| 132 |
<li>List item</li> |
| 133 |
<li>List item</li> |
| 134 |
<li>List item</li> |
| 135 |
<li>List item</li> |
| 136 |
</ul> |
| 137 |
|
| 138 |
<ol> |
| 139 |
<li>List item</li> |
| 140 |
<li>List item</li> |
| 141 |
<li>List item</li> |
| 142 |
<li>List item</li> |
| 143 |
<li>List item</li> |
| 144 |
</ol> |
| 145 |
|
| 146 |
<table> |
| 147 |
<tr> |
| 148 |
<th>Table head</th> |
| 149 |
<th>Table head</th> |
| 150 |
<th>Table head</th> |
| 151 |
</tr> |
| 152 |
<tr> |
| 153 |
<td>Table head</td> |
| 154 |
<td>Table head</td> |
| 155 |
<td>Table head</td> |
| 156 |
</tr> |
| 157 |
</table> |
| 158 |
|
| 159 |
<form> |
| 160 |
<input type="email" name="author"/> |
| 161 |
<input type="text" name="message"/> |
| 162 |
<button type="button">Send</button> |
| 163 |
</form> |
| 164 |
|
| 165 |
<main> |
| 166 |
<header>This is a header.</header> |
| 167 |
|
| 168 |
<nav>This is a nav.</nav> |
| 169 |
|
| 170 |
<article> |
| 171 |
<h2>This is an article.</h2> |
| 172 |
<p>This is an article.</p> |
| 173 |
</article> |
| 174 |
|
| 175 |
<aside> |
| 176 |
<h2>This is an aside.</h2> |
| 177 |
</aside> |
| 178 |
|
| 179 |
<footer></footer> |
| 180 |
|
| 181 |
</main> |
| 182 |
|
| 183 |
<!-- Custom elements --> |
| 184 |
|
| 185 |
<booklist> |
| 186 |
<book> |
| 187 |
<booktitle>Just For Fun: The Story of an Accidental Revolutionary</booktitle> |
| 188 |
<author>Linus Torvalds</author> |
| 189 |
<description |
| 190 |
class="featured" title="Click to read full text..."> |
| 191 |
A humorous autobiography of Linus Torvalds, the creator of the Linux |
| 192 |
kernel, co-written with David Diamond. The book primarily theorizes |
| 193 |
the Law of Linus that all evolution contributed by humanity starts |
| 194 |
for survival, sustains socially and entertains at last. As well as |
| 195 |
this the book explains Torvalds' view of himself, the free software |
| 196 |
movement and the development of Linux.</description> |
| 197 |
</book> |
| 198 |
</booklist> |
| 199 |
|
| 200 |
<large-space/> |
| 201 |
|
| 202 |
<!-- Ends for single tag elements --> |
| 203 |
<br> |
| 204 |
<br/> |
| 205 |
<br /> |
| 206 |
<br></br> |
| 207 |
|
| 208 |
<!-- Uppercase elements --> |
| 209 |
|
| 210 |
<DIV> |
| 211 |
THIS IS A DIV. |
| 212 |
<P>THIS IS A PARAGRAPH.</P> |
| 213 |
<H2>THIS IS A HEADING.</H2> |
| 214 |
</DIV> |
| 215 |
|
| 216 |
<!-- Arrtibutes --> |
| 217 |
|
| 218 |
<a href="#" style="background-color:rgba(0,0,0,0.3)" title="Click me">Magic button</a> |
| 219 |
|
| 220 |
<img src="http://placehold.it/200x150" alt="This is an image" width="200" |
| 221 |
height="150" title="This is an image"> |
| 222 |
|
| 223 |
<!-- Attribute without value --> |
| 224 |
|
| 225 |
<select> |
| 226 |
<option selected>GNU/Linux</option> |
| 227 |
<option>BSD</option> |
| 228 |
<option>Windows</option> |
| 229 |
<option>macOS</option> |
| 230 |
</select> |
| 231 |
|
| 232 |
<!-- Attribute without quotes --> |
| 233 |
|
| 234 |
<div id=name class=a-sweet-block data-counter=175>This is a div.</div> |
| 235 |
|
| 236 |
</body> |
| 237 |
|
| 238 |
</html> |