|
1 | 1 | ## HTML Skeleton |
2 | | - <!DOCTYPE html> |
3 | | - <html> |
4 | | - <head> |
5 | | - <meta charset="utf-8"> |
6 | | - <title>Title</title> |
7 | | - </head> |
8 | | - <body> |
9 | | - |
10 | | - </body> |
11 | | - </html> |
| 2 | + |
| 3 | +```html |
| 4 | +<!DOCTYPE html> |
| 5 | +<html> |
| 6 | + <head> |
| 7 | + <meta charset="utf-8"> |
| 8 | + <title>Title</title> |
| 9 | + </head> |
| 10 | + <body> |
| 11 | + |
| 12 | + </body> |
| 13 | +</html> |
| 14 | +``` |
12 | 15 |
|
13 | 16 | ## Headers |
14 | | - <h1>Header</h1> |
15 | | - <h2>Header</h2> |
16 | | - <h2>Header</h2> |
17 | | - <h4>Header</h4> |
18 | | - <h5>Header</h5> |
19 | | - <h6>Header</h6> |
| 17 | +```html |
| 18 | +<h1>Header</h1> |
| 19 | +<h2>Header</h2> |
| 20 | +<h2>Header</h2> |
| 21 | +<h4>Header</h4> |
| 22 | +<h5>Header</h5> |
| 23 | +<h6>Header</h6> |
| 24 | +``` |
20 | 25 |
|
21 | 26 | ## Paragraphs and more |
22 | | - <p>Paragraph content.</p> |
23 | | - <em>emphasized content, styled italic by default</em> |
24 | | - <strong>strong content, styled bold by default</strong> |
| 27 | +```html |
| 28 | +<p>Paragraph content.</p> |
| 29 | +<em>emphasized content, styled italic by default</em> |
| 30 | +<strong>strong content, styled bold by default</strong> |
| 31 | +``` |
25 | 32 |
|
26 | 33 | ## Images |
27 | | - <img src="name-of-my-image.png"> |
28 | | - <img src="http://www.othersite.com/image-name.jpg"> |
| 34 | +```html |
| 35 | +<img src="name-of-my-image.png"> |
| 36 | +<img src="http://www.othersite.com/image-name.jpg"> |
| 37 | +``` |
29 | 38 |
|
30 | 39 | ## Links |
31 | | - <a href="#anchor">Scroll to element on the current page with id "anchor"</a> |
32 | | - <a href="my-other-page.html">Go to a page on my site</a> |
33 | | - <a href="my-other-page.html" target="_blank">Open a new window for a page on my site</a> |
34 | | - <a href="http://www.othersite.com/">Go to a page on some other site</a> |
35 | | - <a href="http://www.othersite.com/" target="_blank">Open a new window for a page on some other site</a> |
| 40 | +```html |
| 41 | +<a href="#anchor">Scroll to element on the current page with id "anchor"</a> |
| 42 | +<a href="my-other-page.html">Go to a page on my site</a> |
| 43 | +<a href="my-other-page.html" target="_blank">Open a new window for a page on my site</a> |
| 44 | +<a href="http://www.othersite.com/">Go to a page on some other site</a> |
| 45 | +<a href="http://www.othersite.com/" target="_blank">Open a new window for a page on some other site</a> |
| 46 | +``` |
36 | 47 |
|
37 | 48 | ## Lists |
38 | 49 |
|
39 | 50 | Lists can be ordered (styled with numbers by default) or unordered (styled with bullets by default). Both contain list items with the actual content of the list. |
40 | 51 |
|
41 | | - <ol> |
42 | | - <li>First list item</li> |
43 | | - <li>Second list item</li> |
44 | | - </ol> |
| 52 | +```html |
| 53 | +<ol> |
| 54 | + <li>First list item</li> |
| 55 | + <li>Second list item</li> |
| 56 | +</ol> |
45 | 57 |
|
46 | | - <ul> |
47 | | - <li>One list item</li> |
48 | | - <li>Another list item</li> |
49 | | - </ul> |
| 58 | +<ul> |
| 59 | + <li>One list item</li> |
| 60 | + <li>Another list item</li> |
| 61 | +</ul> |
| 62 | +``` |
50 | 63 |
|
51 | 64 | Lists can be nested. |
52 | 65 |
|
| 66 | +```html |
| 67 | +<ul> |
| 68 | + <li>One list item |
53 | 69 | <ul> |
54 | | - <li>One list item |
55 | | - <ul> |
56 | | - <li>A list item nested under "One list item"</li> |
57 | | - <li>Another nest list item</li> |
58 | | - </ul> |
59 | | - </li> |
60 | | - <li>Another list item</li> |
| 70 | + <li>A list item nested under "One list item"</li> |
| 71 | + <li>Another nest list item</li> |
61 | 72 | </ul> |
| 73 | + </li> |
| 74 | + <li>Another list item</li> |
| 75 | +</ul> |
| 76 | +``` |
62 | 77 |
|
63 | 78 | ## Containers |
64 | 79 |
|
65 | 80 | Divs and spans are generic containers used to organize HTML. Often, they are given ids and classes so that they can be given specific styling. |
66 | 81 |
|
67 | | - <div>The content in the div</div> |
68 | | - <span>span content</span> |
| 82 | +```html |
| 83 | +<div>The content in the div</div> |
| 84 | +<span>span content</span> |
| 85 | +``` |
69 | 86 |
|
70 | 87 | ## Ids and Classes |
71 | 88 |
|
72 | | -Ids and classes provide a way to use CSS to target specific element(s). Many tags can have the same class. Only one tag can have a particular id. Any tag can be gi |
73 | | -an id and classes.</p> |
74 | | - <tagname id="a-name-uniquely-identifying-this-element">content</tagname> |
75 | | - <tagname class="one-class another-class">content</tagname> |
| 89 | +Ids and classes provide a way to use CSS to target specific element(s). Many tags can have the same class. Only one tag can have a particular id. Any tag can be given an id and classes. |
| 90 | + |
| 91 | +```html |
| 92 | +<tagname id="a-name-uniquely-identifying-this-element">content</tagname> |
| 93 | +<tagname class="one-class another-class">content</tagname> |
| 94 | +``` |
0 commit comments