-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathHTML-Cheatsheet.html
More file actions
172 lines (136 loc) · 4.31 KB
/
HTML-Cheatsheet.html
File metadata and controls
172 lines (136 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!DOCTYPE HTML>
<html>
<head>
<title>HTML Cheatsheet</title>
<!-- Base url -->
<base url="kishmaster.us.to">
<meta charset="UTF-8">
<meta name="description" content="Contains info about meta tags">
<meta name="keywords" content="HTML, meta tags, metadata">
<meta name="robots" content="nofollow">
<meta name="revised" content="kishan, 7/14/2018">
<meta http-equiv="author" content="kishan">
<link rel="stylesheet" type="text/css" href="external.css" >
</head>
<body>
<div class="spancontainer" id="spanouter">
<span>some text here</span>
</div>
<header>
<nav></nav>
</header>
<!-- organize page into logical sections -->
<section></section>
<footer>
</footer>
<h1>A Heading</h1>
<p>
<b>BOLD</b>
<i>italics</i>
<sup>superscript</sup>
<sub>subscript</sub>
<br> <!-- line break -->
<hr> <!-- horizontal line -->
<blockquote>long quotes</blockquote>
<q>inline quote</q>
<address>here is an address</address>
</p>
<!-- unordered list -->
<ul>
<li>First element</li>
<li>Second element</li>
</ul>
<!-- ordered list -->
<ol>
<li>First ordered element</li>
<li>Fecond ordered element</li>
</ol>
<!-- links -->
<a href="/">links</a>
<a href="#target">Jump</a> <!-- anchor -->
<a href="mailto:someone@something.com">email</a>
<a href="http://google.com" target="_blank">new tab</a>
<!-- image -->
<figure>
<img src="/pix/smile.gif" alt="Smile">
<figcaption>This is the visible caption</figcaption>
</figure>
<!-- clicky img -->
<a href="http://www.travel-explorer.com/"><img src="200x150.jpg"></a>
<!-- tables -->
<table>
<thead>
<tr>
<th></th>
<th>header</th>
<th>header2</th>
</tr>
</thead>
<tbody>
<tr>
<th>header3</th>
<td>data1</td>
<td>data2</td>
</tr>
</tbody>
</table>
<form action="http://example.com/subscribe.php" method="post">
<!-- text box -->
<p>username: <input type="text" name="username" placeholder="Your name here"></p>
<p>password: <input type="password" name="password"></p>
<p>comments? <textarea name="comments"></textarea></p>
<!-- radio box -->
<input type="radio" name="genre" value="pop"> Pop
<input type="radio" name="genre" value="rock" checked> Rock
<!-- check box -->
<input type="checkbox" name="genre" value="jazz"> Jazz
<input type="checkbox" name="genre" value="classical" checked> Classical
<!-- drop-down box -->
<select name="devices">
<option value="ipod">iPod</option>
<option value="radio" selected>Radio</option>
</select>
<!-- multi drop-down box -->
<select name="instruments" multiple>
<option value="guitar">Guitar</option>
<option value="drums" selected>Drums</option>
</select>
<!-- file upload -->
<input type="file" name="user-song">
<input type="submit" name="subscribe" value="Subscribe!">
<!-- button -->
<button>A Button?</button>
<input type="hidden" name="page" value="root">
<!-- grouped fieldset -->
<fieldset>
<legend>Contact details</legend>
<label for="email-id">Email:</label>
<input type="email" name="email" id="email-id" required><br>
<label>Website:</label>
<input type"url" name="website" required><br>
<label>Date:</label>
<input type="date" name="depart"><br>
<label>Search:</label>
<input type="search" name="search">
<input type="submit" value="Search now">
</fieldset>
</form>
<!-- inline frame -->
<iframe
width="500"
height="300"
src="iframe_tag_example.cfm"
seamless>
</iframe>
<!-- inline JS script -->
<script type="text/javascript">
alert("I am a script. I ran first!")
</script>
<input type="button" value="Click me" onclick="alert('Thanks, I feel better now!')">
<!-- external JS file -->
<script type="text/javascript" src="external_scripts.js"></script>
<noscript>
You need JavaScript enabled to view the content on this page.
</noscript>
</body>
</html>