All language subtitles for 1. HTML Forms

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese Download
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,100 --> 00:00:02,730 And welcome back. 2 00:00:02,750 --> 00:00:10,190 We're going to get into some more advanced tags and probably the most important tag that you'll use, other than 3 00:00:10,220 --> 00:00:16,910 the ones that we've covered so far, are tags that we need, to create forms. As you know, when you go to 4 00:00:16,910 --> 00:00:23,570 Web sites usually there's some sort of a login or registration form, so we're going to build that 5 00:00:23,570 --> 00:00:28,660 out today. To get started, let's just create a new file here. 6 00:00:29,000 --> 00:00:32,110 We'll save it and call it "register.html" 7 00:00:32,150 --> 00:00:42,280 on our desktop. Perfect. And we know that we want an "html". So we can use our little shortcut and we'll title 8 00:00:42,280 --> 00:00:43,890 it "Register". 9 00:00:44,030 --> 00:00:56,240 Save that and now in the "index.html" file, let's add another link that references "register.html" and 10 00:00:56,240 --> 00:00:58,290 I'll just say here, 11 00:00:58,590 --> 00:00:59,920 "Register" right. 12 00:01:00,240 --> 00:01:05,370 We'll save both of these files and let's refresh. 13 00:01:05,370 --> 00:01:11,340 We have "Register". click "Register", while we have nothing yet, but it looks like it's working. 14 00:01:11,380 --> 00:01:15,400 Let's add this on a new line, just because it looks prettier that way. 15 00:01:15,400 --> 00:01:19,640 So to do that, if you remember we're going to add a break ‘br’ tag. 16 00:01:19,720 --> 00:01:21,030 So let's refresh. 17 00:01:21,070 --> 00:01:21,670 There you go. 18 00:01:21,670 --> 00:01:24,940 We have "new page" and "register". 19 00:01:24,960 --> 00:01:25,240 OK. 20 00:01:25,310 --> 00:01:34,350 So let's build out this form. If you go into "register.html", the way we write forms in HTML. 21 00:01:34,360 --> 00:01:39,560 Well conveniently there is a ‘form’ tag. 22 00:01:39,590 --> 00:01:44,050 OK. But this ‘form’ tag itself needs to have the actual form inside of it. 23 00:01:44,900 --> 00:01:47,970 So what kind of form elements do we have? 24 00:01:47,980 --> 00:01:55,710 Well, again if we remember our good old friend "W3C", lets type in "w3c forms". 25 00:01:57,350 --> 00:02:03,440 And we can see over here, that we have HTML forms and refresh. 26 00:02:03,650 --> 00:02:10,380 We'll make that full screen and you can see over here that, there is a ton of information on it, but you 27 00:02:10,380 --> 00:02:12,790 can look that up yourself, for now. 28 00:02:13,690 --> 00:02:18,340 I'm going to introduce you to the most common ones, probably the ones that you'll use 90 percent of the 29 00:02:18,340 --> 00:02:18,780 time. 30 00:02:19,860 --> 00:02:22,090 The first one as we do with any form. 31 00:02:22,110 --> 00:02:26,550 And let's go to that page for now, is well we want to enter our name. 32 00:02:26,550 --> 00:02:27,350 So how do we do that? 33 00:02:27,360 --> 00:02:39,800 We have a ‘input’ tag, that has a 'type' of "text", because well our name will be in "text" form and we can 34 00:02:39,800 --> 00:02:43,660 close that off and it's actually a self closing tag. 35 00:02:43,820 --> 00:02:50,070 So now, if I save and hit refresh. OK. we have a little box here. 36 00:02:50,150 --> 00:02:51,460 Hopefully you can see that. 37 00:02:51,550 --> 00:02:55,880 But, well we should probably title it, because we won't know what to enter that way. so we're going to 38 00:02:55,880 --> 00:03:05,180 put in here, we're going to say "First Name:" and save. let's refresh. We have first name. 39 00:03:05,300 --> 00:03:08,590 And now. let's make this a little bit bigger. 40 00:03:08,590 --> 00:03:09,240 There you go. 41 00:03:09,470 --> 00:03:14,450 Now, you can enter your name in here. Awesome. 42 00:03:15,020 --> 00:03:18,240 Well let's add another one for "Last Name:". 43 00:03:22,780 --> 00:03:27,340 And again we'll have, our "input type". 44 00:03:27,340 --> 00:03:29,990 So that's an attribute and a value of 'text'. 45 00:03:32,430 --> 00:03:34,990 And if we refresh, we have "Last Name". 46 00:03:35,230 --> 00:03:35,720 OK. 47 00:03:35,730 --> 00:03:41,490 But, it kinda looks ugly. remember that HTML, just reads line by line and doesn't really know 48 00:03:41,490 --> 00:03:51,730 that we want a space here, so again, we can add a break ‘br’ tag here and refresh and we have first name and 49 00:03:51,880 --> 00:03:53,550 last name. 50 00:03:53,590 --> 00:03:53,960 OK. 51 00:03:54,040 --> 00:03:56,920 That's, that's fairly self-explanatory. 52 00:03:57,040 --> 00:04:01,670 Now, what else do we have in a form? we have e-mail. 53 00:04:01,750 --> 00:04:05,460 So let's let's add another field, which is "Email:". 54 00:04:06,040 --> 00:04:15,530 And we'll do input again, type equals text, we'll add another ‘br’ here because we're going to need that spacing 55 00:04:16,700 --> 00:04:18,940 and let's save. refresh. 56 00:04:19,160 --> 00:04:27,980 Awesome. OK so we have our general registration form and obviously with any form, we need some sort of 57 00:04:27,980 --> 00:04:28,560 buttons. 58 00:04:28,620 --> 00:04:32,800 Like, we need to submit this somewhere, so we can register. 59 00:04:32,800 --> 00:04:36,830 Well, again there's a nice input type for that. 60 00:04:36,890 --> 00:04:40,300 So we do input, instead of a text type, 61 00:04:40,340 --> 00:04:53,790 there is a "submit" type. So this, if we add another break in here and I save this. I refresh. It has a submit 62 00:04:53,790 --> 00:04:54,340 button now. 63 00:04:55,250 --> 00:04:58,760 Now, where did this "submit" come from. 64 00:04:58,760 --> 00:05:03,500 Well, when you put an input type "submit" it automatically creates a button. 65 00:05:03,530 --> 00:05:07,510 And if you don't specify what to say, It'll just have this text. 66 00:05:07,520 --> 00:05:15,110 But, we can change that, so we can put value and we'll put. 67 00:05:15,120 --> 00:05:16,260 "Register". 68 00:05:16,830 --> 00:05:18,970 Save that. refresh. 69 00:05:19,090 --> 00:05:29,740 We now have a "Register!" button. ok. But what if, we make mistakes in this field, we write stuff and what we 70 00:05:29,740 --> 00:05:36,340 want to reset this form. Again there's another input for that. 71 00:05:36,910 --> 00:05:43,040 And the type of that input as you can imagine is "reset". 72 00:05:43,050 --> 00:05:49,530 So now, if we close this. Add another break tag in here. actually we can keep that on the same line. we'll save. 73 00:05:49,860 --> 00:05:52,580 refresh. and we have "Reset". 74 00:05:52,580 --> 00:05:56,840 So now if I type in anything in here and let's say I don't want to. 75 00:05:56,880 --> 00:05:59,110 Well, I don't like this, I need to reset the form. 76 00:05:59,120 --> 00:06:02,500 I can just click "Reset" and it clears everything for us. 77 00:06:03,270 --> 00:06:03,640 OK. 78 00:06:03,760 --> 00:06:06,150 You may be asking yourself, "You know what, 79 00:06:06,230 --> 00:06:10,410 well, what happens when we click 'Register’?", before we get into that, 80 00:06:10,420 --> 00:06:15,850 I want to just go through all the common input types and then we'll click "Register" to see what happens. 81 00:06:16,660 --> 00:06:18,420 With the e-mail, 82 00:06:18,550 --> 00:06:24,610 we ideally want, first of all for it to be required, so that when you click register if you haven't provided 83 00:06:24,610 --> 00:06:27,550 an email, it won't let you register. 84 00:06:27,850 --> 00:06:33,770 And there's an attribute that, we can use for that and that is "required". 85 00:06:33,820 --> 00:06:41,290 And here we don't actually have to specify a value, because automatically it's assumed that required 86 00:06:41,320 --> 00:06:45,150 equals to true, which means that this form field is required. 87 00:06:45,400 --> 00:06:55,770 So if I save that. I refresh. And I leave it blank and I click register. It'll say please fill out, this field. 88 00:06:55,780 --> 00:07:00,130 Now, we also want to make sure that, it's an appropriate e-mail field. 89 00:07:00,150 --> 00:07:06,200 So if I type something like this. we still want to make sure that, you know, this is an incorrect e-mail. 90 00:07:06,200 --> 00:07:08,300 We don't want to register. 91 00:07:08,420 --> 00:07:12,400 So the input type of text that I told you for email, is actually wrong. 92 00:07:12,400 --> 00:07:17,140 There's a specific one that we can use, which is, as you can imagine, "email". 93 00:07:17,540 --> 00:07:26,980 So now if I refresh and type in something that's not an email and I click register. I'll say please include 94 00:07:27,010 --> 00:07:30,780 an "@" in the email address. Very nice. 95 00:07:30,790 --> 00:07:34,150 It's kind of like magic. it does this for you, which is very very nice. 96 00:07:34,980 --> 00:07:40,450 Let's expand on our knowledge, of inputs and add a few more fields, that we'll most likely need. 97 00:07:40,560 --> 00:07:44,410 Usually, want to know somebody's birthday. 98 00:07:44,580 --> 00:07:52,830 So lets, add birthday here and for this input type let's do type "date". 99 00:07:55,570 --> 00:08:04,650 so if I save this and I refresh. Look at that, we have a nice little date picker, so I can pick anything in 100 00:08:04,650 --> 00:08:05,060 here. 101 00:08:06,540 --> 00:08:06,860 All right. 102 00:08:06,870 --> 00:08:07,860 What else do we need. 103 00:08:07,860 --> 00:08:10,230 We also need "Gender". 104 00:08:10,440 --> 00:08:11,730 So we'll do input. 105 00:08:11,750 --> 00:08:14,320 type and for gender, 106 00:08:14,340 --> 00:08:22,730 Well there's no specific input type for gender. but there is something called 'radio' and radio is as the name 107 00:08:22,730 --> 00:08:25,500 suggest radio buttons. 108 00:08:25,520 --> 00:08:28,450 So now, I click refresh. 109 00:08:28,450 --> 00:08:35,060 And well, I have one radio button, but we ideally want to have options right, so how do we do that. 110 00:08:35,060 --> 00:08:43,250 So for the radio, we also need to say, whether it's male or female, let's have within the gender. 111 00:08:43,320 --> 00:08:54,460 We're going to have a break tag over here in the line and we'll say input type "radio" and we'll say "Male" 112 00:08:55,200 --> 00:09:02,420 and we also want "Female" and we also want "Other" 113 00:09:05,520 --> 00:09:10,560 and when we refresh this, we have "Male", "Female" and "Other". 114 00:09:10,560 --> 00:09:16,740 But you see a problem here, I just click the radio buttons and I can't de-select them and ideally, you 115 00:09:16,740 --> 00:09:20,030 can only - you should only be able to select one. 116 00:09:20,400 --> 00:09:25,830 And right now the way, the radio buttons are, they don't know of each others existance, we want to make sure 117 00:09:25,830 --> 00:09:32,060 that, they know that they're connected. They're family and only one of them can be picked. 118 00:09:32,070 --> 00:09:37,230 So how do we do that. The way we do that is, through the "name" attribute. 119 00:09:37,530 --> 00:09:47,600 So for the name we'll say "gender" and this name attribute, needs to match on all the radio buttons. so 120 00:09:47,600 --> 00:09:56,600 that they know, they are together, they're part of the "gender" input field. So if I save here and refresh 121 00:09:58,390 --> 00:10:03,690 Now, you can see that I can only select one. 122 00:10:03,700 --> 00:10:04,110 All right. 123 00:10:04,110 --> 00:10:04,830 Perfect. 124 00:10:04,860 --> 00:10:06,500 What else should we have. 125 00:10:06,510 --> 00:10:13,090 Well lets say, what I really want to know if you have pets. So with pets. 126 00:10:14,600 --> 00:10:24,660 We're going to have "input" "type". We can have multiple pets, so it won't be radio buttons. We want 'checkbox'. 127 00:10:24,720 --> 00:10:25,660 So checkbox. 128 00:10:25,660 --> 00:10:35,380 We want it to have cats, or let's just put "Cat". and we want to have 129 00:10:38,620 --> 00:10:39,650 - can't type today. 130 00:10:41,920 --> 00:10:46,870 Check box and we want to have "Dogs". 131 00:10:47,080 --> 00:10:48,260 So let's save that. 132 00:10:48,310 --> 00:10:51,090 Let's refresh and look at that. 133 00:10:51,340 --> 00:10:58,030 We have "Pets". But this time, it's checkboxes which means, I can select multiple. 12891

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.