├── InputTypes.html ├── br.html ├── button.html ├── containers.html ├── form_elements.html ├── graphics.html ├── headings.html ├── hr.html ├── images.html ├── index.html ├── input_attributes.html ├── links.html ├── list.html ├── media.html ├── style.css ├── table.html └── text.html /InputTypes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Input Types 9 | 10 | 11 | 12 |
13 |
14 | 15 | 16 | 17 |

<input>: The Input (Form Input) element

18 |

19 | The <input> HTML element is used to create 20 | interactive controls for web-based forms in order to accept data from 21 | the user; a wide variety of types of input data and control widgets 22 | are available, depending on the device and user agent. This element is 23 | one of the most powerful and complex in all of HTML due to the sheer 24 | number of combinations of input types and attributes. 25 |

26 |

27 | Syntax: <input type="" attribute=""> 28 |

29 |
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 43 | 49 | 52 | 53 | 54 | 55 | 60 | 61 | 62 | 63 | 64 | 70 | 73 | 74 | 75 | 76 | 87 | 90 | 91 | 92 | 93 | 98 | 101 | 102 | 103 | 104 | 115 | 124 | 125 | 126 | 127 | 137 | 140 | 141 | 142 | 143 | 150 | 153 | 154 | 155 | 156 | 166 | 169 | 170 | 171 | 172 | 180 | 181 | 182 | 183 | 184 | 194 | 202 | 203 | 204 | 205 | 211 | 212 | 213 | 214 | 215 | 223 | 224 | 225 | 226 | 227 | 234 | 235 | 236 | 237 | 238 | 248 | 249 | 250 | 251 | 252 | 257 | 258 | 259 | 260 | 261 | 272 | 280 | 281 | 282 | 283 | 292 | 293 | 294 | 295 | 296 | 301 | 302 | 303 | 304 | 305 | 317 | 318 | 319 | 320 | 321 | 327 | 328 | 329 | 330 |
TypesDescriptionBasic example
41 | Button 42 | 44 | <input type="button" value="Click me">
46 | A push button with no default behavior displaying the value of the 47 | value attribute, empty by default. 48 |
50 | 51 |
Checkbox 56 | <input type="checkbox" checked >
58 | A check box allowing single values to be selected/deselected. 59 |
Color 65 | <input type="color">
67 | A control for specifying a color; opening a color picker when 68 | active in supporting browsers. 69 |
71 | 72 |
Date 77 | <input type="date" min="1920-01-01" 80 | max="2100-01-01">
83 | A control for entering a date (year, month, and day, with no 84 | time). Opens a date picker or numeric wheels for year, month, day 85 | when active in supporting browsers. 86 |
88 | 89 |
Month 94 | <input type="month" min="2022-01">
96 | A control for entering a month and year, with no time zone. 97 |
99 | 100 |
Email 105 | <input type="email" pattern=".+@globex\.com" 108 | placeholder="myemail@global.com" required>
111 | A field for editing an email address. Looks like a text input, but 112 | has validation parameters and relevant keyboard in supporting 113 | browsers and devices with dynamic keyboards. 114 |
116 | 123 |
File 128 | <input type="file" accept="mage/png, image/jpeg">
133 | A field for editing an email address. Looks like a text input, but 134 | has validation parameters and relevant keyboard in supporting 135 | browsers and devices with dynamic keyboards. 136 |
138 | 139 |
Hidden 144 | <input type="hidden">
146 | A control that is not displayed but whose value is submitted to 147 | the server. There is an example in the next column, but it's 148 | hidden! 149 |
151 | 152 |
Image 157 | <input type="image" alt="there is no real picture 160 | here">
163 | A graphical submit button. Displays an image defined by the src 164 | attribute. The alt attribute displays if the image src is missing. 165 |
167 | 168 |
Number 173 | <input type="number" placeholder="Number">
176 | A control for entering a number. Displays a spinner and adds 177 | default validation when supported. Displays a numeric keypad in 178 | some devices with dynamic keypads. 179 |
Password 185 | <input type="password" placeholder="Enter your password" 188 | required>
191 | A single-line text field whose value is obscured. Will alert user 192 | if site is not secure. 193 |
195 | 201 |
Radio 206 | <input type="radio">
208 | A radio button, allowing a single value to be selected out of 209 | multiple choices with the same name value. 210 |
Range 216 | <input type="range" min="0" max="100">
218 | A control for entering a number whose exact value is not 219 | important. Displays as a range widget defaulting to the middle 220 | value. Used in conjunction min and max to define the range of 221 | acceptable values. 222 |
Reset 228 | <input type="reset">
230 | 231 | A button that resets the contents of the form to default values. 232 | Not recommended. 233 |
Search 239 | <input type="search" name="q">
241 | 242 | A single-line text field for entering search strings. Line-breaks 243 | are automatically removed from the input value. May include a 244 | delete icon in supporting browsers that can be used to clear the 245 | field. Displays a search icon instead of enter key on some devices 246 | with dynamic keypads. 247 |
Submit 253 | <input type="submit">
255 | A button that submits the form. 256 |
Tel 262 | <input type="tel" required placeholder="Phone number" 265 | >
268 | 269 | A control for entering a telephone number. Displays a telephone 270 | keypad in some devices with dynamic keypads. 271 |
273 | 279 |
Text 284 | <input type="text" placeholder="Type your name" >
289 | The default value. A single-line text field. Line-breaks are 290 | automatically removed from the input value. 291 |
Time 297 | <input type="time">
299 | A control for entering a time value with no time zone. 300 |
URL 306 | <input type="url" placeholder="https://example.com" 309 | >
312 | 313 | A field for entering a URL. Looks like a text input, but has 314 | validation parameters and relevant keyboard in supporting browsers 315 | and devices with dynamic keyboards. 316 |
Week 322 | <input type="week">
324 | A control for entering a date consisting of a week-year number and 325 | a week number with no time zone. 326 |
331 |
332 | 333 | 334 | 335 | 336 | 337 | -------------------------------------------------------------------------------- /br.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BR 9 | 24 | 25 | 26 |
27 | BACK 28 |

BR ELEMENT

29 |
30 |
31 |

BR

32 |

The <br> inserts a single line break.
It's useful for poems or addresses.

33 |
34 |
35 |

EXAMPLE

36 |
37 |             <Ms Julia Thomson<br>Stars & Planet Inc<br>76 Camptown Road<br>Chicago, IL 60710&<br>UNITED STATES</p>
38 |         
39 |

Ms Julia Thomson
Stars & Planet Inc
76 Camptown Road
Chicago, IL 60710
UNITED STATES

40 |
41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Button 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

<button>: The Button element

18 |

19 | The <button> HTML element represents a clickable 20 | button, used to submit forms or anywhere in a document for accessible, 21 | standard button functionality. 22 |

23 |

Syntax: <button type="button" atribute="">

24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 49 | 52 | 53 | 54 | 55 | 56 | 63 | 66 | 67 | 68 | 69 | 70 | 78 | 81 | 82 | 83 |
TypeDescriptionBasic example
36 | Button 37 | 39 | <button type="button">Click me</button>
45 | The button has no default behavior, and does nothing when pressed 46 | by default. It can have client-side scripts listen to the 47 | element's events, which are triggered when the events occur. 48 |
50 | 51 |
Reset 57 | <button type="reset">
59 | The button resets all the controls to their initial values, like 60 | <input type="reset">. (This behavior tends to 61 | annoy users.) 62 |
64 | 65 |
Submit 71 | <button type="submit">
73 | The button submits the form data to the server. This is the 74 | default if the attribute is not specified for buttons associated 75 | with a <form>, or if the attribute is an empty 76 | or invalid value. 77 |
79 | 80 |
84 |
85 |
86 |

Attributes

87 | 88 | name 89 |

90 | The name attribute specifies the name for a 91 | <button> 92 | element. The name attribute is used to reference form-data after the 93 | form has been submitted, or to reference the element in a 94 | JavaScript.
95 |

96 | <button type="submit"name="btn"> 97 |
98 | 99 |
100 | value 101 |

102 | Defines the value associated with the button's 103 | name when it's submitted with the form data. This value 104 | is passed to the server in params when the form is submitted using 105 | this button. 106 |

107 | <button type="submit" name="score" value="high"> 110 | 112 |
113 | 114 |
115 | disable 116 |

117 | This Boolean attribute prevents the user from interacting with the 118 | button: it cannot be pressed or focused. 119 |

120 | <button type="submit" name="score" value="high" disable> 123 | 125 |
126 |
127 |
128 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /containers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML CONTAINERS 7 | 8 | 9 | 44 | 45 | 46 |

HTML CONTAINERS

47 | 48 | 49 | 57 | 62 | 63 | 64 | 73 | 79 | 80 | 81 | 88 | 94 | 95 | 96 | 108 | 114 | 115 | 116 | 131 | 138 | 139 | 140 | 150 | 154 | 155 | 156 | 173 | 183 | 184 | 185 | 196 | 204 | 205 | 206 | 223 | 229 | 230 | 231 | 240 | 248 | 249 |
50 |

BLOCKQUOTE

51 | 52 | <blockquote cite="http://www.worldwildlife.org/who/index.html"> 53 | For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. 54 | </blockquote> 55 | 56 |
58 |
59 | For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. 60 |
61 |
65 |

DIV

66 | 67 | <div class="myDiv">
68 | <h2>This is a heading in a div element</h2>
69 | <p>This is some text in a div element.</p>
70 | </div> 71 |
72 |
74 |
75 |

This is a heading in a div element

76 |

This is some text in a div element.

77 |
78 |
82 |

AREA
83 | The <area> tag defines an area inside an image map (an image map is an image with clickable areas). 84 |
<area> elements are always nested inside a <map> tag. 85 |
Note: The usemap attribute in <img> is associated with the <map> element's name attribute, and creates a relationship between the image and the map. 86 |

87 |
89 | GroguAndMug 90 | 91 | BabyYoda 92 | 93 |
97 |

SECTION

98 | 99 | The <section> tag defines a section in a document. 100 | 101 | 102 | <section> 103 | <h2>WWF History</h2> 104 | <p>The World Wide Fund for Nature (WWF) is an international organization working on issues regarding the conservation, research and restoration of the environment, formerly named the World Wildlife Fund. WWF was founded in 1961.</p> 105 | </section> 106 | 107 |
109 |
110 |

WWF History

111 |

The World Wide Fund for Nature (WWF) is an international organization working on issues regarding the conservation, research and restoration of the environment, formerly named the World Wildlife Fund. WWF was founded in 1961.

112 |
113 |
117 |

ASIDE

118 |

119 | 120 | The <aside> tag defines some content aside from the content it is placed in. 121 |
122 | The aside content should be indirectly related to the surrounding content. 123 |
124 | Tip: The <aside> content is often placed as a sidebar in a document. 125 |
126 | Note: The <aside> element does not render as anything special in a browser. However, you can use CSS to style the <aside> element (see example below). 127 |
128 | 129 |

130 |
132 |

My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!

133 | 137 |
141 |

PARAGRAPHS

142 |

143 | 144 | The HTML <p> element defines a paragraph. 145 | 146 | A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph. 147 | 148 |

149 |
151 |

This is a paragraph.

152 |

This is another paragraph.

153 |
157 |

ARTICLE

158 |

159 | The <article> tag specifies independent, self-contained content. 160 | An article should make sense on its own and it should be possible to distribute it independently from the rest of the site. 161 |

162 | 163 | <article>
164 | <header> 165 | <h1>A heading here</h1> 166 | <p>Posted by John Doe</p> 167 | <p>Some additional information here</p> 168 | </header> 169 | <p>Lorem Ipsum dolor set amet....</p>
170 | </article> 171 |
172 |
174 |
175 |
176 |

A heading here

177 |

Posted by John Doe

178 |

Some additional information here

179 |
180 |

Lorem Ipsum dolor set amet....

181 |
182 |
186 |

NAV

187 | 188 | <nav> 189 | <a href="/html/">HTML</a> |
190 | <a href="/css/">CSS</a> |
191 | <a href="/js/">JavaScript</a> |
192 | <a href="/python/">Python</a>
193 | </nav> 194 |
195 |
197 | 203 |
207 |

FOOTER

208 |

209 | 210 |

211 | The <footer> tag defines a footer for a document or section. 212 | 213 | A <footer> element typically contains: 214 |
    215 |
  • authorship information
  • 216 |
  • copyright information
  • 217 |
  • contact information
  • 218 |
  • sitemap
  • 219 |
  • back to top links
  • 220 |
  • related documents
  • 221 |
222 |
224 | 228 |
232 |

TEMPLATE

233 |

234 | The <template> tag is used as a container to hold some HTML content hidden from the user when the page loads. 235 | 236 | The content inside <template> can be rendered later with a JavaScript. 237 | You can use the <template> tag if you have some HTML code you want to use over and over again, but not until you ask for it. To do this without the <template> tag, you have to create the HTML code with JavaScript to prevent the browser from rendering the code. 238 |

239 |
241 | 242 | 247 |
250 | 251 | 252 | 253 | 257 | 258 | -------------------------------------------------------------------------------- /form_elements.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Form Elements 10 | 30 | 31 | 32 |
33 | BACK 34 |

FORM ELEMENTS

35 |
36 |
37 |

INPUT

38 |

The <input> tag specifies an input field where the user can enter data.

39 |
40 |
41 |

EXAMPLE

42 |
 43 |             <input type="checkbox" id="checkbox" name="checkbox"/>
 44 |         
45 |
46 | 47 |
48 |
49 |

TYPES

50 | 74 |
75 |
76 |
77 |
78 |
79 |

SELECT

80 |

The <select> element is used to create a drop-down list.

81 |
82 |
83 |

EXAMPLE

84 |
 85 |             <select name="colors" id="colors">
 86 |                 <option value="azul">Azul<option>
 87 |                 <option value="amarillo">Amarillo<option>
 88 |                 <option value="rojo">Rojo<option>
 89 |                 <option value="verde">Verde<option>
 90 |                 <option value="negro">Negro<option>
 91 |             </select>
 92 |         
93 |
94 | 101 |
102 |
103 |
104 |
105 |
106 |

TEXTAREA

107 |

The <textarea> tag defines a multi-line text input control.

108 |
109 |
110 |

EXAMPLE

111 |
112 |             <textarea id="textarea" name="textarea" rows="4" cols="50">A new revolutionary model 
113 |             to create school of the future and train top software engineers.</textarea>
114 |         
115 |
116 | 118 |
119 |
120 |
121 |
122 |
123 |

BUTTON

124 |

The <button> tag defines a clickable button.

125 |
126 |
127 |

EXAMPLE

128 |
129 |             <button id="button" type="button">Click to win the lottery!!<button>
130 |         
131 |

This is a button element:


132 | 133 |
134 |
135 |
136 |
137 |
138 |

FIELDSET

139 |

The <fieldset> tag is used to group related elements in a form.

140 |
141 |
142 |

EXAMPLE

143 |
144 |             <fieldset id="fieldset" name="fieldset" style="width: 15%;">
145 |                 <legend><Personal Details><legend>
146 |                 <label for="fname">First Name: <label>
147 |                 <input type="text" id="fname" name="fname">
148 |                 <label for="lname">Last Name: <label>
149 |                 <input type="text" id="lname" name="lname">
150 |                 <label for="tel">Number Phone: <label>
151 |                 <input type="tel" id="tel" name="tel" placeholder="+34 656 768 443" 
152 |                     pattern="+[0-9]{3}-[0-9]{3}-[0-9]{4}">
153 |             </fieldset>
154 |         
155 |

This is a fieldset element:


156 |
157 | Personal Details 158 | 159 |
160 | 161 |
162 | 163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |

DATALIST

171 |

The <datalist> tag specifies a list of pre-defined options for an <input> element.

172 |
173 |
174 |

EXAMPLE

175 |
176 |             <input list="carbrands" name="carbrands" id="carsbrands"/>
177 |             <datalist id="carbrands">
178 |                <option value="VW">
179 |                <option value="Audi">
180 |                <option value="Mercedes">
181 |                <option value="Toyota">
182 |                <option value="Renault">
183 |             </datalist>
184 |         
185 |

This is a datalist element:

186 |
187 | 188 | 189 | 195 |
196 |
197 |
198 |
199 |
200 |

OUTPUT

201 |

The <outputt> tag is used to represent the result of a calculation (like one performed by a script).

202 |
203 |
204 |

EXAMPLE

205 |
206 |             <form oninput="x.value=parseInt(a.value)+parseInt(b.value)">
207 |                 <input type="range" id="a" value="50">
208 |                 +<input type="number" id="b" value="25">
209 |                 =<output name="x" for="a b"><output>
210 |             </form>
211 |         
212 |

This is a output element:

213 |
214 | 215 | + 216 | = 217 |
218 |
219 | 220 | 221 | 222 | 223 | -------------------------------------------------------------------------------- /graphics.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Graphics 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

The Graphics elements

18 |

<canvas>

19 |

20 | Use the HTML <canvas> element with either the 21 | canvas scripting API or the WebGL API to draw graphics and 22 | animations.
23 | Unlike the <img> element, the <canvas>element requires the 24 | closing tag (</canvas>). 25 |

26 |
27 | 28 |
29 |
30 |

Attributes

31 | height 32 |

33 | The height of the coordinate space in CSS pixels. Defaults to 150. 34 |

35 | >
36 | <canvas height="50"></canvas> 37 |
38 | 39 |
40 | width 41 |

42 | The width of the coordinate space in CSS pixels. Defaults to 300. 43 |

44 | .
45 | <canvas height="50" width="50" ></canvas> 46 |
47 |
48 | 49 |
50 |

<svg>

51 |

52 | The svg element is a container that defines a new 53 | coordinate system and viewport. It is used as the outermost element of 54 | SVG documents, but it can also be used to embed an SVG fragment inside 55 | an SVG or HTML document. 56 |

57 |
58 |

Example:

59 | 67 | 68 | 71 |
76 | <svg xmlns="http://www.w3.org/2000/svg" class="svg-study" 78 | fill="none" viewBox="0 0 24 24" stroke="currentColor" 79 | stroke-width="2">
80 | <path d="M12 14l9-5-9-5-9 5 9 5z" />
81 | <path d="M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 82 | 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 83 | 01.665-6.479L12 14z" />
84 | <path stroke-linecap="round" stroke-linejoin="round" d="M12 85 | 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 86 | 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 87 | 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222" />
88 | </svg>
90 |
91 |
92 |
93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /headings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML HEADINGS 7 | 8 | 9 | 37 | 38 | 39 |

HTML5 HEADINGS

40 | 41 | 42 | 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 |
43 | HTML headings are defined with the <h1> to <h6> tags. 44 | 45 | <h1> defines the most important heading. <h6> defines the least important heading. 46 | 47 |
<h1>Heading 1</h1>

Heading 1

<h1>Heading 2</h1>

Heading 2

<h1>Heading 3</h1>

Heading 3

<h1>Heading 4</h1>

Heading 4

<h1>Heading 5</h1>
Heading 5
<h1>Heading 6</h1>
Heading 6
75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /hr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | HR 9 | 24 | 25 | 26 |
27 | BACK 28 |

HR ELEMENT

29 |
30 |
31 |

HR

32 |

The <hr> tag defines a thematic break in an HTML page (e.g. a shift of topic).
33 | The <hr> element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.

34 |
35 |
36 |

EXAMPLE

37 |
38 |             <hr style="height: 2px; border-width: 2; color:gray; background-color: blue; width: 80%;">
39 |         
40 |
41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /images.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML IMAGES 7 | 8 | 9 | 37 | 38 | 39 |

HTML IMAGES

40 | 41 | 42 | 47 | 48 | 49 | 53 | 56 | 57 | 58 | 62 | 68 | 69 |
43 | The HTML <img> tag is used to embed an image in a web page.
44 | Images are not technically inserted into a web page; images are linked to web pages. The <img> tag creates a holding space for the referenced image.
45 | The <img> tag is empty, it contains attributes only, and does not have a closing tag. 46 |
50 |

Syntax

51 | <img src="url" alt="alternatetext" width="x" height="x"> 52 |
54 | LagoDiComo 55 |
59 |

Syntax of an image with a link within

60 | <img src="url" alt="alternatetext" width="x" height="x"> 61 |
63 | 64 | LagoDiComo 65 | 66 | 67 |
70 | 71 | 72 | 73 | 77 | 78 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML CHEATSHEET 7 | 8 | 9 | 27 | 28 | 29 |

HTML CHEATSHEET

30 | 89 | 90 | -------------------------------------------------------------------------------- /input_attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Input Attributes 10 | 30 | 31 | 32 |
33 | 34 | 35 | 36 |

INPUT ATTRIBUTES

37 |
38 |
39 |

VALUE

40 |

The value attribute on an <input> tag sets the value of the element.

41 |
42 |
43 |

EXAMPLE

44 | 45 | <input type="text" id="school" name="school" value="Assembler"> 46 | 47 |

Input type "text" with a value="Assembler"

48 |
49 | 50 |
51 |
52 |
53 |
54 |
55 |

READONLY

56 |

The readonly attribute on an <input> tag specifies that the input element is read-only, which means the field is non-editable.

57 |
58 |
59 |

EXAMPLE

60 | 61 | <input type="text" id="book" name="book" value="The world of yesterday" readonly> 62 | 63 |

Input type "text" with a value="The world of yesterday"

64 |
65 | 66 |

Note: The field is not editable, but its value is including during form submission. 67 |

68 |
69 |
70 |
71 |
72 |

DISABLED

73 |

The disabled attribute on an <input> tag disables the input element.

74 |
75 |
76 |

EXAMPLE

77 | 78 | <input type="text" id="name" name="name" disabled> 79 | 80 |

Input type "text" with no value and disabled.

81 |
82 | 83 |

Note: The input field is not usable and its value is not included during form submission. 84 |

85 |
86 |
87 |
88 |
89 |

SIZE

90 |

The size attribute on an <input> tag defines the character width of the element.

91 |
92 |
93 |

EXAMPLE

94 | 95 | <input type="text" id="subject" name="subject" value="Mathematics" size="25"> 96 | 97 |

The textbox is 25 characters wide.

98 |
99 | 100 |

Note: The input field has 25 characters visibles. 101 |

102 |
103 |
104 |
105 |
106 |

MAXLENGHT

107 |

The maxlength attribute on an <input> tag specifies the maximum number of characters that can be entered in the input field.

108 |

Default is 524,288 characters.

109 |
110 |
111 |

EXAMPLE

112 | 113 | <input type="text" id="city" name="city" maxlength="10"/> 114 | 115 |

The input text allows to introduce 10 characters.

116 |
117 | 118 |
119 |
120 |
121 |
122 |
123 |

MIN AND MAX

124 |

The min attribute on an <input> tag sets the minimum value for that element.

125 |

The max attribute on an <input> tag sets the maximun value for that element.

126 |
127 |
128 |

EXAMPLE

129 | 130 | <input type="text" id="quantity" name="quantity" min="1" max="10" value="3"> 131 | 132 |

Values between 1 and 10.

133 |
134 | 135 |
136 |
137 |
138 |
139 |
140 |

MULTIPLE

141 |

The multiple attribute is a boolean attribute. 142 | When present, it specifies that the user is allowed to enter/select more than one value.

143 |
144 |
145 |

EXAMPLE

146 | 147 | <input type="file" id="files" name="files" alt="No file choosen" multiple > 148 | 149 |

Try to select more than one file:

150 | 151 |
152 | 153 |
154 |
155 |
156 |
157 |
158 |

PATTERN

159 |

The pattern attribute on an <input> tag specifies a regular expression which validates the input data before form submission.

160 |
161 |
162 |

EXAMPLE

163 | 164 | <input type="text" id="idcard" name="idcard" pattern="[0-9]]{8}[A-Z]"/> 165 | 166 |

Introduce your national identity card:

167 | 168 |
169 |
170 |
171 |
172 |
173 |

PLACEHOLDER

174 |

The placeholder attribute specifies a short hint that describes the expected value of an input field.

175 |
176 |
177 |

EXAMPLE

178 | 179 | <input type="text" id="idnumber" name="idnumber" placeholder="e.g, 99999999X" pattern="[0-9]]{8}[A-Z]"> 180 | 181 |

Introduce your national identity card:

182 | 183 |
184 |
185 |
186 |
187 |
188 |

REQUIRED

189 |

The required attribute on an <input> tag specifies that data must be provided before submitting the form.

190 |
191 |
192 |

EXAMPLE

193 | 194 | <input type="text" id="firstname" name="firstname" required> 195 | 196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |

STEP

204 |

The step attribute on an <input> tag sets the stepped increment value for the input element.

205 |
206 |
207 |

EXAMPLE

208 | 209 | <input type="number" id="numberstep" name="numberstep" step="5"> 210 | 211 |

212 |
213 | 214 |
215 |
216 |
217 |
218 |
219 |

AUTOFOCUS

220 |

The autofocus attribute sets focus to the input element upon page load.

221 |
222 |
223 |

EXAMPLE

224 | 225 | <input type="text" id="entername" name="entername" placeholder="Enter your name" autofocus> 226 | 227 | 228 |
229 |
230 |
231 |
232 |
233 |

HEIGHT AND WIDTH

234 |

The height attribute specifies the height of the element, in pixels.

235 |

The width attribute specifies the width of the element, in pixels.

236 |
237 |
238 |

EXAMPLE

239 | 240 | <canvas id="myCanvas" width="200" height="200" style="border:1px solid><canvas> 241 | 242 |

Canvas's size 200x200

243 | 244 |
245 |
246 |
247 |
248 |
249 |

LIST

250 |

The list attribute on an <input> tag associates the input element with a <datalist>.

251 |
252 |
253 |

EXAMPLE

254 |
255 |             
256 |                 <input list="favplaces" name="favplaces" id="places">
257 |                 <datalist id="places">
258 |                    <option value="Playa">
259 |                    <option value="Montaña">
260 |                 <datalist>
261 |             
262 |         
263 |
264 | 265 | 266 | 269 |
270 |
271 |
272 |
273 |
274 |

FORM

275 |

The form attribute specifies the form the element belongs to.

276 |
277 |
278 |

EXAMPLE

279 | 280 | <input form="myform" type="text" name="lastname" placeholder="Last name"> 281 | 282 |

This input text is associated with "myform" forms

283 |
284 | 285 |
286 | 287 | 288 | 289 | 290 | -------------------------------------------------------------------------------- /links.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML LINKS 7 | 8 | 9 | 41 | 42 | 43 |

HTML5 LINKS

44 | 45 | 46 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 64 | 65 | 66 |
47 | HTML links are hyperlinks.
48 | You can click on a link and jump to another document.
49 | When you move the mouse over a link, the mouse arrow will turn into a little hand.
50 | Note: A link does not have to be text. A link can be an image or any other HTML element!
54 |

Syntax

55 | <a href="url">link text</a> 56 |
Main menu
61 |

Syntax

62 | <a href="https://www.w3schools.com/" target="_blank">Visit W3Schools.com!</a> 63 |
Visit W3Schools.com!
67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Lists 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Lists element

18 |
19 |
20 |

<ul>: The Unordered List element

21 |

22 | The <ul> HTML element represents an unordered list 23 | of items, typically rendered as a bulleted list. 24 |

25 |
26 |
27 |

Attributes

28 | 29 |
30 |
31 | square 32 |

This atribute create dot square in the list

33 | <ul>
35 | <li>Onion</li>
36 | <li>Tomate</li>
37 | <li>Garlic</li>
38 | </ul>
40 |
    41 |
  • Onion
  • 42 |
  • Tomate
  • 43 |
  • Garlic
  • 44 |
45 |
46 | 47 |
48 | circle 49 |

This atribute create dot cicle in the list.

50 | 51 | <ul>
53 | <li>Bier</li>
54 | <li>Wine</li>
55 | <li>Water</li>
56 | </ul>
58 |
    59 |
  • Bier
  • 60 |
  • Wine
  • 61 |
  • Water
  • 62 |
63 |
64 | 65 |
66 | disc 67 |

This atribute create dot disc in the list.

68 | <ul>
70 | <li>Orange</li>
71 | <li>Limon</li>
72 | <li>Watermelon</li>
73 | </ul>
75 |
    76 |
  • Orange
  • 77 |
  • Limon
  • 78 |
  • Watermelon
  • 79 |
80 |
81 |
82 | 83 |
84 |

<ol>: The ordered List element.

85 |

86 | The <ol> HTML element represents an ordered list of 87 | items, typically rendered as a numbered list. 88 |

89 | 90 |

Attributes

91 |
92 |
93 | reversed 94 |

95 | This Boolean attribute specifies that the list's items are in 96 | reverse order. Items will be numbered from high to low. 97 |

98 | <ol reversed >
100 | <li>Ricardo</li>
101 | <li>Pablo</li>
102 | <li>Soraia</li>
103 | </ol>
105 |
    106 |
  1. Ricardo
  2. 107 |
  3. Pablo
  4. 108 |
  5. Soraia
  6. 109 |
110 |
111 | 112 |
113 | start 114 |

115 | An integer to start counting from for the list items. Always an 116 | Arabic numeral (1, 2, 3, etc.), even when the numbering 117 | type is letters or Roman numerals. For example, to 118 | start numbering elements from the letter "d" or the Roman numeral 119 | "iv," use start="6". 120 |

121 | <ol>
123 | <li>Monica</li>
124 | <li>Peter</li>
125 | <li>Layla</li>
126 | </ol>
128 |
    129 |
  1. Monica
  2. 130 |
  3. Peter
  4. 131 |
  5. Layla
  6. 132 |
133 |
134 | 135 |
136 | type 137 |

Sets the numbering type:

138 |
    139 |
  • a for lowercase letters
  • 140 |
  • A for uppercase letters
  • 141 |
  • i for lowercase Roman numerals
  • 142 |
  • I for uppercase Roman numerals
  • 143 |
  • 1 for numbers (default)
  • 144 |
145 | <ol type="a" >
147 | <li>HTML</li>
148 | <li>CSS</li>
149 | <li>JavaScript</li>
150 | </ol>
152 |
    153 |
  1. HTML
  2. 154 |
  3. CSS
  4. 155 |
  5. JavaScript
  6. 156 |
157 |
158 |
159 |
160 |
161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /media.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Media 10 | 25 | 26 | 27 |
28 | BACK 29 |

MEDIA

30 |
31 |
32 |

AUDIO

33 |

The <audio> tag is used to embed sound content in a document, such as music or other audio streams.

34 |
35 |
36 |

EXAMPLE

37 |
38 |             <audio controls>
39 |                 <source src="assets/horse.mp3"/>
40 |             </audio>
41 |         
42 |

Click the play button to play de sound.

43 | 46 |
47 |
48 |
49 |
50 |
51 |

VIDEO

52 |

The <video> tag is used to embed video content in a document, such as a movie clip or other video streams.

53 |
54 |
55 |

EXAMPLE

56 |
57 |             cvideo width="420" height="315" controls>
58 |                 <source src="assets/dog.mp4"/>
59 |             </video>
60 |         
61 | 64 |
65 |
66 |
67 |
68 |
69 |

YOUTUBE IFRAME

70 |

The <textarea> tag defines a multi-line text input control.

71 |
72 |
73 |

EXAMPLE

74 |
75 |             <iframe width="420" height="315"
76 |                 src="https://www.youtube.com/embed/AAmsmTXTznM">
77 |             </iframe>
78 |         
79 | 82 |

Note: You must replace "/watch?=" part with embed/

83 |
84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*******************************/ 2 | /* GENERAL */ 3 | /*******************************/ 4 | * { 5 | margin: auto 0; 6 | padding: 0; 7 | box-sizing: border-box; 8 | } 9 | 10 | body { 11 | line-height: 1.2; 12 | font-size: 1.2rem; 13 | color: #555; 14 | } 15 | 16 | article { 17 | padding: 2rem 2rem 4rem 2rem; 18 | } 19 | header { 20 | margin-bottom: 1rem; 21 | } 22 | 23 | h1, 24 | h2, 25 | h3, 26 | p { 27 | margin-bottom: 1.5rem; 28 | } 29 | 30 | h4 { 31 | margin-bottom: 0.5rem; 32 | } 33 | 34 | code { 35 | font-size: 18px; 36 | } 37 | 38 | /* NAVEGATION */ 39 | nav a { 40 | text-decoration: none; 41 | display: flex; 42 | justify-content: end; 43 | border-bottom: 1px solid #333; 44 | margin-bottom: 1rem; 45 | } 46 | 47 | /*******************************/ 48 | /* TABLE */ 49 | /*******************************/ 50 | 51 | table { 52 | padding: 2rem 0 4rem 0; 53 | } 54 | 55 | thead { 56 | background-color: #555; 57 | color: #fff; 58 | } 59 | 60 | th { 61 | padding: 0.8rem; 62 | } 63 | 64 | td { 65 | border: 1px solid #333; 66 | padding: 0.8rem; 67 | line-height: 1.6; 68 | } 69 | 70 | span { 71 | font-weight: 400; 72 | } 73 | button, 74 | input { 75 | padding: 0.5rem 1rem; 76 | } 77 | 78 | /*******************************/ 79 | /* GRAPHICS */ 80 | /*******************************/ 81 | 82 | canvas { 83 | background-color: #59b394; 84 | } 85 | 86 | .attribute { 87 | padding: 1rem; 88 | } 89 | 90 | .svg-study { 91 | width: 4rem; 92 | } 93 | 94 | /*******************************/ 95 | /* LISTS */ 96 | /*******************************/ 97 | 98 | .list { 99 | padding: 0 0 0 2rem; 100 | } 101 | 102 | .unordered-list, 103 | .ordered-list { 104 | padding-left: 3rem; 105 | } 106 | 107 | /* ul */ 108 | .list-square, 109 | .list-circle, 110 | .list-disc { 111 | margin-bottom: 4rem; 112 | } 113 | 114 | .square, 115 | .circle, 116 | .disc { 117 | list-style-type: square; 118 | border: 1px solid black; 119 | border-radius: 4px; 120 | width: 15%; 121 | padding: 10px 40px 10px 40px; 122 | margin-top: 1.5rem; 123 | margin-bottom: 2rem; 124 | color: #fff; 125 | background-color: #555; 126 | } 127 | 128 | .circle { 129 | list-style-type: circle; 130 | } 131 | 132 | .disc { 133 | list-style-type: disc; 134 | } 135 | 136 | div .list-disc:last-child { 137 | margin-bottom: 5rem; 138 | } 139 | 140 | /* ol */ 141 | .list-reversed, 142 | .list-start, 143 | .list-type { 144 | margin-bottom: 4rem; 145 | } 146 | 147 | .reversed, 148 | .start, 149 | .type { 150 | border: 1px solid black; 151 | border-radius: 4px; 152 | border-radius: 4px; 153 | width: 15%; 154 | padding: 10px 40px 10px 40px; 155 | margin-top: 1.5rem; 156 | margin-bottom: 2rem; 157 | color: #fff; 158 | background-color: #555; 159 | } -------------------------------------------------------------------------------- /table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Table 10 | 33 | 34 | 35 |
36 | BACK 37 |

TABLE

38 |
39 |
40 |

TABLE

41 |

The <table> tag defines an HTML table. 42 | An HTML table consists of one <table> element and one or more <tr>, <th>, and <td> elements.

43 |
44 |
45 |
46 |
47 |
48 |

TH

49 |

The <th> element defines a table header.

50 |
51 |
52 |
53 |

TR

54 |

The <tr> element defines a table row.

55 |
56 |
57 |
58 |

TD

59 |

The <td> element defines a table cell.

60 |
61 |
62 |

EXAMPLE

63 |
 64 |             <table>
 65 |             <tr>
 66 |                 <th>Name</th>
 67 |                 <th>Age</th>
 68 |                 <th>City</th>
 69 |             </tr>
 70 |             <tr>
 71 |                 <td>Susan</td>
 72 |                 <td>29</td>
 73 |                 <td>New York</td>
 74 |             </tr>
 75 |             <tr>
 76 |                 <td>Mark</td>
 77 |                 <td>35</td>
 78 |                 <td>London</td>
 79 |             </tr>
 80 |             <tr>
 81 |                 <td>Arnaud</td>
 82 |                 <td>19</td>
 83 |                 <td>Paris</td>
 84 |             </tr>
 85 |         </table>
 86 |         
87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
NameAgeCity
Susan29New York
Mark35London
Arnaud19Paris
109 |
110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML TEXT 7 | 8 | 9 | 38 | 39 | 40 |

HTML TEXT

41 | 42 | 43 | 46 | 47 | 48 | 53 | 56 | 57 | 58 | 67 | 70 | 71 | 72 | 77 | 80 | 81 | 82 | 87 | 90 | 91 | 92 | 97 | 100 | 101 |
44 |

Formatting elements were designed to display special types of text:

45 |
49 | 50 | <strong>This text is important!</strong> 51 | 52 | 54 | This text is important! 55 |
59 |

60 | The <strike> tag was used in HTML 4 to define strikethrough text. 61 |
Use the <del> tag to define deleted text: 62 |

63 | 64 | <p>My favorite color is <del>blue</del>red!</p> 65 | 66 |
68 |

My favorite color is blue red!

69 |
73 | 74 | <i>This text is italic</i> 75 | 76 | 78 | This text is italic 79 |
83 | 84 | <p>This is <sub>subscripted</sub> text.</p> 85 | 86 | 88 |

This is subscripted text.

89 |
93 | 94 | <p>This is <sup>superscripted</sup> text.</p> 95 | 96 | 98 |

This is superscripted text.

99 |
102 | 103 | 104 | 105 | 106 | --------------------------------------------------------------------------------