|
1 | | -<section id="img" class="element"> |
| 1 | +<section id="object" class="element"> |
2 | 2 | <header class="element-header"> |
3 | 3 | <nav class="element-links"> |
4 | 4 | <span> |
|
7 | 7 | No |
8 | 8 | </strong> |
9 | 9 | </span> |
10 | | - <a class="element-links-direct" href="{{site.url}}/element/img/" data-element-name="img" data-tooltip="Single page for this element">Permalink</a> |
11 | | - <a class="element-share" data-tooltip="Share on Twitter or Facebook" data-element-name="img">Share</a> |
12 | | - <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/HTML/Element/img" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a> |
| 10 | + <a class="element-links-direct" href="{{site.url}}/element/object/" data-element-name="object" data-tooltip="Single page for this element">Permalink</a> |
| 11 | + <a class="element-share" data-tooltip="Share on Twitter or Facebook" data-element-name="object">Share</a> |
| 12 | + <a target="_blank" href="https://developer.mozilla.org/en/docs/Web/HTML/Element/object" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a> |
13 | 13 | </nav> |
14 | 14 | <h2 class="element-name"> |
15 | | - <a href="{{site.url}}/#img"> |
| 15 | + <a href="{{site.url}}/#object"> |
16 | 16 | <span>#</span> |
17 | | - img |
| 17 | + object |
18 | 18 | </a> |
19 | 19 | </h2> |
20 | 20 | <div class="element-description"> |
21 | | - <p>Defines an <strong>image</strong> inserted in the web page.</p> |
| 21 | + <p>Defines a container for <strong>external resource</strong>.</p> |
22 | 22 |
|
23 | 23 | </div> |
24 | 24 | </header> |
25 | 25 |
|
26 | | - <div class="example"> |
| 26 | + <div id="object-example-0" class="example"> |
27 | 27 | <p class="example-label"> |
28 | 28 | <strong>Example:</strong> |
29 | | - <a class="example-clipboard" data-tooltip="Click to copy code" data-clipboard-target="#img-example-0">Copy</a> |
| 29 | + <a class="example-clipboard" data-tooltip="Click to copy code" data-clipboard-target="#">Copy</a> |
30 | 30 | </p> |
31 | 31 | <article class="example-preview"> |
32 | | - <div class="example-output"><img src="/images/sunset-360.jpg" alt="Picture of a Ha Long Bay sunset"></div> |
33 | | - <div id="img-example-0" class="example-code">{% highlight html %}<img src="/images/sunset-360.jpg" alt="Picture of a Ha Long Bay sunset">{% endhighlight %}</div> |
34 | | - </article> |
35 | | - </div> |
36 | | - <div class="example"> |
37 | | - <p class="example-label"> |
38 | | - <strong>Example:</strong> |
39 | | - <a class="example-clipboard" data-tooltip="Click to copy code" data-clipboard-target="#img-example-1">Copy</a> |
40 | | - </p> |
41 | | - <article class="example-preview"> |
42 | | - <div class="example-output"><!-- For responsive images, use srcset and sizes --> |
43 | | - |
44 | | -<img src="/images/sunset-360.jpg" |
45 | | - alt="Picture of a Ha Long Bay sunset" |
46 | | - srcset="/images/sunset-360.jpg 360w, |
47 | | - /images/sunset-720.jpg 720w, |
48 | | - /images/sunset-1440.jpg 1440w>" |
49 | | - sizes="(min-width: 800px) 720px, 360px"></div> |
50 | | - <div id="img-example-1" class="example-code">{% highlight html %}<!-- For responsive images, use srcset and sizes --> |
51 | | - |
52 | | -<img src="/images/sunset-360.jpg" |
53 | | - alt="Picture of a Ha Long Bay sunset" |
54 | | - srcset="/images/sunset-360.jpg 360w, |
55 | | - /images/sunset-720.jpg 720w, |
56 | | - /images/sunset-1440.jpg 1440w>" |
57 | | - sizes="(min-width: 800px) 720px, 360px">{% endhighlight %}</div> |
| 32 | + <div class="example-output"></div> |
| 33 | + <div id="" class="example-code">{% highlight html %}{% endhighlight %}</div> |
58 | 34 | </article> |
59 | 35 | </div> |
60 | 36 |
|
61 | | - <article class="attribute attribute--required"> |
| 37 | + <article id="object-data" class="attribute"> |
62 | 38 | <header class="attribute-header"> |
63 | 39 | <h3 class="attribute-name"> |
64 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="src"> |
65 | | - src |
| 40 | + <code class="tag" data-tooltip="Click to copy" data-clipboard-text="data"> |
| 41 | + data |
66 | 42 | </code> |
67 | 43 | </h3> |
68 | 44 | <div class="attribute-description"> |
69 | | - <p>The URL where the image is hosted.</p> |
| 45 | + <p>The URL of the object data.</p> |
70 | 46 |
|
71 | | - <strong class="attribute-is-required">Required.</strong> |
72 | 47 | </div> |
73 | 48 | </header> |
74 | 49 |
|
75 | 50 | <div class="attribute-values"> |
76 | | - <article class="value"> |
| 51 | + <article id="object-data-assetsgolfswf" class="value"> |
77 | 52 | <header class="value-header"> |
78 | 53 | <h4 class="value-name"> |
79 | | - <code class="tag" data-tooltip="Click to copy src="/images/tiramisu.jpg"" data-clipboard-text="src="/images/tiramisu.jpg""> |
80 | | - "/images/tiramisu.jpg" |
| 54 | + <code class="tag" data-tooltip="Click to copy data="/assets/golf.swf"" data-clipboard-text="data="/assets/golf.swf""> |
| 55 | + "/assets/golf.swf" |
81 | 56 | </code> |
82 | 57 | </h4> |
83 | 58 | <div class="value-description"> |
84 | | - <p>You can use a <strong>relative</strong> URL.</p> |
| 59 | + <p>The value must be a valid URL.</p> |
85 | 60 |
|
86 | 61 | </div> |
87 | 62 | </header> |
88 | 63 | <aside class="value-preview"> |
89 | 64 | <div class="value-output"> |
90 | | - <img src="/images/tiramisu.jpg"> |
| 65 | + <object data="/assets/golf.swf" type="application/x-shockwave-flash"> |
91 | 66 |
|
92 | | - </img> |
93 | | - </div> |
94 | | - </aside> |
95 | | - </article> |
96 | | - <article class="value"> |
97 | | - <header class="value-header"> |
98 | | - <h4 class="value-name"> |
99 | | - <code class="tag" data-tooltip="Click to copy src="{{site.url}}/images/traffic.jpg"" data-clipboard-text="src="{{site.url}}/images/traffic.jpg""> |
100 | | - "{{site.url}}/images/traffic.jpg" |
101 | | - </code> |
102 | | - </h4> |
103 | | - <div class="value-description"> |
104 | | - <p>You can use an <strong>absolute</strong> URL.</p> |
105 | | - |
106 | | - </div> |
107 | | - </header> |
108 | | - <aside class="value-preview"> |
109 | | - <div class="value-output"> |
110 | | - <img src="{{site.url}}/images/traffic.jpg"> |
111 | | - |
112 | | - </img> |
| 67 | + </object> |
113 | 68 | </div> |
114 | 69 | </aside> |
115 | 70 | </article> |
116 | 71 | </div> |
117 | 72 | </article> |
118 | | - <article class="attribute attribute--required"> |
| 73 | + <article id="object-type" class="attribute"> |
119 | 74 | <header class="attribute-header"> |
120 | 75 | <h3 class="attribute-name"> |
121 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="alt"> |
122 | | - alt |
| 76 | + <code class="tag" data-tooltip="Click to copy" data-clipboard-text="type"> |
| 77 | + type |
123 | 78 | </code> |
124 | 79 | </h3> |
125 | 80 | <div class="attribute-description"> |
126 | | - <p>Alternative text to describe the image if it's not available. Used by screen readers.</p> |
| 81 | + <p>Defines the type of the application.</p> |
127 | 82 |
|
128 | | - <strong class="attribute-is-required">Required.</strong> |
129 | 83 | </div> |
130 | 84 | </header> |
131 | 85 |
|
132 | 86 | <div class="attribute-values"> |
133 | | - <article class="value"> |
| 87 | + <article id="object-type-applicationx-shockwave-flash" class="value"> |
134 | 88 | <header class="value-header"> |
135 | 89 | <h4 class="value-name"> |
136 | | - <code class="tag" data-tooltip="Click to copy alt="Picture of a man standing in front of the Dragon's Pearl boat"" data-clipboard-text="alt="Picture of a man standing in front of the Dragon's Pearl boat""> |
137 | | - "Picture of a man standing in front of the Dragon's Pearl boat" |
| 90 | + <code class="tag" data-tooltip="Click to copy type="application/x-shockwave-flash"" data-clipboard-text="type="application/x-shockwave-flash""> |
| 91 | + "application/x-shockwave-flash" |
138 | 92 | </code> |
139 | 93 | </h4> |
140 | 94 | <div class="value-description"> |
141 | | - <p>Describe the image as if it was not present.</p> |
| 95 | + <p>The value must be a valid <a href="https://developer.mozilla.org/en-US/docs/Glossary/MIME_type">content type</a>.</p> |
142 | 96 |
|
143 | 97 | </div> |
144 | 98 | </header> |
145 | 99 | <aside class="value-preview"> |
146 | 100 | <div class="value-output"> |
147 | | - <img src="/images/boat.jpg" alt="Picture of a man standing in front of the Dragon's Pearl boat"> |
| 101 | + <object data="/assets/golf.swf" type="application/x-shockwave-flash"> |
148 | 102 |
|
149 | | - </img> |
| 103 | + </object> |
150 | 104 | </div> |
151 | 105 | </aside> |
152 | 106 | </article> |
153 | 107 | </div> |
154 | 108 | </article> |
155 | | - <article class="attribute"> |
| 109 | + <article id="object-height" class="attribute"> |
156 | 110 | <header class="attribute-header"> |
157 | 111 | <h3 class="attribute-name"> |
158 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="srcset"> |
159 | | - srcset |
| 112 | + <code class="tag" data-tooltip="Click to copy" data-clipboard-text="height"> |
| 113 | + height |
160 | 114 | </code> |
161 | 115 | </h3> |
162 | 116 | <div class="attribute-description"> |
163 | | - |
164 | | - </div> |
165 | | - </header> |
| 117 | + <p>Defines the height of the object.</p> |
166 | 118 |
|
167 | | - <div class="attribute-values"> |
168 | | - <article class="value"> |
169 | | - <header class="value-header"> |
170 | | - <div class="value-description"> |
171 | | - |
172 | | - </div> |
173 | | - </header> |
174 | | - <aside class="value-preview"> |
175 | | - <div class="value-output"> |
176 | | - <img srcset> |
177 | | - |
178 | | - </img> |
179 | | - </div> |
180 | | - </aside> |
181 | | - </article> |
182 | | - </div> |
183 | | - </article> |
184 | | - <article class="attribute"> |
185 | | - <header class="attribute-header"> |
186 | | - <h3 class="attribute-name"> |
187 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="sizes"> |
188 | | - sizes |
189 | | - </code> |
190 | | - </h3> |
191 | | - <div class="attribute-description"> |
192 | | - |
193 | 119 | </div> |
194 | 120 | </header> |
195 | 121 |
|
196 | 122 | <div class="attribute-values"> |
197 | | - <article class="value"> |
| 123 | + <article id="object-height-50" class="value"> |
198 | 124 | <header class="value-header"> |
| 125 | + <h4 class="value-name"> |
| 126 | + <code class="tag" data-tooltip="Click to copy height="50"" data-clipboard-text="height="50""> |
| 127 | + "50" |
| 128 | + </code> |
| 129 | + </h4> |
199 | 130 | <div class="value-description"> |
200 | | - |
| 131 | + <p>The height in pixels.</p> |
| 132 | + |
201 | 133 | </div> |
202 | 134 | </header> |
203 | 135 | <aside class="value-preview"> |
204 | 136 | <div class="value-output"> |
205 | | - <img sizes> |
| 137 | + <object data="/assets/golf.swf" type="application/x-shockwave-flash" height="50"> |
206 | 138 |
|
207 | | - </img> |
| 139 | + </object> |
208 | 140 | </div> |
209 | 141 | </aside> |
210 | 142 | </article> |
211 | 143 | </div> |
212 | 144 | </article> |
213 | | - <article class="attribute"> |
| 145 | + <article id="object-width" class="attribute"> |
214 | 146 | <header class="attribute-header"> |
215 | 147 | <h3 class="attribute-name"> |
216 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="crossorigin"> |
217 | | - crossorigin |
| 148 | + <code class="tag" data-tooltip="Click to copy" data-clipboard-text="width"> |
| 149 | + width |
218 | 150 | </code> |
219 | 151 | </h3> |
220 | 152 | <div class="attribute-description"> |
221 | | - |
| 153 | + <p>Defines the width of the object.</p> |
| 154 | + |
222 | 155 | </div> |
223 | 156 | </header> |
224 | 157 |
|
225 | 158 | <div class="attribute-values"> |
226 | | - <article class="value"> |
| 159 | + <article id="object-width-150" class="value"> |
227 | 160 | <header class="value-header"> |
228 | 161 | <h4 class="value-name"> |
229 | | - <code class="tag" data-tooltip="Click to copy crossorigin="anonymous"" data-clipboard-text="crossorigin="anonymous""> |
230 | | - "anonymous" |
| 162 | + <code class="tag" data-tooltip="Click to copy width="150"" data-clipboard-text="width="150""> |
| 163 | + "150" |
231 | 164 | </code> |
232 | 165 | </h4> |
233 | 166 | <div class="value-description"> |
234 | | - |
235 | | - </div> |
236 | | - </header> |
237 | | - <aside class="value-preview"> |
238 | | - <div class="value-output"> |
239 | | - <img crossorigin="anonymous"> |
240 | | - |
241 | | - </img> |
242 | | - </div> |
243 | | - </aside> |
244 | | - </article> |
245 | | - <article class="value"> |
246 | | - <header class="value-header"> |
247 | | - <h4 class="value-name"> |
248 | | - <code class="tag" data-tooltip="Click to copy crossorigin="use-credentials"" data-clipboard-text="crossorigin="use-credentials""> |
249 | | - "use-credentials" |
250 | | - </code> |
251 | | - </h4> |
252 | | - <div class="value-description"> |
253 | | - |
| 167 | + <p>The width in pixels.</p> |
| 168 | + |
254 | 169 | </div> |
255 | 170 | </header> |
256 | 171 | <aside class="value-preview"> |
257 | 172 | <div class="value-output"> |
258 | | - <img crossorigin="use-credentials"> |
| 173 | + <object data="/assets/golf.swf" type="application/x-shockwave-flash" height="50" width="150"> |
259 | 174 |
|
260 | | - </img> |
| 175 | + </object> |
261 | 176 | </div> |
262 | 177 | </aside> |
263 | 178 | </article> |
264 | 179 | </div> |
265 | 180 | </article> |
266 | | - <article class="attribute"> |
267 | | - <header class="attribute-header"> |
268 | | - <h3 class="attribute-name"> |
269 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="height"> |
270 | | - height |
271 | | - </code> |
272 | | - </h3> |
273 | | - <div class="attribute-description"> |
274 | | - |
275 | | - </div> |
276 | | - </header> |
277 | | - |
278 | | - <div class="attribute-values"> |
279 | | - </div> |
280 | | - </article> |
281 | | - <article class="attribute"> |
282 | | - <header class="attribute-header"> |
283 | | - <h3 class="attribute-name"> |
284 | | - <code class="tag" data-tooltip="Click to copy" data-clipboard-text="width"> |
285 | | - width |
286 | | - </code> |
287 | | - </h3> |
288 | | - <div class="attribute-description"> |
289 | | - |
290 | | - </div> |
291 | | - </header> |
292 | | - |
293 | | - <div class="attribute-values"> |
294 | | - </div> |
295 | | - </article> |
296 | 181 | </section> |
297 | 182 |
|
0 commit comments