All language subtitles for HTML Full Course for Beginners _ Complete All-in-One Tutorial _ 4 Hours

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
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
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian Download
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,910 --> 00:00:05,040 [Music] 2 00:00:05,040 --> 00:00:08,080 hello and welcome to four hours of html 3 00:00:08,080 --> 00:00:10,320 tutorials and instruction this video is 4 00:00:10,320 --> 00:00:12,400 made up of 10 tutorials for learning 5 00:00:12,400 --> 00:00:14,639 html that build upon each other much 6 00:00:14,639 --> 00:00:16,480 like the chapters of a book 7 00:00:16,480 --> 00:00:18,480 throughout the lessons in this video i 8 00:00:18,480 --> 00:00:20,080 will mention links being available in 9 00:00:20,080 --> 00:00:22,560 the description below i've compiled all 10 00:00:22,560 --> 00:00:24,880 of these links into one github resource 11 00:00:24,880 --> 00:00:27,119 that you will find in the description 12 00:00:27,119 --> 00:00:29,359 hi i'm dave gray and i'm the creator of 13 00:00:29,359 --> 00:00:31,920 these html tutorials you can subscribe 14 00:00:31,920 --> 00:00:34,000 to my youtube channel for more tutorials 15 00:00:34,000 --> 00:00:36,320 like this one you can also follow me on 16 00:00:36,320 --> 00:00:38,559 twitter and if you're feeling generous 17 00:00:38,559 --> 00:00:40,719 you can even buy me a cup of coffee 18 00:00:40,719 --> 00:00:42,640 let's get started learning html with 19 00:00:42,640 --> 00:00:44,559 chapter one 20 00:00:44,559 --> 00:00:47,120 what is html 21 00:00:47,120 --> 00:00:49,680 html is an acronym that stands for 22 00:00:49,680 --> 00:00:52,640 hypertext markup language 23 00:00:52,640 --> 00:00:55,760 and hypertext markup language html is 24 00:00:55,760 --> 00:00:58,640 the most basic building block of the web 25 00:00:58,640 --> 00:01:00,800 it defines the meaning and structure of 26 00:01:00,800 --> 00:01:04,159 web content and hypertext refers to 27 00:01:04,159 --> 00:01:06,080 links that connect web pages to each 28 00:01:06,080 --> 00:01:07,840 other and that can be within a single 29 00:01:07,840 --> 00:01:11,280 website or from one website to another 30 00:01:11,280 --> 00:01:14,560 overall html uses markup to annotate 31 00:01:14,560 --> 00:01:16,799 text images and other content for 32 00:01:16,799 --> 00:01:19,040 display in a web browser and you can see 33 00:01:19,040 --> 00:01:21,040 an example of some of these markup 34 00:01:21,040 --> 00:01:23,360 elements here but before we begin 35 00:01:23,360 --> 00:01:25,600 creating a web page and using these 36 00:01:25,600 --> 00:01:27,439 markup elements we need to get the 37 00:01:27,439 --> 00:01:30,079 necessary tools so let's start with a 38 00:01:30,079 --> 00:01:32,479 web browser if you don't have one or if 39 00:01:32,479 --> 00:01:34,159 you're curious what i will be using in 40 00:01:34,159 --> 00:01:36,400 this series i'll be using the google 41 00:01:36,400 --> 00:01:39,040 chrome browser and you can download that 42 00:01:39,040 --> 00:01:40,960 at google.com 43 00:01:40,960 --> 00:01:43,119 chrome so if you don't have that and 44 00:01:43,119 --> 00:01:45,280 want to use that go ahead and download 45 00:01:45,280 --> 00:01:47,439 and install now and then come back to 46 00:01:47,439 --> 00:01:48,960 the tutorial 47 00:01:48,960 --> 00:01:51,840 also i will be using an extension 48 00:01:51,840 --> 00:01:55,840 and we go to chrome 49 00:01:56,399 --> 00:01:58,240 webstore to get extensions for the 50 00:01:58,240 --> 00:02:00,880 chrome browser and there if you want to 51 00:02:00,880 --> 00:02:02,880 use the extension that i'm going to use 52 00:02:02,880 --> 00:02:04,479 it's called dark 53 00:02:04,479 --> 00:02:05,680 new tab 54 00:02:05,680 --> 00:02:07,600 and you can press enter to search for 55 00:02:07,600 --> 00:02:09,360 that and once you've completed your 56 00:02:09,360 --> 00:02:12,080 search you'll see dark new tab offered 57 00:02:12,080 --> 00:02:14,080 by keller which is the one that i have 58 00:02:14,080 --> 00:02:16,080 added and you can see added here i'll 59 00:02:16,080 --> 00:02:17,680 click on that 60 00:02:17,680 --> 00:02:20,160 and once you're inside the page for dark 61 00:02:20,160 --> 00:02:22,000 new tab you should have an install 62 00:02:22,000 --> 00:02:23,680 button here since i already have it 63 00:02:23,680 --> 00:02:24,720 installed 64 00:02:24,720 --> 00:02:27,120 this is now a remove button for me what 65 00:02:27,120 --> 00:02:29,440 this does is when you open a new tab in 66 00:02:29,440 --> 00:02:32,640 the browser it uses a dark page instead 67 00:02:32,640 --> 00:02:34,640 of a light page and i use dark mode 68 00:02:34,640 --> 00:02:37,200 whenever possible so i prefer that if 69 00:02:37,200 --> 00:02:39,680 you see me open a new tab in this 70 00:02:39,680 --> 00:02:42,400 development series you'll probably see a 71 00:02:42,400 --> 00:02:45,120 dark tab like this one from there we 72 00:02:45,120 --> 00:02:47,680 need to get a code editor and the 73 00:02:47,680 --> 00:02:49,760 industry standard right now and what i 74 00:02:49,760 --> 00:02:52,080 prefer to use is visual studio code 75 00:02:52,080 --> 00:02:55,200 again you can use other code editors to 76 00:02:55,200 --> 00:02:58,000 write your html code but if you go to 77 00:02:58,000 --> 00:03:01,000 code.visualstudio.com 78 00:03:01,440 --> 00:03:03,280 you'll be able to download visual studio 79 00:03:03,280 --> 00:03:04,640 code for free 80 00:03:04,640 --> 00:03:07,120 and there you can download for windows 81 00:03:07,120 --> 00:03:08,800 if you're on windows like i am or you 82 00:03:08,800 --> 00:03:11,519 can click other platforms and it's also 83 00:03:11,519 --> 00:03:15,120 available for linux and mac os so now 84 00:03:15,120 --> 00:03:17,840 would be a good time to go ahead and 85 00:03:17,840 --> 00:03:21,200 download visual studio code and install 86 00:03:21,200 --> 00:03:23,760 your code editor and go ahead and open 87 00:03:23,760 --> 00:03:26,560 that up and then come back to the video 88 00:03:26,560 --> 00:03:28,720 okay i am now assuming you have 89 00:03:28,720 --> 00:03:30,879 installed visual studio code and have 90 00:03:30,879 --> 00:03:32,799 opened it up and you may see something 91 00:03:32,799 --> 00:03:34,799 like this or you may see a welcome 92 00:03:34,799 --> 00:03:35,760 screen 93 00:03:35,760 --> 00:03:39,120 what you need to do is create a folder 94 00:03:39,120 --> 00:03:40,640 on your computer 95 00:03:40,640 --> 00:03:43,040 and we will put our files inside that 96 00:03:43,040 --> 00:03:45,360 folder so if i go to the file menu and 97 00:03:45,360 --> 00:03:47,280 choose open folder 98 00:03:47,280 --> 00:03:49,920 you can see once this pops up 99 00:03:49,920 --> 00:03:53,120 what folder i am in the html course 100 00:03:53,120 --> 00:03:55,680 folder in windows and then i've created 101 00:03:55,680 --> 00:03:56,400 an 102 00:03:56,400 --> 00:03:59,280 0-1 underscore lesson folder so if i 103 00:03:59,280 --> 00:04:02,000 highlight that and select the folder i 104 00:04:02,000 --> 00:04:04,400 am now inside that folder and ready to 105 00:04:04,400 --> 00:04:07,040 create my first html file 106 00:04:07,040 --> 00:04:09,680 so if you see the file tree over here on 107 00:04:09,680 --> 00:04:11,519 the left and it's currently empty if you 108 00:04:11,519 --> 00:04:14,000 don't click this icon in the top left 109 00:04:14,000 --> 00:04:15,920 which is the file explorer and that will 110 00:04:15,920 --> 00:04:18,560 hide or show this file explorer we're 111 00:04:18,560 --> 00:04:20,880 going to create the plus button or click 112 00:04:20,880 --> 00:04:22,800 the plus button here for new file and 113 00:04:22,800 --> 00:04:24,880 create a new file 114 00:04:24,880 --> 00:04:27,040 now we'll type index 115 00:04:27,040 --> 00:04:28,400 dot html 116 00:04:28,400 --> 00:04:31,520 as that is always the file name 117 00:04:31,520 --> 00:04:34,639 that is expected to launch a website and 118 00:04:34,639 --> 00:04:36,639 you always want to keep your file names 119 00:04:36,639 --> 00:04:39,680 lower case and with no spaces now 120 00:04:39,680 --> 00:04:42,000 windows will not complain if you put a 121 00:04:42,000 --> 00:04:44,720 space or use upper or lower case however 122 00:04:44,720 --> 00:04:48,160 when we host our files on a web server a 123 00:04:48,160 --> 00:04:51,040 web server will differentiate many times 124 00:04:51,040 --> 00:04:53,199 and that could cause problems so the 125 00:04:53,199 --> 00:04:55,600 naming convention is to always use lower 126 00:04:55,600 --> 00:04:56,400 case 127 00:04:56,400 --> 00:05:00,000 no spaces you can use hyphens dashes 128 00:05:00,000 --> 00:05:03,759 and then end each file in dot html 129 00:05:03,759 --> 00:05:07,120 okay we have an empty index.html file 130 00:05:07,120 --> 00:05:10,479 let's create our first html element and 131 00:05:10,479 --> 00:05:13,360 as you might guess the first html 132 00:05:13,360 --> 00:05:16,160 element we'll create is html so if we 133 00:05:16,160 --> 00:05:20,240 type html all lowercase and press tab in 134 00:05:20,240 --> 00:05:24,160 visual studio code it creates the tags 135 00:05:24,160 --> 00:05:27,199 and by tags that is often interchanged 136 00:05:27,199 --> 00:05:28,880 as a word with element however the 137 00:05:28,880 --> 00:05:31,199 element consists of the starting and 138 00:05:31,199 --> 00:05:34,000 ending tag and everything in between but 139 00:05:34,000 --> 00:05:36,560 here we might just be referring to the 140 00:05:36,560 --> 00:05:38,960 starting also called the opening tag or 141 00:05:38,960 --> 00:05:42,240 the ending also called the closing tag 142 00:05:42,240 --> 00:05:45,919 so we refer to html tags but every page 143 00:05:45,919 --> 00:05:50,000 starts and ends with the html opening 144 00:05:50,000 --> 00:05:52,720 and closing tags and everything else on 145 00:05:52,720 --> 00:05:55,759 the page goes between those tags after 146 00:05:55,759 --> 00:05:59,039 creating our html element html pages 147 00:05:59,039 --> 00:06:02,080 have two main areas and one area 148 00:06:02,080 --> 00:06:04,240 contains data that is not seen on the 149 00:06:04,240 --> 00:06:06,880 page but is considered to be metadata 150 00:06:06,880 --> 00:06:10,639 about the page and that is the head area 151 00:06:10,639 --> 00:06:13,440 so just type head not header but head 152 00:06:13,440 --> 00:06:14,880 and press tab 153 00:06:14,880 --> 00:06:17,680 and now we have our head element 154 00:06:17,680 --> 00:06:20,479 and we will put metadata about the page 155 00:06:20,479 --> 00:06:22,080 inside this area 156 00:06:22,080 --> 00:06:24,639 but the next area is the page that every 157 00:06:24,639 --> 00:06:26,400 or is the part of the page that 158 00:06:26,400 --> 00:06:29,600 everybody sees in the browser and that 159 00:06:29,600 --> 00:06:31,039 is held within 160 00:06:31,039 --> 00:06:33,680 the body element so type body and press 161 00:06:33,680 --> 00:06:34,400 tab 162 00:06:34,400 --> 00:06:37,199 and now we have our two major sections 163 00:06:37,199 --> 00:06:39,600 of our page that are both inside of the 164 00:06:39,600 --> 00:06:42,880 html element we have a head section and 165 00:06:42,880 --> 00:06:45,520 a body section now inside the head we'll 166 00:06:45,520 --> 00:06:48,160 just put one piece of metadata today and 167 00:06:48,160 --> 00:06:50,080 it really won't start with the word meta 168 00:06:50,080 --> 00:06:51,759 we'll come back to that word in the 169 00:06:51,759 --> 00:06:54,400 future we're going to create a title 170 00:06:54,400 --> 00:06:55,360 element 171 00:06:55,360 --> 00:06:58,000 and give our page a title let's just 172 00:06:58,000 --> 00:07:00,400 call this my first 173 00:07:00,400 --> 00:07:01,759 web page 174 00:07:01,759 --> 00:07:04,240 and this will stay inside 175 00:07:04,240 --> 00:07:07,120 of the html document now i just pressed 176 00:07:07,120 --> 00:07:10,639 control s which saved the document you 177 00:07:10,639 --> 00:07:13,080 otherwise would see a dot up here by the 178 00:07:13,080 --> 00:07:16,319 index.html so i saved that and i am 179 00:07:16,319 --> 00:07:19,199 using an auto formatter visual studio 180 00:07:19,199 --> 00:07:22,080 code may or may not do that for you when 181 00:07:22,080 --> 00:07:25,680 you save your file if you want that you 182 00:07:25,680 --> 00:07:28,319 can go to the extension 183 00:07:28,319 --> 00:07:30,880 icon over here and search 184 00:07:30,880 --> 00:07:33,840 for a prettier extension 185 00:07:33,840 --> 00:07:35,599 and i'm not sure if mine is enabled or 186 00:07:35,599 --> 00:07:37,199 i'm using something else right now we'll 187 00:07:37,199 --> 00:07:39,360 have to check now mine is disabled but i 188 00:07:39,360 --> 00:07:42,080 do recommend this one prettier is a code 189 00:07:42,080 --> 00:07:43,919 formatter that will auto format your 190 00:07:43,919 --> 00:07:46,400 code but visual studio code may do some 191 00:07:46,400 --> 00:07:48,319 of that as well but if you want to use 192 00:07:48,319 --> 00:07:50,639 prettier go ahead and click install and 193 00:07:50,639 --> 00:07:52,400 you can use that as well 194 00:07:52,400 --> 00:07:55,759 so i'll close out that prettier tab go 195 00:07:55,759 --> 00:07:58,479 back to the file explorer here so we see 196 00:07:58,479 --> 00:08:01,280 our index.html on the left instead of 197 00:08:01,280 --> 00:08:03,039 the extensions 198 00:08:03,039 --> 00:08:06,800 and now we can see our html is formatted 199 00:08:06,800 --> 00:08:08,960 in a very easy to read manner we have 200 00:08:08,960 --> 00:08:12,240 our html element and then the head 201 00:08:12,240 --> 00:08:14,800 element and then the body element and 202 00:08:14,800 --> 00:08:17,440 they're separated by spaces very easy to 203 00:08:17,440 --> 00:08:19,680 read and we have a title inside of the 204 00:08:19,680 --> 00:08:23,039 head again the title will not be seen 205 00:08:23,039 --> 00:08:25,199 inside of the browser in the body of the 206 00:08:25,199 --> 00:08:27,360 page but i will show you very shortly 207 00:08:27,360 --> 00:08:28,960 where we do see it 208 00:08:28,960 --> 00:08:30,879 inside of the body element though let's 209 00:08:30,879 --> 00:08:33,919 put an h1 element which stands for a 210 00:08:33,919 --> 00:08:36,560 heading and it is the biggest heading we 211 00:08:36,560 --> 00:08:39,279 could put you only put one h1 element 212 00:08:39,279 --> 00:08:40,399 per page 213 00:08:40,399 --> 00:08:42,640 and that should be saying what your page 214 00:08:42,640 --> 00:08:44,959 is about it doesn't necessarily have to 215 00:08:44,959 --> 00:08:47,760 be the same text that is in the title 216 00:08:47,760 --> 00:08:49,920 but here we're just going to put hello 217 00:08:49,920 --> 00:08:52,880 world as is the tradition for creating 218 00:08:52,880 --> 00:08:55,120 your first file in any language you're 219 00:08:55,120 --> 00:08:58,080 learning and so we have hello world on 220 00:08:58,080 --> 00:09:01,440 the page and we have my first web page 221 00:09:01,440 --> 00:09:04,080 in the head section let's add one more 222 00:09:04,080 --> 00:09:06,480 element in the body of the page 223 00:09:06,480 --> 00:09:08,560 and this is a paragraph element that 224 00:09:08,560 --> 00:09:11,680 starts and ends just with the letter p 225 00:09:11,680 --> 00:09:13,680 but notice each of our tags of course 226 00:09:13,680 --> 00:09:15,440 start with this 227 00:09:15,440 --> 00:09:18,320 less than and then end with the greater 228 00:09:18,320 --> 00:09:20,640 than and then the ending tag you'll 229 00:09:20,640 --> 00:09:23,200 notice has a slash but all we have to do 230 00:09:23,200 --> 00:09:25,600 in visual studio code is type p and 231 00:09:25,600 --> 00:09:29,120 press tab and it creates both for us so 232 00:09:29,120 --> 00:09:31,360 we're going to put some text inside of 233 00:09:31,360 --> 00:09:34,240 our paragraph and here we'll just put 234 00:09:34,240 --> 00:09:37,680 this is my first 235 00:09:37,680 --> 00:09:39,839 web page with a period 236 00:09:39,839 --> 00:09:42,320 in the sentence and save once again i'm 237 00:09:42,320 --> 00:09:45,440 pressing ctrl s on the keyboard to save 238 00:09:45,440 --> 00:09:48,080 you can go to the file menu and from 239 00:09:48,080 --> 00:09:50,160 there you can also choose save but 240 00:09:50,160 --> 00:09:52,640 you'll notice the shortcut is control 241 00:09:52,640 --> 00:09:55,040 and the letter s we're almost ready to 242 00:09:55,040 --> 00:09:57,519 view our web page but before we do 243 00:09:57,519 --> 00:09:59,680 remember the extensions we went to i 244 00:09:59,680 --> 00:10:02,079 want to show you just a few if you want 245 00:10:02,079 --> 00:10:04,079 your visual studio code to look like 246 00:10:04,079 --> 00:10:04,880 mine 247 00:10:04,880 --> 00:10:06,560 one thing to draw your attention to is 248 00:10:06,560 --> 00:10:09,839 when i created an index.html file 249 00:10:09,839 --> 00:10:12,880 i have the little icon for html5 beside 250 00:10:12,880 --> 00:10:15,200 it you may not have that but if we click 251 00:10:15,200 --> 00:10:18,000 on extensions and then we can delete 252 00:10:18,000 --> 00:10:20,320 prettier that i searched for before 253 00:10:20,320 --> 00:10:23,680 type vs code dash icons 254 00:10:23,680 --> 00:10:25,200 there you'll find the extension that 255 00:10:25,200 --> 00:10:28,000 will add that to your vs code as well so 256 00:10:28,000 --> 00:10:30,160 you can install i already have it 257 00:10:30,160 --> 00:10:32,399 installed so mine says uninstall 258 00:10:32,399 --> 00:10:34,720 and that will add icons as you create 259 00:10:34,720 --> 00:10:37,839 files and it might add the icon up here 260 00:10:37,839 --> 00:10:40,320 as well in the tab and that's how you 261 00:10:40,320 --> 00:10:44,079 see the icon here beside my index.html 262 00:10:44,079 --> 00:10:45,760 in the file explorer so visually it 263 00:10:45,760 --> 00:10:47,680 helps you see what type of file you're 264 00:10:47,680 --> 00:10:49,600 working with quickly without even 265 00:10:49,600 --> 00:10:52,640 reading everything after that extension 266 00:10:52,640 --> 00:10:54,480 let's go ahead and click the extensions 267 00:10:54,480 --> 00:10:55,920 icon again 268 00:10:55,920 --> 00:10:58,240 and then search for 269 00:10:58,240 --> 00:10:59,440 github 270 00:10:59,440 --> 00:11:03,200 theme i am using a specific theme 271 00:11:03,200 --> 00:11:06,000 which i prefer dark mode in every thing 272 00:11:06,000 --> 00:11:09,279 that i do so i am using the github theme 273 00:11:09,279 --> 00:11:11,519 extension and it has light and dark 274 00:11:11,519 --> 00:11:14,399 themes i believe i'm using the default 275 00:11:14,399 --> 00:11:16,320 dark theme this might be bright for a 276 00:11:16,320 --> 00:11:19,040 second but i'll click set color theme 277 00:11:19,040 --> 00:11:21,200 and yes it's switched back to light but 278 00:11:21,200 --> 00:11:24,000 i choose github dark default 279 00:11:24,000 --> 00:11:26,640 and then yours will look much like mine 280 00:11:26,640 --> 00:11:28,800 now these previous extensions have been 281 00:11:28,800 --> 00:11:31,600 optional but one that i say is a must 282 00:11:31,600 --> 00:11:35,200 for you to install is called live server 283 00:11:35,200 --> 00:11:37,519 so let's pull up live server by ritwik 284 00:11:37,519 --> 00:11:39,920 day i'll click on that and you want to 285 00:11:39,920 --> 00:11:42,000 install live server because it's going 286 00:11:42,000 --> 00:11:44,800 to help us view our web pages so go 287 00:11:44,800 --> 00:11:47,839 ahead and install live server and after 288 00:11:47,839 --> 00:11:50,320 you have it installed we'll go ahead and 289 00:11:50,320 --> 00:11:51,760 take a look at the web page we've 290 00:11:51,760 --> 00:11:54,000 created okay with that installed i'm 291 00:11:54,000 --> 00:11:56,399 going to close that tab i'll come back 292 00:11:56,399 --> 00:11:58,480 to the file explorer here to show the 293 00:11:58,480 --> 00:12:01,120 file and now if you have live server 294 00:12:01,120 --> 00:12:03,600 installed you should be able to right 295 00:12:03,600 --> 00:12:04,480 click 296 00:12:04,480 --> 00:12:07,440 and open with live server and once we 297 00:12:07,440 --> 00:12:09,440 choose open with live server it opens 298 00:12:09,440 --> 00:12:12,320 our browser and we can see our web page 299 00:12:12,320 --> 00:12:15,040 it says hello world this is my first web 300 00:12:15,040 --> 00:12:16,000 page 301 00:12:16,000 --> 00:12:18,959 in addition in the tab at the top it 302 00:12:18,959 --> 00:12:20,000 says 303 00:12:20,000 --> 00:12:22,800 my first web page so that is where the 304 00:12:22,800 --> 00:12:25,279 title goes the very top of the browser 305 00:12:25,279 --> 00:12:28,160 in the tab now this is very bright and i 306 00:12:28,160 --> 00:12:30,320 have mentioned that i prefer dark mode 307 00:12:30,320 --> 00:12:32,720 so let's go back to visual studio code 308 00:12:32,720 --> 00:12:34,639 and i'm just going to paste in some 309 00:12:34,639 --> 00:12:37,839 quick styling that is actually css once 310 00:12:37,839 --> 00:12:40,320 again this is optional but it will save 311 00:12:40,320 --> 00:12:43,279 my eyes and possibly yours as we work 312 00:12:43,279 --> 00:12:46,160 through this tutorial so once we're back 313 00:12:46,160 --> 00:12:49,440 in visual studio code just underneath 314 00:12:49,440 --> 00:12:52,240 the title in the head section i'm going 315 00:12:52,240 --> 00:12:54,560 to paste this in i'll quickly describe 316 00:12:54,560 --> 00:12:57,600 it i put in a style element and that 317 00:12:57,600 --> 00:13:00,800 allows me to put in some quick css 318 00:13:00,800 --> 00:13:03,440 and i changed the font size to make it 319 00:13:03,440 --> 00:13:05,920 just a little larger and then i changed 320 00:13:05,920 --> 00:13:09,279 the background color to a dark color and 321 00:13:09,279 --> 00:13:12,160 i changed the font color to an off-white 322 00:13:12,160 --> 00:13:14,639 color called white smoke and that's all 323 00:13:14,639 --> 00:13:17,519 i did we're not really learning css here 324 00:13:17,519 --> 00:13:19,440 but this will save our eyes going 325 00:13:19,440 --> 00:13:20,959 forward if you want to make these 326 00:13:20,959 --> 00:13:22,800 changes if you prefer the white with 327 00:13:22,800 --> 00:13:25,120 dark text that is fine too but now that 328 00:13:25,120 --> 00:13:27,519 i've saved this the beauty of live 329 00:13:27,519 --> 00:13:30,480 server is that it automatically reloads 330 00:13:30,480 --> 00:13:32,800 our page for us in the browser so let's 331 00:13:32,800 --> 00:13:34,560 go back to the browser and look at our 332 00:13:34,560 --> 00:13:37,760 update and now you can see our web page 333 00:13:37,760 --> 00:13:40,800 is in dark mode and we have a little bit 334 00:13:40,800 --> 00:13:43,120 larger text here as well it did not 335 00:13:43,120 --> 00:13:45,040 change our title from the head because 336 00:13:45,040 --> 00:13:48,240 that just goes into the tab of the 337 00:13:48,240 --> 00:13:51,440 browser also notice the address this is 338 00:13:51,440 --> 00:13:54,399 an ip address and then we have a colon 339 00:13:54,399 --> 00:13:57,360 and this is a port number but this is on 340 00:13:57,360 --> 00:13:59,760 your own computer this is not on mine i 341 00:13:59,760 --> 00:14:02,079 can't go onto the web and see your page 342 00:14:02,079 --> 00:14:03,839 that we just created we haven't loaded 343 00:14:03,839 --> 00:14:05,839 it to the web it is just running on your 344 00:14:05,839 --> 00:14:08,639 computer but this is the way to view web 345 00:14:08,639 --> 00:14:10,959 pages as we create them which creates 346 00:14:10,959 --> 00:14:13,279 your own local server it's what's called 347 00:14:13,279 --> 00:14:15,839 a dev environment and that is preferred 348 00:14:15,839 --> 00:14:18,399 what you don't want to do in chrome 349 00:14:18,399 --> 00:14:20,959 is try to open a file like you would in 350 00:14:20,959 --> 00:14:24,079 word or some other document browser or 351 00:14:24,079 --> 00:14:26,000 even visual studio code how we open 352 00:14:26,000 --> 00:14:27,760 files that's not how you want to view a 353 00:14:27,760 --> 00:14:30,000 web page you want to use a development 354 00:14:30,000 --> 00:14:32,480 server and that's what we're doing with 355 00:14:32,480 --> 00:14:35,360 live server in visual studio code now if 356 00:14:35,360 --> 00:14:38,079 you ever want to stop the server down 357 00:14:38,079 --> 00:14:39,680 here in the bottom you can see the port 358 00:14:39,680 --> 00:14:42,720 number 5500 and it says click to close 359 00:14:42,720 --> 00:14:45,040 server so i can just click that it says 360 00:14:45,040 --> 00:14:47,199 disposing and now we have a go live 361 00:14:47,199 --> 00:14:49,440 button which you can also use you can 362 00:14:49,440 --> 00:14:51,760 also right click on your document and 363 00:14:51,760 --> 00:14:55,120 choose stop or open with live server now 364 00:14:55,120 --> 00:14:57,199 we would once again since we stopped 365 00:14:57,199 --> 00:14:59,120 that we would need to open with live 366 00:14:59,120 --> 00:15:02,160 server to have a live web page that 367 00:15:02,160 --> 00:15:04,240 responds to changes we make and notice 368 00:15:04,240 --> 00:15:06,160 how it opened a new tab here instead of 369 00:15:06,160 --> 00:15:08,800 our old tab our old tab the server for 370 00:15:08,800 --> 00:15:11,920 that page closed so we close that out 371 00:15:11,920 --> 00:15:14,320 and now we're using this one because 372 00:15:14,320 --> 00:15:16,639 this is going to show our most recent 373 00:15:16,639 --> 00:15:18,959 changes now after we've created a web 374 00:15:18,959 --> 00:15:21,519 page how do we know if we have errors or 375 00:15:21,519 --> 00:15:23,760 not well that's where a validation 376 00:15:23,760 --> 00:15:26,600 service comes into play and this is the 377 00:15:26,600 --> 00:15:32,160 w3c markup validation service w3c stands 378 00:15:32,160 --> 00:15:35,199 for the world wide web consortium that 379 00:15:35,199 --> 00:15:37,199 really makes the standards for the web 380 00:15:37,199 --> 00:15:39,600 overall what we want to do to check our 381 00:15:39,600 --> 00:15:41,040 page is click 382 00:15:41,040 --> 00:15:43,680 file upload because remember our web 383 00:15:43,680 --> 00:15:45,920 page is really not on the web it's just 384 00:15:45,920 --> 00:15:48,320 on our computer your web page is on your 385 00:15:48,320 --> 00:15:50,880 computer and mine is on my computer so 386 00:15:50,880 --> 00:15:52,959 let's click file upload 387 00:15:52,959 --> 00:15:54,800 and from here we're going to choose the 388 00:15:54,800 --> 00:15:57,040 file on the computer 389 00:15:57,040 --> 00:16:00,000 and we get a browse window and now i'm 390 00:16:00,000 --> 00:16:01,680 going to click 391 00:16:01,680 --> 00:16:05,440 html tutorials and then i have an html 392 00:16:05,440 --> 00:16:08,399 course folder and then the zero lesson 393 00:16:08,399 --> 00:16:11,199 one folder that we just created and 394 00:16:11,199 --> 00:16:13,519 there is the index.html file we've been 395 00:16:13,519 --> 00:16:15,920 working with so i'll click open 396 00:16:15,920 --> 00:16:18,240 and now that it's here we can click 397 00:16:18,240 --> 00:16:19,040 check 398 00:16:19,040 --> 00:16:21,279 and we're going to get some errors and 399 00:16:21,279 --> 00:16:24,160 we'll go over those 400 00:16:24,959 --> 00:16:27,759 okay now that we have checked our page 401 00:16:27,759 --> 00:16:29,680 we have got a warning and a couple of 402 00:16:29,680 --> 00:16:31,920 errors so there are things we need to 403 00:16:31,920 --> 00:16:32,720 fix 404 00:16:32,720 --> 00:16:35,519 in our html file let's address these in 405 00:16:35,519 --> 00:16:37,519 order with the first warning says 406 00:16:37,519 --> 00:16:40,720 consider adding a lang attribute to the 407 00:16:40,720 --> 00:16:43,519 html start tag to declare the language 408 00:16:43,519 --> 00:16:46,079 of the document so that is something we 409 00:16:46,079 --> 00:16:48,639 should do 410 00:16:48,880 --> 00:16:51,440 now we're going to go to the html tag 411 00:16:51,440 --> 00:16:53,120 and we can add what is called an 412 00:16:53,120 --> 00:16:56,160 attribute and this is the lang attribute 413 00:16:56,160 --> 00:16:58,800 and i'm going to set it equal to en 414 00:16:58,800 --> 00:17:01,120 which is the abbreviation for english in 415 00:17:01,120 --> 00:17:02,240 general 416 00:17:02,240 --> 00:17:05,679 you can supply a dialect like this dash 417 00:17:05,679 --> 00:17:06,880 us 418 00:17:06,880 --> 00:17:10,240 or i believe the other would be gb 419 00:17:10,240 --> 00:17:12,559 but i don't usually do that so i'm just 420 00:17:12,559 --> 00:17:15,520 putting e in for english you might have 421 00:17:15,520 --> 00:17:17,600 another language you prefer to put there 422 00:17:17,600 --> 00:17:20,240 and you can find a list of those at the 423 00:17:20,240 --> 00:17:23,039 mdm network as well and that's the page 424 00:17:23,039 --> 00:17:25,360 where we were looking for the definition 425 00:17:25,360 --> 00:17:27,439 of html at the beginning of this 426 00:17:27,439 --> 00:17:30,559 tutorial so i will link to mdn the 427 00:17:30,559 --> 00:17:32,960 mozilla developer network in the 428 00:17:32,960 --> 00:17:34,799 description now that we've added the 429 00:17:34,799 --> 00:17:36,320 language attribute 430 00:17:36,320 --> 00:17:38,559 let's go look at the other errors we had 431 00:17:38,559 --> 00:17:40,960 and see what else we need to fix 432 00:17:40,960 --> 00:17:43,600 it says the character encoding was not 433 00:17:43,600 --> 00:17:47,200 declared so we also need to handle that 434 00:17:47,200 --> 00:17:50,480 let's go back to visual studio code 435 00:17:50,480 --> 00:17:52,880 and now inside the head 436 00:17:52,880 --> 00:17:55,919 there is an element called meta earlier 437 00:17:55,919 --> 00:17:58,720 i said the head stores metadata let me 438 00:17:58,720 --> 00:18:01,360 keep it all lower case here and here we 439 00:18:01,360 --> 00:18:04,400 can set what is called the character set 440 00:18:04,400 --> 00:18:08,160 attribute inside of a meta element 441 00:18:08,160 --> 00:18:10,600 and from here i'll put 442 00:18:10,600 --> 00:18:13,520 utf-8 which is the standard for all web 443 00:18:13,520 --> 00:18:16,000 pages that i have worked on there are 444 00:18:16,000 --> 00:18:18,160 other character sets but this is the 445 00:18:18,160 --> 00:18:19,200 typical 446 00:18:19,200 --> 00:18:21,120 value you would see in there so i'm 447 00:18:21,120 --> 00:18:22,720 going to save this 448 00:18:22,720 --> 00:18:25,679 and in the future we'll cover more meta 449 00:18:25,679 --> 00:18:28,160 tag values that we'll have inside of the 450 00:18:28,160 --> 00:18:30,080 head now let's go back and look at that 451 00:18:30,080 --> 00:18:31,600 last error that we got from the 452 00:18:31,600 --> 00:18:34,400 validation service and that said start 453 00:18:34,400 --> 00:18:37,679 tags seen without seeing a doctype first 454 00:18:37,679 --> 00:18:40,160 expected and it shows you exactly what 455 00:18:40,160 --> 00:18:41,280 it wants 456 00:18:41,280 --> 00:18:45,600 type html and that is a document type 457 00:18:45,600 --> 00:18:48,400 declaration that should be on the very 458 00:18:48,400 --> 00:18:51,679 first line of your page so let's go back 459 00:18:51,679 --> 00:18:53,679 to our html file 460 00:18:53,679 --> 00:18:56,799 go to the very top and we'll press 461 00:18:56,799 --> 00:18:57,840 return 462 00:18:57,840 --> 00:19:00,400 and we'll paste in exactly what they had 463 00:19:00,400 --> 00:19:01,840 there so you see 464 00:19:01,840 --> 00:19:04,080 once again it starts with the less than 465 00:19:04,080 --> 00:19:05,840 and the greater than symbol but this is 466 00:19:05,840 --> 00:19:08,799 not really an html element or tag this 467 00:19:08,799 --> 00:19:10,880 is just a doctype 468 00:19:10,880 --> 00:19:13,440 declaration that you should have in 469 00:19:13,440 --> 00:19:16,720 every html file at the very beginning so 470 00:19:16,720 --> 00:19:20,000 now i'll put that in and save as well 471 00:19:20,000 --> 00:19:22,080 let's look at 472 00:19:22,080 --> 00:19:25,039 the validator first and let's choose the 473 00:19:25,039 --> 00:19:27,679 file again 474 00:19:28,240 --> 00:19:30,880 and now i've selected the index.html to 475 00:19:30,880 --> 00:19:33,200 upload with our changes and we'll click 476 00:19:33,200 --> 00:19:35,200 check 477 00:19:35,200 --> 00:19:37,679 document checking completed no errors or 478 00:19:37,679 --> 00:19:40,080 warnings so our document is just fine 479 00:19:40,080 --> 00:19:42,559 let's go to the tab with our page 480 00:19:42,559 --> 00:19:44,799 and let's reload the page 481 00:19:44,799 --> 00:19:47,520 and once we reloaded everything looked 482 00:19:47,520 --> 00:19:49,520 great so we've got hello world this is 483 00:19:49,520 --> 00:19:51,200 my first web page 484 00:19:51,200 --> 00:19:53,280 and we still have my first web page in 485 00:19:53,280 --> 00:19:56,240 the tab at the top for the title and we 486 00:19:56,240 --> 00:20:00,080 have passed all validation checks 487 00:20:00,080 --> 00:20:02,480 let's move on to what else might go 488 00:20:02,480 --> 00:20:04,960 inside of our head element and remember 489 00:20:04,960 --> 00:20:07,600 everything inside of the head element is 490 00:20:07,600 --> 00:20:10,960 not seen on the web page and with that 491 00:20:10,960 --> 00:20:14,000 said i've dragged the visual studio code 492 00:20:14,000 --> 00:20:15,840 window to a little smaller size on the 493 00:20:15,840 --> 00:20:16,720 left 494 00:20:16,720 --> 00:20:19,039 and chrome to a little smaller size on 495 00:20:19,039 --> 00:20:21,360 the right but i'm just going to expand 496 00:20:21,360 --> 00:20:23,440 visual studio code for now because 497 00:20:23,440 --> 00:20:25,760 anything we change inside of the head 498 00:20:25,760 --> 00:20:27,600 element will not be seen on the web page 499 00:20:27,600 --> 00:20:30,799 anyway so i'll click the expand button 500 00:20:30,799 --> 00:20:33,520 and we'll just see our code now i had 501 00:20:33,520 --> 00:20:35,840 mentioned that we could store more 502 00:20:35,840 --> 00:20:38,400 metadata inside of the head element and 503 00:20:38,400 --> 00:20:40,559 that is definitely some of what we see 504 00:20:40,559 --> 00:20:43,120 so let's add a couple of typical 505 00:20:43,120 --> 00:20:45,679 meta tags that have metadata that you 506 00:20:45,679 --> 00:20:48,400 would commonly see the first being for 507 00:20:48,400 --> 00:20:51,039 the author of the page so we'll say name 508 00:20:51,039 --> 00:20:53,840 the attribute name is equal to author 509 00:20:53,840 --> 00:20:55,600 because that's what type of meta tag 510 00:20:55,600 --> 00:20:56,720 this will be 511 00:20:56,720 --> 00:20:58,559 and then we'll have a content attribute 512 00:20:58,559 --> 00:21:00,400 and this is where you can put your name 513 00:21:00,400 --> 00:21:02,320 i'll put my name for now since i'm the 514 00:21:02,320 --> 00:21:04,159 author of the page 515 00:21:04,159 --> 00:21:06,559 and then let's add another meta tag 516 00:21:06,559 --> 00:21:08,720 and let's give it a name as well 517 00:21:08,720 --> 00:21:11,039 and here we'll put a description this 518 00:21:11,039 --> 00:21:13,120 will describe the web page in a little 519 00:21:13,120 --> 00:21:15,440 bit more detail than possibly the title 520 00:21:15,440 --> 00:21:17,760 would so here we can put more of a 521 00:21:17,760 --> 00:21:20,000 sentence and once again we need the 522 00:21:20,000 --> 00:21:22,559 content attribute to do that let's say 523 00:21:22,559 --> 00:21:24,480 this page 524 00:21:24,480 --> 00:21:27,600 contains all the things 525 00:21:27,600 --> 00:21:30,880 i am learning 526 00:21:30,880 --> 00:21:31,760 how 527 00:21:31,760 --> 00:21:34,320 if i could spell how to and it looks 528 00:21:34,320 --> 00:21:36,320 like i'm extending the page so in visual 529 00:21:36,320 --> 00:21:39,600 studio code i'm going to press alt z in 530 00:21:39,600 --> 00:21:41,600 windows to make sure 531 00:21:41,600 --> 00:21:44,799 the text continues to wrap and then i'll 532 00:21:44,799 --> 00:21:47,919 say all the things i am or i am learning 533 00:21:47,919 --> 00:21:49,840 how to 534 00:21:49,840 --> 00:21:52,480 create as i 535 00:21:52,480 --> 00:21:53,360 learn 536 00:21:53,360 --> 00:21:56,080 html there we go now after that of 537 00:21:56,080 --> 00:21:57,760 course you still need to close the meta 538 00:21:57,760 --> 00:21:58,720 tag 539 00:21:58,720 --> 00:22:01,840 and ctrl s to save and again i got the 540 00:22:01,840 --> 00:22:03,760 words to wrap let's go to the view menu 541 00:22:03,760 --> 00:22:05,520 if you scroll all the way down you can 542 00:22:05,520 --> 00:22:08,400 see word wrap is alt z it may be 543 00:22:08,400 --> 00:22:10,000 something different if you're on mac or 544 00:22:10,000 --> 00:22:11,600 linux so you might want to check the 545 00:22:11,600 --> 00:22:14,159 view menu under word wrap if you want 546 00:22:14,159 --> 00:22:16,720 your words to wrap and not just extend 547 00:22:16,720 --> 00:22:18,720 forever to the right here now we've 548 00:22:18,720 --> 00:22:21,440 added more description about our page 549 00:22:21,440 --> 00:22:24,000 now this information could be picked up 550 00:22:24,000 --> 00:22:25,760 in a search engine 551 00:22:25,760 --> 00:22:27,600 or some other service that wants to 552 00:22:27,600 --> 00:22:30,320 learn more about our web page however 553 00:22:30,320 --> 00:22:32,159 let's go ahead and put something in the 554 00:22:32,159 --> 00:22:34,320 head where we will notice the change 555 00:22:34,320 --> 00:22:36,559 when we go back to the browser and that 556 00:22:36,559 --> 00:22:39,840 is to add what is called a fav icon and 557 00:22:39,840 --> 00:22:42,240 we can do that with a link element let 558 00:22:42,240 --> 00:22:44,320 me use lowercase once again 559 00:22:44,320 --> 00:22:45,840 and inside of the link element we'll 560 00:22:45,840 --> 00:22:49,120 have several attributes one is the rel 561 00:22:49,120 --> 00:22:52,159 which stands for relate or relation how 562 00:22:52,159 --> 00:22:53,440 does this 563 00:22:53,440 --> 00:22:54,559 relate 564 00:22:54,559 --> 00:22:56,720 to the web page and here we're going to 565 00:22:56,720 --> 00:22:58,720 provide an icon 566 00:22:58,720 --> 00:23:02,400 after that we need an href this refers 567 00:23:02,400 --> 00:23:05,200 back to html that stands for hypertext 568 00:23:05,200 --> 00:23:07,760 this is a hypertext reference so we're 569 00:23:07,760 --> 00:23:09,919 referencing a resource 570 00:23:09,919 --> 00:23:12,799 and here we're going to reference a file 571 00:23:12,799 --> 00:23:15,200 that i have now put inside of our folder 572 00:23:15,200 --> 00:23:17,760 that is called html5 573 00:23:17,760 --> 00:23:21,440 dot png and if i click the file explorer 574 00:23:21,440 --> 00:23:22,480 over here 575 00:23:22,480 --> 00:23:25,440 you can see i've now added an image file 576 00:23:25,440 --> 00:23:28,360 that's a dot png file 577 00:23:28,360 --> 00:23:30,720 html5.png and you can download this 578 00:23:30,720 --> 00:23:33,039 image from the resources and you can see 579 00:23:33,039 --> 00:23:36,320 it's a small little icon for the html5 580 00:23:36,320 --> 00:23:37,280 logo 581 00:23:37,280 --> 00:23:39,039 so i'll close that i'm going to click 582 00:23:39,039 --> 00:23:41,520 the file browser to have that disappear 583 00:23:41,520 --> 00:23:43,760 again so we see this now we have one 584 00:23:43,760 --> 00:23:45,919 more attribute to add and that is the 585 00:23:45,919 --> 00:23:46,880 type 586 00:23:46,880 --> 00:23:49,120 what type of resource is this and here 587 00:23:49,120 --> 00:23:51,840 we'll say image slash x 588 00:23:51,840 --> 00:23:53,440 dash icon 589 00:23:53,440 --> 00:23:55,840 and now we can save this and i'm going 590 00:23:55,840 --> 00:23:57,679 to go ahead and 591 00:23:57,679 --> 00:24:00,559 minimize the code window and now if we 592 00:24:00,559 --> 00:24:03,120 look at our web page in the browser 593 00:24:03,120 --> 00:24:05,679 notice we have an icon up here my first 594 00:24:05,679 --> 00:24:08,799 web page now has our little fave icon 595 00:24:08,799 --> 00:24:10,720 beside the title and that's what we 596 00:24:10,720 --> 00:24:13,520 added here in the head by adding the fav 597 00:24:13,520 --> 00:24:16,320 icon with a link element now we won't 598 00:24:16,320 --> 00:24:18,880 add any more here today but this is the 599 00:24:18,880 --> 00:24:22,080 same area where we would link to css 600 00:24:22,080 --> 00:24:25,120 files and even javascript files and 601 00:24:25,120 --> 00:24:27,039 other resources that we pull in from the 602 00:24:27,039 --> 00:24:29,760 web so the head is a very important part 603 00:24:29,760 --> 00:24:33,440 of the page even though we don't see the 604 00:24:33,440 --> 00:24:36,400 content of the head inside the body of 605 00:24:36,400 --> 00:24:38,640 the page and i said we wouldn't link to 606 00:24:38,640 --> 00:24:41,200 anything else here today but since we do 607 00:24:41,200 --> 00:24:44,559 have this default css to make our page a 608 00:24:44,559 --> 00:24:47,039 dark mode if you added this and once 609 00:24:47,039 --> 00:24:48,799 again this is optional if you prefer the 610 00:24:48,799 --> 00:24:50,559 white page with dark text you didn't 611 00:24:50,559 --> 00:24:53,039 need to add this and we had this style 612 00:24:53,039 --> 00:24:55,760 element here to hold the css in the head 613 00:24:55,760 --> 00:24:57,440 but that's not usually where you would 614 00:24:57,440 --> 00:24:59,520 find it for a page so let's go ahead and 615 00:24:59,520 --> 00:25:01,760 do that i'll expand visual studio code 616 00:25:01,760 --> 00:25:02,640 again 617 00:25:02,640 --> 00:25:04,559 click the file explorer 618 00:25:04,559 --> 00:25:06,720 and over here inside the file tree i 619 00:25:06,720 --> 00:25:09,279 want to create a new file i'm going to 620 00:25:09,279 --> 00:25:12,880 call this main dot css and i have an 621 00:25:12,880 --> 00:25:16,080 empty css file all we need to do now is 622 00:25:16,080 --> 00:25:18,320 go back to the index 623 00:25:18,320 --> 00:25:20,720 select the css that we put here for the 624 00:25:20,720 --> 00:25:23,279 html on the body not the style tags just 625 00:25:23,279 --> 00:25:25,840 select the css that's between the style 626 00:25:25,840 --> 00:25:29,440 tags i'm going to press ctrl x to cut it 627 00:25:29,440 --> 00:25:31,360 out of the page 628 00:25:31,360 --> 00:25:34,799 go to the css file and ctrl v 629 00:25:34,799 --> 00:25:37,840 to paste it into the css file 630 00:25:37,840 --> 00:25:40,640 ctrl s to save that file 631 00:25:40,640 --> 00:25:44,080 now back in the html i'm going to remove 632 00:25:44,080 --> 00:25:46,799 the style element and i'm going to add 633 00:25:46,799 --> 00:25:48,720 another link 634 00:25:48,720 --> 00:25:52,080 and here for the rel not ref but rel 635 00:25:52,080 --> 00:25:54,320 we have a style sheet because we're 636 00:25:54,320 --> 00:25:57,120 adding a css style sheet 637 00:25:57,120 --> 00:26:00,760 our href will now point to our css 638 00:26:00,760 --> 00:26:03,360 main.css specifically 639 00:26:03,360 --> 00:26:04,880 and our type 640 00:26:04,880 --> 00:26:07,919 which isn't actually required anymore 641 00:26:07,919 --> 00:26:08,720 but 642 00:26:08,720 --> 00:26:10,559 since we have it let's go ahead and add 643 00:26:10,559 --> 00:26:12,799 text slash css 644 00:26:12,799 --> 00:26:15,039 but our browser should know what it is 645 00:26:15,039 --> 00:26:17,360 even if we didn't add that at this point 646 00:26:17,360 --> 00:26:19,360 because that's really the only type of 647 00:26:19,360 --> 00:26:22,000 style sheet there is is a css now that 648 00:26:22,000 --> 00:26:24,000 we've made these changes let's save the 649 00:26:24,000 --> 00:26:24,880 file 650 00:26:24,880 --> 00:26:27,279 and let's go ahead and click the button 651 00:26:27,279 --> 00:26:29,760 again to make our code shrink back down 652 00:26:29,760 --> 00:26:31,840 and look at our page we can reload just 653 00:26:31,840 --> 00:26:33,520 to make sure it has reloaded and 654 00:26:33,520 --> 00:26:35,679 everything looks the same that's because 655 00:26:35,679 --> 00:26:37,440 we are pulling in 656 00:26:37,440 --> 00:26:39,200 our code i'm going to go ahead and hide 657 00:26:39,200 --> 00:26:41,679 the file tree here we are pulling in our 658 00:26:41,679 --> 00:26:45,360 css code using our link tag inside of 659 00:26:45,360 --> 00:26:47,279 the head element now finally i'm going 660 00:26:47,279 --> 00:26:49,679 to create an error on purpose by 661 00:26:49,679 --> 00:26:52,080 deleting the greater than symbol at the 662 00:26:52,080 --> 00:26:54,480 end of this link tag and saving the file 663 00:26:54,480 --> 00:26:56,640 with ctrl s now why would i create an 664 00:26:56,640 --> 00:26:58,799 error on purpose because we want to 665 00:26:58,799 --> 00:27:01,279 validate our file again and this will 666 00:27:01,279 --> 00:27:03,520 let us know that yes we've got the right 667 00:27:03,520 --> 00:27:07,120 file and we expect one error there 668 00:27:07,120 --> 00:27:08,799 you don't of course have to create an 669 00:27:08,799 --> 00:27:10,159 error on purpose but that's what i'm 670 00:27:10,159 --> 00:27:12,000 doing to make sure i'm selecting the 671 00:27:12,000 --> 00:27:13,919 correct file out of the correct lesson 672 00:27:13,919 --> 00:27:16,159 folder because i'm in lesson two now you 673 00:27:16,159 --> 00:27:17,760 might be working on the same file we 674 00:27:17,760 --> 00:27:20,399 started with there's the css file and 675 00:27:20,399 --> 00:27:21,840 the image file 676 00:27:21,840 --> 00:27:25,360 i'll select the index.html and check and 677 00:27:25,360 --> 00:27:27,440 i should have at least one if not more 678 00:27:27,440 --> 00:27:30,080 errors because of that yes that created 679 00:27:30,080 --> 00:27:32,320 several errors on the page just by 680 00:27:32,320 --> 00:27:33,600 leaving out 681 00:27:33,600 --> 00:27:36,799 that one closing greater than symbol for 682 00:27:36,799 --> 00:27:39,840 the link tag so now if i save again 683 00:27:39,840 --> 00:27:42,159 visual studio code formats our code 684 00:27:42,159 --> 00:27:43,840 correctly instead of trying to pull the 685 00:27:43,840 --> 00:27:44,880 closing 686 00:27:44,880 --> 00:27:46,960 head tag up here 687 00:27:46,960 --> 00:27:50,320 and i'm going to go ahead and reload 688 00:27:50,320 --> 00:27:52,720 or re-upload 689 00:27:52,720 --> 00:27:54,559 the file to check it so we choose 690 00:27:54,559 --> 00:27:56,640 index.html 691 00:27:56,640 --> 00:27:59,039 now i'll click check 692 00:27:59,039 --> 00:28:01,760 and document checking completed no 693 00:28:01,760 --> 00:28:04,640 errors or warnings to show so just by 694 00:28:04,640 --> 00:28:08,240 missing one little thing in our page we 695 00:28:08,240 --> 00:28:10,880 could have a whole list of errors so 696 00:28:10,880 --> 00:28:12,799 follow the prompts from visual studio 697 00:28:12,799 --> 00:28:15,679 code notice how if i leave that out 698 00:28:15,679 --> 00:28:18,799 here in my theme this turns red or pink 699 00:28:18,799 --> 00:28:20,480 it doesn't look quite right visual 700 00:28:20,480 --> 00:28:22,080 studio code wants to format it 701 00:28:22,080 --> 00:28:23,919 differently if i save the file and it 702 00:28:23,919 --> 00:28:25,520 pulls that up here instead of putting 703 00:28:25,520 --> 00:28:28,080 the closing tag there's several cues to 704 00:28:28,080 --> 00:28:30,320 show you that you have an error in the 705 00:28:30,320 --> 00:28:31,279 file 706 00:28:31,279 --> 00:28:33,120 and so follow those prompts in visual 707 00:28:33,120 --> 00:28:35,360 studio code and then remember to always 708 00:28:35,360 --> 00:28:38,720 validate your page and we always do that 709 00:28:38,720 --> 00:28:40,880 at 710 00:28:41,320 --> 00:28:43,120 validator.w3.org i'll get rid of 711 00:28:43,120 --> 00:28:44,720 everything at the end of that and here 712 00:28:44,720 --> 00:28:46,880 you can pull it up and then we choose 713 00:28:46,880 --> 00:28:49,679 file upload 714 00:28:49,679 --> 00:28:51,760 let's look at the basics of creating 715 00:28:51,760 --> 00:28:54,240 text content on a web page 716 00:28:54,240 --> 00:28:56,880 now web pages are a lot like essays or 717 00:28:56,880 --> 00:28:58,720 even a newspaper where they have 718 00:28:58,720 --> 00:29:02,080 headings and usually paragraphs of text 719 00:29:02,080 --> 00:29:04,159 or at least a sentence or two of text 720 00:29:04,159 --> 00:29:06,080 describing something afterwards so we 721 00:29:06,080 --> 00:29:08,320 see our paragraph element here 722 00:29:08,320 --> 00:29:10,720 and our h1 heading here 723 00:29:10,720 --> 00:29:12,880 much of the text content on a web page 724 00:29:12,880 --> 00:29:14,720 will be made up of headings and 725 00:29:14,720 --> 00:29:15,919 paragraphs 726 00:29:15,919 --> 00:29:18,799 now headings have a hierarchy and that 727 00:29:18,799 --> 00:29:19,840 means 728 00:29:19,840 --> 00:29:22,640 we'll start out with only one h1 on the 729 00:29:22,640 --> 00:29:25,279 page and each page should only have one 730 00:29:25,279 --> 00:29:28,640 h1 but after that we can have subtopics 731 00:29:28,640 --> 00:29:31,120 so here i'm going to press shift alt and 732 00:29:31,120 --> 00:29:33,760 the down arrow again i'm using windows 733 00:29:33,760 --> 00:29:35,360 it may be different for you on mac or 734 00:29:35,360 --> 00:29:38,880 linux but i just copied a line down so 735 00:29:38,880 --> 00:29:40,960 now i have two h1s but i'm going to 736 00:29:40,960 --> 00:29:42,240 change this 737 00:29:42,240 --> 00:29:46,159 by typing h2 over that h1 and notice how 738 00:29:46,159 --> 00:29:48,880 the ending tag immediately changed here 739 00:29:48,880 --> 00:29:50,559 in visual studio code as well so that's 740 00:29:50,559 --> 00:29:52,720 helpful now this is a subtopic for the 741 00:29:52,720 --> 00:29:55,440 page so imagine this being the title of 742 00:29:55,440 --> 00:29:57,200 your essay or 743 00:29:57,200 --> 00:30:00,000 the big headline in a newspaper and then 744 00:30:00,000 --> 00:30:03,760 we have subtopics so for h2 i'm going to 745 00:30:03,760 --> 00:30:06,960 type something different let's go with 746 00:30:06,960 --> 00:30:09,679 i'm ready to learn 747 00:30:09,679 --> 00:30:11,840 html 748 00:30:11,840 --> 00:30:14,080 and now we can have a paragraph about 749 00:30:14,080 --> 00:30:16,240 that and so we do at least we have a 750 00:30:16,240 --> 00:30:19,120 sentence this is my first web page 751 00:30:19,120 --> 00:30:21,520 now i'm going to highlight this 752 00:30:21,520 --> 00:30:24,159 subheading h2 and the paragraph and once 753 00:30:24,159 --> 00:30:26,480 again i'm going to press shift alt and 754 00:30:26,480 --> 00:30:29,360 the down arrow and it copies both lines 755 00:30:29,360 --> 00:30:32,000 down for me and i'll add an extra blank 756 00:30:32,000 --> 00:30:34,399 line here and i'm going to change this 757 00:30:34,399 --> 00:30:38,480 second h2 into an h3 now we i'll use 758 00:30:38,480 --> 00:30:40,159 lowercase there we go 759 00:30:40,159 --> 00:30:42,399 now we could have more than one h2 on 760 00:30:42,399 --> 00:30:44,080 the page but i wanted to show how you 761 00:30:44,080 --> 00:30:46,000 could have a subtopic 762 00:30:46,000 --> 00:30:49,039 under our subtopic so we have the title 763 00:30:49,039 --> 00:30:50,640 for our essay 764 00:30:50,640 --> 00:30:53,360 and then we have an area of discussion 765 00:30:53,360 --> 00:30:55,840 that we've added in h2 as the heading 766 00:30:55,840 --> 00:30:58,159 for and now under this area of 767 00:30:58,159 --> 00:30:59,760 discussion we could have further 768 00:30:59,760 --> 00:31:02,399 subtopics and this is how we now have an 769 00:31:02,399 --> 00:31:05,840 h3 so now instead of my first web page 770 00:31:05,840 --> 00:31:08,240 or i'm ready to learn html let's change 771 00:31:08,240 --> 00:31:10,159 this to 772 00:31:10,159 --> 00:31:13,600 my daily schedule so this will 773 00:31:13,600 --> 00:31:17,679 discuss our schedule for learning html 774 00:31:17,679 --> 00:31:19,200 and then we could just say something 775 00:31:19,200 --> 00:31:22,080 about i'm going to tell you how or 776 00:31:22,080 --> 00:31:23,279 let me 777 00:31:23,279 --> 00:31:24,320 tell 778 00:31:24,320 --> 00:31:27,519 you how i and i'll just put some dots 779 00:31:27,519 --> 00:31:29,519 there for now just we'll expand on that 780 00:31:29,519 --> 00:31:31,919 later if we want to but really what i'm 781 00:31:31,919 --> 00:31:34,480 showing is this hierarchy and it's also 782 00:31:34,480 --> 00:31:37,360 important not just visually let me go 783 00:31:37,360 --> 00:31:39,679 ahead and save this by pressing ctrl s 784 00:31:39,679 --> 00:31:41,440 or remember you can go to the file menu 785 00:31:41,440 --> 00:31:43,919 and choose save 786 00:31:43,919 --> 00:31:46,399 visually we see that it's naturally 787 00:31:46,399 --> 00:31:49,679 formatted larger on the page with the h1 788 00:31:49,679 --> 00:31:53,039 than it is the h2 and then the h3 is 789 00:31:53,039 --> 00:31:56,240 even smaller than the h2 but we can 790 00:31:56,240 --> 00:31:58,320 change all of that with css in the 791 00:31:58,320 --> 00:32:01,360 future css will really style how our web 792 00:32:01,360 --> 00:32:02,880 page looks 793 00:32:02,880 --> 00:32:06,240 but what is important is we can quickly 794 00:32:06,240 --> 00:32:08,480 visually tell the headers apart right 795 00:32:08,480 --> 00:32:09,440 now 796 00:32:09,440 --> 00:32:11,519 and when a screen reader or other 797 00:32:11,519 --> 00:32:15,360 assistive technology looks at our code 798 00:32:15,360 --> 00:32:18,240 then it can navigate the code through 799 00:32:18,240 --> 00:32:20,399 the headers of what is important here 800 00:32:20,399 --> 00:32:22,880 the header hierarchy and that's why it's 801 00:32:22,880 --> 00:32:26,000 so important to organize your page the 802 00:32:26,000 --> 00:32:28,559 headers actually give semantic meaning 803 00:32:28,559 --> 00:32:29,440 saying 804 00:32:29,440 --> 00:32:31,600 this is the main topic this is a 805 00:32:31,600 --> 00:32:34,399 sub-topic under the main topic and this 806 00:32:34,399 --> 00:32:36,640 is a sub-topic under 807 00:32:36,640 --> 00:32:37,840 the higher 808 00:32:37,840 --> 00:32:40,720 sub-topic in the hierarchy so headers do 809 00:32:40,720 --> 00:32:43,200 have semantic importance and that means 810 00:32:43,200 --> 00:32:46,000 giving meaning to our content and of 811 00:32:46,000 --> 00:32:48,640 course then our paragraphs can just have 812 00:32:48,640 --> 00:32:51,039 whatever details we want to add about 813 00:32:51,039 --> 00:32:53,440 those subtopics as well now even though 814 00:32:53,440 --> 00:32:55,600 we've created a little separation in our 815 00:32:55,600 --> 00:32:57,760 code when we look at our page we just 816 00:32:57,760 --> 00:33:00,080 see line space line space and we don't 817 00:33:00,080 --> 00:33:02,240 have a good visual separation i'm going 818 00:33:02,240 --> 00:33:04,960 to add an element that doesn't really 819 00:33:04,960 --> 00:33:07,120 provide any semantic meaning but 820 00:33:07,120 --> 00:33:09,200 visually it helps us on the page and 821 00:33:09,200 --> 00:33:11,840 that is a horizontal rule element and 822 00:33:11,840 --> 00:33:13,919 it's just added like this there is no 823 00:33:13,919 --> 00:33:16,559 closing tag for the horizontal rule and 824 00:33:16,559 --> 00:33:19,760 then i'm going to add another one after 825 00:33:19,760 --> 00:33:22,480 our final subtopic discussion here so we 826 00:33:22,480 --> 00:33:24,720 can add something else underneath that 827 00:33:24,720 --> 00:33:26,720 and so now let's save and look what the 828 00:33:26,720 --> 00:33:29,440 horizontal rule adds to the page 829 00:33:29,440 --> 00:33:32,080 now we have lines going across the page 830 00:33:32,080 --> 00:33:33,840 and those are called horizontal rules so 831 00:33:33,840 --> 00:33:36,399 we have our main heading and now we have 832 00:33:36,399 --> 00:33:39,440 our sub topic and i left the h3 in here 833 00:33:39,440 --> 00:33:41,679 because it's a sub-topic 834 00:33:41,679 --> 00:33:43,279 of this topic 835 00:33:43,279 --> 00:33:45,760 so now we can go ahead and i'm going to 836 00:33:45,760 --> 00:33:48,799 highlight the h2 and the h3 837 00:33:48,799 --> 00:33:51,440 ctrl c to copy 838 00:33:51,440 --> 00:33:54,640 come down further on the page and paste 839 00:33:54,640 --> 00:33:56,480 and i'll save just so we can see what 840 00:33:56,480 --> 00:33:58,720 happens now we have two different 841 00:33:58,720 --> 00:34:01,279 subtopic sections and we still have our 842 00:34:01,279 --> 00:34:04,240 top hello world so you could picture 843 00:34:04,240 --> 00:34:06,399 this more like an essay page and of 844 00:34:06,399 --> 00:34:08,159 course these could be 845 00:34:08,159 --> 00:34:10,639 paragraphs that have more text or you 846 00:34:10,639 --> 00:34:13,040 could picture this more like a newspaper 847 00:34:13,040 --> 00:34:15,440 and then we would have an article here 848 00:34:15,440 --> 00:34:17,119 and an article here 849 00:34:17,119 --> 00:34:19,760 in our heading at the top this is also a 850 00:34:19,760 --> 00:34:22,800 good time to discuss white space so if i 851 00:34:22,800 --> 00:34:25,040 just press the space bar 852 00:34:25,040 --> 00:34:27,440 and add all these extra spaces to the 853 00:34:27,440 --> 00:34:29,040 page 854 00:34:29,040 --> 00:34:31,520 if i say visual studio code is already 855 00:34:31,520 --> 00:34:34,480 going to probably reformat this but what 856 00:34:34,480 --> 00:34:36,480 is important to know when i save you'll 857 00:34:36,480 --> 00:34:38,399 see yes it changed and it just went back 858 00:34:38,399 --> 00:34:40,399 and only left one space 859 00:34:40,399 --> 00:34:41,200 is 860 00:34:41,200 --> 00:34:43,359 web pages or html 861 00:34:43,359 --> 00:34:45,599 do not honor all those spaces you might 862 00:34:45,599 --> 00:34:47,359 add with a space bar it's called white 863 00:34:47,359 --> 00:34:50,480 space collapsing and so we can space 864 00:34:50,480 --> 00:34:51,839 many lines 865 00:34:51,839 --> 00:34:54,320 but it won't really be represented on 866 00:34:54,320 --> 00:34:56,560 the page that is not how we add extra 867 00:34:56,560 --> 00:34:59,920 space in html so again recognize white 868 00:34:59,920 --> 00:35:02,320 space collapsing that it will not last 869 00:35:02,320 --> 00:35:04,960 now something we can do is what's called 870 00:35:04,960 --> 00:35:07,599 a line break and that can be inserted 871 00:35:07,599 --> 00:35:10,240 inside a paragraph element so now i'll 872 00:35:10,240 --> 00:35:12,480 put let me tell you how 873 00:35:12,480 --> 00:35:16,000 and then i'm going to return remember we 874 00:35:16,000 --> 00:35:17,760 don't have to have the opening and 875 00:35:17,760 --> 00:35:19,599 closing tags on the same line for an 876 00:35:19,599 --> 00:35:22,320 element we can nest other elements 877 00:35:22,320 --> 00:35:25,040 inside of an element so i'm going to put 878 00:35:25,040 --> 00:35:28,560 a break and that stands for line break 879 00:35:28,560 --> 00:35:30,079 and then i'll put three dots and i'll 880 00:35:30,079 --> 00:35:32,560 say let me tell you how 881 00:35:32,560 --> 00:35:36,720 i learn more about web dev 882 00:35:36,720 --> 00:35:38,800 and a period that looks good and now we 883 00:35:38,800 --> 00:35:40,880 can put another break and i'll just put 884 00:35:40,880 --> 00:35:42,400 three more dots 885 00:35:42,400 --> 00:35:45,680 and say i plan 886 00:35:45,680 --> 00:35:48,480 out my schedule 887 00:35:48,480 --> 00:35:50,640 and one more line break 888 00:35:50,640 --> 00:35:51,920 the three dots of course are not 889 00:35:51,920 --> 00:35:53,680 required it's just what i'm adding here 890 00:35:53,680 --> 00:35:56,079 and then i'll say i use 891 00:35:56,079 --> 00:35:58,400 resources from 892 00:35:58,400 --> 00:36:01,040 mdn which previously we discussed and 893 00:36:01,040 --> 00:36:03,520 when i showed the definition of html we 894 00:36:03,520 --> 00:36:05,440 were looking at the mozilla developer 895 00:36:05,440 --> 00:36:07,920 network and that's what mdn is 896 00:36:07,920 --> 00:36:11,359 so now if we save this file you can see 897 00:36:11,359 --> 00:36:14,000 we've got line breaks and we're showing 898 00:36:14,000 --> 00:36:16,880 each of these details on separate lines 899 00:36:16,880 --> 00:36:19,280 okay let's scroll down and change some 900 00:36:19,280 --> 00:36:21,839 of our second topic now so instead of 901 00:36:21,839 --> 00:36:24,880 i'm ready to learn html let's change our 902 00:36:24,880 --> 00:36:27,280 second sub-topic to 903 00:36:27,280 --> 00:36:31,760 i am let me capitalize that i am also 904 00:36:31,760 --> 00:36:33,280 planning a 905 00:36:33,280 --> 00:36:34,800 vacation 906 00:36:34,800 --> 00:36:37,280 and now we can put some details about 907 00:36:37,280 --> 00:36:39,280 that vacation in the paragraph 908 00:36:39,280 --> 00:36:41,119 underneath this subtopic 909 00:36:41,119 --> 00:36:42,800 and i'll say 910 00:36:42,800 --> 00:36:46,079 i've been working hard 911 00:36:46,079 --> 00:36:47,680 and really 912 00:36:47,680 --> 00:36:49,359 need a 913 00:36:49,359 --> 00:36:51,119 getaway period 914 00:36:51,119 --> 00:36:53,040 and let's see if we want to add anything 915 00:36:53,040 --> 00:36:55,280 underneath that yep let's add one more 916 00:36:55,280 --> 00:36:57,520 sentence and what i'm going to do once 917 00:36:57,520 --> 00:36:59,839 again is shift alt and the down arrow 918 00:36:59,839 --> 00:37:01,760 and visual studio code will copy that 919 00:37:01,760 --> 00:37:03,200 line down so 920 00:37:03,200 --> 00:37:05,440 now we can just change the sentence here 921 00:37:05,440 --> 00:37:06,640 and i'll say 922 00:37:06,640 --> 00:37:09,119 i live in kansas 923 00:37:09,119 --> 00:37:11,119 so i want to 924 00:37:11,119 --> 00:37:12,240 visit 925 00:37:12,240 --> 00:37:13,520 a beach 926 00:37:13,520 --> 00:37:15,599 kansas is nowhere near the ocean so that 927 00:37:15,599 --> 00:37:18,640 sounds pretty good so let's save that 928 00:37:18,640 --> 00:37:20,880 and now we can see our sub-topic here 929 00:37:20,880 --> 00:37:22,800 changed and we have a couple of 930 00:37:22,800 --> 00:37:23,920 sentences 931 00:37:23,920 --> 00:37:26,400 about planning the vacation now let's 932 00:37:26,400 --> 00:37:29,839 change the my daily schedule subtopic at 933 00:37:29,839 --> 00:37:32,000 the h3 to 934 00:37:32,000 --> 00:37:35,440 places i'd like to 935 00:37:35,440 --> 00:37:36,400 visit 936 00:37:36,400 --> 00:37:38,720 and i guess i could capitalize that l on 937 00:37:38,720 --> 00:37:40,400 like there we go places i'd like to 938 00:37:40,400 --> 00:37:41,440 visit 939 00:37:41,440 --> 00:37:43,599 and now i'll highlight that paragraph 940 00:37:43,599 --> 00:37:44,880 and say 941 00:37:44,880 --> 00:37:46,400 i've heard 942 00:37:46,400 --> 00:37:47,839 good things 943 00:37:47,839 --> 00:37:48,839 about 944 00:37:48,839 --> 00:37:50,480 the 945 00:37:50,480 --> 00:37:52,560 caribbean 946 00:37:52,560 --> 00:37:54,800 sounds like they have warm water and 947 00:37:54,800 --> 00:37:57,520 fun islands to visit okay so now we've 948 00:37:57,520 --> 00:37:59,680 got some extra details here 949 00:37:59,680 --> 00:38:02,640 and we can have more than one sub-topic 950 00:38:02,640 --> 00:38:04,960 here so let's go ahead and do that again 951 00:38:04,960 --> 00:38:07,040 shift alt and the down arrow to copy 952 00:38:07,040 --> 00:38:08,079 that 953 00:38:08,079 --> 00:38:09,680 and places 954 00:38:09,680 --> 00:38:12,960 i want to avoid could be our next one so 955 00:38:12,960 --> 00:38:16,640 places i want to avoid and here we can 956 00:38:16,640 --> 00:38:18,880 put 957 00:38:18,880 --> 00:38:21,280 anywhere cold 958 00:38:21,280 --> 00:38:23,520 no 959 00:38:23,520 --> 00:38:26,720 way with an exclamation mark okay so now 960 00:38:26,720 --> 00:38:28,800 we've got some extra detail here in our 961 00:38:28,800 --> 00:38:30,079 second area 962 00:38:30,079 --> 00:38:33,440 and this will allow me to go ahead and 963 00:38:33,440 --> 00:38:35,520 show you the difference between block 964 00:38:35,520 --> 00:38:38,000 level elements and inline elements what 965 00:38:38,000 --> 00:38:39,839 we've been working with here are block 966 00:38:39,839 --> 00:38:41,520 level elements notice with every 967 00:38:41,520 --> 00:38:44,240 paragraph and every heading they start 968 00:38:44,240 --> 00:38:47,200 on a new line that is a block level 969 00:38:47,200 --> 00:38:49,440 element it creates space around it which 970 00:38:49,440 --> 00:38:51,359 of course can be formatted in the future 971 00:38:51,359 --> 00:38:52,880 with css 972 00:38:52,880 --> 00:38:56,320 but it does not allow you to put another 973 00:38:56,320 --> 00:38:59,040 paragraph inside of a header or a 974 00:38:59,040 --> 00:39:01,839 paragraph without creating that new line 975 00:39:01,839 --> 00:39:04,079 that space so there will be 976 00:39:04,079 --> 00:39:07,040 a return essentially in your content 977 00:39:07,040 --> 00:39:09,040 when you're using a block level element 978 00:39:09,040 --> 00:39:11,440 but when you use an inline element that 979 00:39:11,440 --> 00:39:13,680 doesn't happen so let's look at a couple 980 00:39:13,680 --> 00:39:15,680 of these first of all 981 00:39:15,680 --> 00:39:16,880 we can say 982 00:39:16,880 --> 00:39:20,160 i've been working really hard and i've 983 00:39:20,160 --> 00:39:22,240 been working hard and really need a 984 00:39:22,240 --> 00:39:24,400 getaway let's emphasize that really need 985 00:39:24,400 --> 00:39:27,520 a getaway and one in line element that 986 00:39:27,520 --> 00:39:30,320 we can do that with is em and that 987 00:39:30,320 --> 00:39:32,960 stands for emphasis that provides some 988 00:39:32,960 --> 00:39:36,320 semantic meaning once again so now a 989 00:39:36,320 --> 00:39:38,640 screen reader or other assistive 990 00:39:38,640 --> 00:39:39,839 technology 991 00:39:39,839 --> 00:39:42,000 or are just our browser overall knows 992 00:39:42,000 --> 00:39:44,240 we're emphasizing this really need a 993 00:39:44,240 --> 00:39:47,200 getaway so let's save and notice 994 00:39:47,200 --> 00:39:49,920 really need a getaway is italicized now 995 00:39:49,920 --> 00:39:52,640 we're not using it for the italicized 996 00:39:52,640 --> 00:39:54,400 text again the formatting will come 997 00:39:54,400 --> 00:39:56,880 later with css but that is just the 998 00:39:56,880 --> 00:40:00,560 natural behavior of using the emphasis 999 00:40:00,560 --> 00:40:03,440 element as we wrap our text but it 1000 00:40:03,440 --> 00:40:06,000 provides that meaning now what if we 1001 00:40:06,000 --> 00:40:08,240 really want to emphasize that text it 1002 00:40:08,240 --> 00:40:11,440 has a strong meaning to us like our no 1003 00:40:11,440 --> 00:40:12,960 way here we don't want to go anywhere 1004 00:40:12,960 --> 00:40:15,440 cold well there is a 1005 00:40:15,440 --> 00:40:18,640 strong element we can use for that 1006 00:40:18,640 --> 00:40:21,280 and here let me grab the ending tag and 1007 00:40:21,280 --> 00:40:24,480 put it at the end of our no way and now 1008 00:40:24,480 --> 00:40:27,040 i'll save and notice it got just a 1009 00:40:27,040 --> 00:40:29,440 little bit bigger and bolder here as far 1010 00:40:29,440 --> 00:40:31,520 as the natural formatting of the strong 1011 00:40:31,520 --> 00:40:33,599 element but again this is an inline 1012 00:40:33,599 --> 00:40:36,079 element it's inside the paragraph 1013 00:40:36,079 --> 00:40:38,400 it did not create a 1014 00:40:38,400 --> 00:40:41,040 break in the line it did not create any 1015 00:40:41,040 --> 00:40:43,359 extra space around it so these are 1016 00:40:43,359 --> 00:40:46,160 inline level elements and the other 1017 00:40:46,160 --> 00:40:47,760 elements such as the header and the 1018 00:40:47,760 --> 00:40:49,760 paragraph we've been working with 1019 00:40:49,760 --> 00:40:52,640 are block level elements another type of 1020 00:40:52,640 --> 00:40:55,680 content we can add to our page are html 1021 00:40:55,680 --> 00:40:59,680 entities so they are things that are not 1022 00:40:59,680 --> 00:41:02,240 really the normal text we would type out 1023 00:41:02,240 --> 00:41:04,800 what for example if we wanted to 1024 00:41:04,800 --> 00:41:07,760 show a less than or greater than 1025 00:41:07,760 --> 00:41:10,640 symbol on our page right now html 1026 00:41:10,640 --> 00:41:12,400 interprets those as we're starting or 1027 00:41:12,400 --> 00:41:14,800 ending a tag so we can't just easily put 1028 00:41:14,800 --> 00:41:16,800 one of those on the page 1029 00:41:16,800 --> 00:41:19,520 likewise there are some other symbols or 1030 00:41:19,520 --> 00:41:21,520 remember when i talked about white space 1031 00:41:21,520 --> 00:41:23,119 collapsing if we need a little bit of 1032 00:41:23,119 --> 00:41:25,440 extra space there's an html entity for 1033 00:41:25,440 --> 00:41:27,760 that so i want to indent these three 1034 00:41:27,760 --> 00:41:30,160 lines with a little bit of space 1035 00:41:30,160 --> 00:41:33,119 and i can use the html entity i still 1036 00:41:33,119 --> 00:41:35,599 need the closing there here we go 1037 00:41:35,599 --> 00:41:37,920 and ampersand is usually what starts out 1038 00:41:37,920 --> 00:41:40,520 in html entity and now i'll type 1039 00:41:40,520 --> 00:41:43,359 nbsp and a semicolon 1040 00:41:43,359 --> 00:41:45,280 notice visual studio code recognizes 1041 00:41:45,280 --> 00:41:46,800 that right away 1042 00:41:46,800 --> 00:41:48,480 and if i save 1043 00:41:48,480 --> 00:41:51,040 i have spaced this line over just a 1044 00:41:51,040 --> 00:41:52,319 little bit 1045 00:41:52,319 --> 00:41:54,240 now i can add more than one of those if 1046 00:41:54,240 --> 00:41:56,240 i want so i'm going to copy that and i'm 1047 00:41:56,240 --> 00:41:58,800 going to add two more 1048 00:41:58,800 --> 00:42:01,599 and now save and our line is over even a 1049 00:42:01,599 --> 00:42:03,040 little further 1050 00:42:03,040 --> 00:42:05,200 so i will go ahead and select all three 1051 00:42:05,200 --> 00:42:06,400 of these 1052 00:42:06,400 --> 00:42:08,640 and i'm going to paste them right after 1053 00:42:08,640 --> 00:42:11,200 the line break on each line 1054 00:42:11,200 --> 00:42:14,400 and save and now we have indented with 1055 00:42:14,400 --> 00:42:17,200 some extra space all three of these 1056 00:42:17,200 --> 00:42:19,760 lines with these html entities that 1057 00:42:19,760 --> 00:42:22,079 create space but as i mentioned there 1058 00:42:22,079 --> 00:42:24,560 are other html entities as well so let's 1059 00:42:24,560 --> 00:42:26,400 scroll down here to the bottom of our 1060 00:42:26,400 --> 00:42:27,520 page 1061 00:42:27,520 --> 00:42:29,760 and after this last topic 1062 00:42:29,760 --> 00:42:32,560 let's add another hr 1063 00:42:32,560 --> 00:42:35,440 and now we'll type and 1064 00:42:35,440 --> 00:42:37,119 lt 1065 00:42:37,119 --> 00:42:40,560 and a semicolon and that stands for less 1066 00:42:40,560 --> 00:42:43,760 than so if we save now look we have a 1067 00:42:43,760 --> 00:42:46,000 less than symbol underneath the final 1068 00:42:46,000 --> 00:42:47,760 horizontal rule here at the bottom of 1069 00:42:47,760 --> 00:42:50,960 the page i'm going to go ahead and copy 1070 00:42:50,960 --> 00:42:52,480 that 1071 00:42:52,480 --> 00:42:53,839 and paste 1072 00:42:53,839 --> 00:42:55,520 two more 1073 00:42:55,520 --> 00:42:57,280 and then i'm going to add 1074 00:42:57,280 --> 00:42:58,720 ampersand 1075 00:42:58,720 --> 00:43:01,200 copy with a semicolon and that will be 1076 00:43:01,200 --> 00:43:03,440 the copyright symbol then i'll just put 1077 00:43:03,440 --> 00:43:05,760 my name you can put yours and then i'm 1078 00:43:05,760 --> 00:43:08,560 going to add ampersand gt for greater 1079 00:43:08,560 --> 00:43:11,359 than in a semicolon and once again i'll 1080 00:43:11,359 --> 00:43:12,560 copy that 1081 00:43:12,560 --> 00:43:13,839 and paste 1082 00:43:13,839 --> 00:43:16,560 two more now if we save 1083 00:43:16,560 --> 00:43:18,640 you can see we've got our three less 1084 00:43:18,640 --> 00:43:20,960 than symbols we've got a copyright 1085 00:43:20,960 --> 00:43:22,160 symbol 1086 00:43:22,160 --> 00:43:23,440 then 1087 00:43:23,440 --> 00:43:26,400 your name or my name and then 1088 00:43:26,400 --> 00:43:27,920 three greater than symbols and we're 1089 00:43:27,920 --> 00:43:31,200 using html entities to create those 1090 00:43:31,200 --> 00:43:34,319 i'll provide a link to a list of html 1091 00:43:34,319 --> 00:43:36,400 entity codes in the resources for this 1092 00:43:36,400 --> 00:43:38,240 tutorial you may have noticed we've got 1093 00:43:38,240 --> 00:43:41,040 a couple of abbreviations on our page we 1094 00:43:41,040 --> 00:43:43,680 have the abbreviation for kansas which 1095 00:43:43,680 --> 00:43:46,880 is ks and we also have the acronym or 1096 00:43:46,880 --> 00:43:49,520 abbreviation for the mozilla developer 1097 00:43:49,520 --> 00:43:51,359 network here on our page so let's go 1098 00:43:51,359 --> 00:43:53,359 ahead and add 1099 00:43:53,359 --> 00:43:56,480 another inline level element and that 1100 00:43:56,480 --> 00:43:59,119 can help us with our abbreviations 1101 00:43:59,119 --> 00:44:00,880 and that is abb 1102 00:44:00,880 --> 00:44:04,720 r but it doesn't really do it by itself 1103 00:44:04,720 --> 00:44:07,040 i'm going to go ahead and select mdn cut 1104 00:44:07,040 --> 00:44:08,720 it and paste it here in the middle of 1105 00:44:08,720 --> 00:44:10,240 the element 1106 00:44:10,240 --> 00:44:12,000 and this won't really provide anything 1107 00:44:12,000 --> 00:44:16,400 we also need to add the attribute title 1108 00:44:16,400 --> 00:44:19,200 here i can put the full 1109 00:44:19,200 --> 00:44:20,960 text mozilla 1110 00:44:20,960 --> 00:44:23,359 developer network 1111 00:44:23,359 --> 00:44:25,119 and save and now when we look at our 1112 00:44:25,119 --> 00:44:28,400 page it has some dots underneath mdn if 1113 00:44:28,400 --> 00:44:30,160 we mouse over 1114 00:44:30,160 --> 00:44:32,319 we get a tool tip that says mozilla 1115 00:44:32,319 --> 00:44:34,400 developer network now it's important to 1116 00:44:34,400 --> 00:44:37,760 realize this tool tip will not really be 1117 00:44:37,760 --> 00:44:40,079 available to screen reader and assistive 1118 00:44:40,079 --> 00:44:42,000 technology so 1119 00:44:42,000 --> 00:44:44,720 we don't want anything super important 1120 00:44:44,720 --> 00:44:46,560 for the understanding of the meaning of 1121 00:44:46,560 --> 00:44:48,960 the page to be in there so if we are 1122 00:44:48,960 --> 00:44:50,480 using abbreviation 1123 00:44:50,480 --> 00:44:53,119 it's a nice thing to have but it is 1124 00:44:53,119 --> 00:44:56,400 really not accessible to all assistive 1125 00:44:56,400 --> 00:44:58,079 technologies so 1126 00:44:58,079 --> 00:45:00,319 it's it you can't have anything in there 1127 00:45:00,319 --> 00:45:03,040 that the page really depends on because 1128 00:45:03,040 --> 00:45:05,680 some of the people accessing the page 1129 00:45:05,680 --> 00:45:08,400 may not be able to read or see the 1130 00:45:08,400 --> 00:45:10,400 information that you provide here inside 1131 00:45:10,400 --> 00:45:12,800 the title attribute of the abbreviation 1132 00:45:12,800 --> 00:45:15,119 element let's go ahead and add that 1133 00:45:15,119 --> 00:45:18,319 abbreviation element for kansas as well 1134 00:45:18,319 --> 00:45:21,040 so abb r and then title 1135 00:45:21,040 --> 00:45:25,119 and i'll spell the state name kansas 1136 00:45:25,119 --> 00:45:27,440 and then i can go ahead and double click 1137 00:45:27,440 --> 00:45:30,640 on kansas control x to cut and i'm going 1138 00:45:30,640 --> 00:45:33,119 to paste it with ctrl v right inside the 1139 00:45:33,119 --> 00:45:34,240 element 1140 00:45:34,240 --> 00:45:35,920 save and now 1141 00:45:35,920 --> 00:45:37,839 dots are under the ks here on the page 1142 00:45:37,839 --> 00:45:39,760 and if i mouse over we get a tool tip 1143 00:45:39,760 --> 00:45:42,160 that says kansas let's put another 1144 00:45:42,160 --> 00:45:44,640 paragraph under places i'd like to visit 1145 00:45:44,640 --> 00:45:47,440 and i'll put i can just type p and press 1146 00:45:47,440 --> 00:45:50,000 tab as well there we go and now i'll 1147 00:45:50,000 --> 00:45:51,040 type 1148 00:45:51,040 --> 00:45:53,200 i've heard 1149 00:45:53,200 --> 00:45:54,560 good things 1150 00:45:54,560 --> 00:45:56,160 about 1151 00:45:56,160 --> 00:45:58,880 going here with the colon 1152 00:45:58,880 --> 00:46:00,800 and now i'm going to add 1153 00:46:00,800 --> 00:46:03,839 an address element and we can put a 1154 00:46:03,839 --> 00:46:05,200 location 1155 00:46:05,200 --> 00:46:07,040 inside of this address element and it 1156 00:46:07,040 --> 00:46:09,440 tells the browser that this is an 1157 00:46:09,440 --> 00:46:12,640 address or a specific location so i'm 1158 00:46:12,640 --> 00:46:15,119 just going to paste this in because you 1159 00:46:15,119 --> 00:46:16,720 don't need to see me type all of this 1160 00:46:16,720 --> 00:46:19,359 and i might easily have a typo here this 1161 00:46:19,359 --> 00:46:22,240 is margaritaville island in cancun it 1162 00:46:22,240 --> 00:46:24,720 sounds like a great place for a vacation 1163 00:46:24,720 --> 00:46:26,960 notice we've got a line break element 1164 00:46:26,960 --> 00:46:29,839 after each line except the last line and 1165 00:46:29,839 --> 00:46:32,480 if we save this and look at the page you 1166 00:46:32,480 --> 00:46:34,880 can see how the browser handles this 1167 00:46:34,880 --> 00:46:36,000 it is 1168 00:46:36,000 --> 00:46:38,160 just three lines of text it is all 1169 00:46:38,160 --> 00:46:40,640 italicized by default 1170 00:46:40,640 --> 00:46:43,359 and the browser knows that this is an 1171 00:46:43,359 --> 00:46:44,960 address and once again so would 1172 00:46:44,960 --> 00:46:47,200 assistive technology so an address 1173 00:46:47,200 --> 00:46:49,520 element does provide 1174 00:46:49,520 --> 00:46:51,760 some semantic meaning as well to the 1175 00:46:51,760 --> 00:46:54,160 content within it now before we finish 1176 00:46:54,160 --> 00:46:56,640 this lesson about content there's one 1177 00:46:56,640 --> 00:46:59,599 other thing we can add to our code now 1178 00:46:59,599 --> 00:47:01,440 we won't see it on the page but it is 1179 00:47:01,440 --> 00:47:02,880 important to us 1180 00:47:02,880 --> 00:47:05,680 and this is an html comment 1181 00:47:05,680 --> 00:47:07,760 and so now you can see visual studio 1182 00:47:07,760 --> 00:47:09,760 code colored this differently at least 1183 00:47:09,760 --> 00:47:11,599 with the theme that i'm using and we can 1184 00:47:11,599 --> 00:47:14,400 leave a note for ourselves inside of our 1185 00:47:14,400 --> 00:47:17,119 code now notice this will not be on the 1186 00:47:17,119 --> 00:47:19,200 page but i will show you how the public 1187 00:47:19,200 --> 00:47:20,800 can see it so you don't want to put 1188 00:47:20,800 --> 00:47:23,599 anything in here that you don't expect 1189 00:47:23,599 --> 00:47:25,680 the public to be able to read 1190 00:47:25,680 --> 00:47:27,920 i'll put a to-do which is a common use 1191 00:47:27,920 --> 00:47:29,839 and i'll just put add 1192 00:47:29,839 --> 00:47:32,240 more places so it's a reminder to me to 1193 00:47:32,240 --> 00:47:34,319 add more places to the list of places i 1194 00:47:34,319 --> 00:47:36,640 want to avoid we save that and it 1195 00:47:36,640 --> 00:47:38,400 doesn't show on the page it's just a 1196 00:47:38,400 --> 00:47:40,640 reminder in the code or a note to 1197 00:47:40,640 --> 00:47:43,440 yourself inside of the code but i will 1198 00:47:43,440 --> 00:47:45,839 show you how the public can see this if 1199 00:47:45,839 --> 00:47:47,440 we right click 1200 00:47:47,440 --> 00:47:50,079 and choose inspect that works or you can 1201 00:47:50,079 --> 00:47:52,720 also press ctrl u 1202 00:47:52,720 --> 00:47:55,599 either way will show your source code 1203 00:47:55,599 --> 00:47:58,400 now notice we've got a comment in here 1204 00:47:58,400 --> 00:48:00,880 that says add more places it's not 1205 00:48:00,880 --> 00:48:03,440 visible on the web page itself but it is 1206 00:48:03,440 --> 00:48:05,359 visible in the source code again you can 1207 00:48:05,359 --> 00:48:07,200 press ctrl u 1208 00:48:07,200 --> 00:48:08,640 to view this 1209 00:48:08,640 --> 00:48:11,599 now notice live server also injected a 1210 00:48:11,599 --> 00:48:13,839 comment here and it injected some 1211 00:48:13,839 --> 00:48:15,520 javascript so when we look at the 1212 00:48:15,520 --> 00:48:17,599 overall source code of what is live 1213 00:48:17,599 --> 00:48:20,160 we're seeing more than we even had but 1214 00:48:20,160 --> 00:48:22,160 this is a comment once again that is not 1215 00:48:22,160 --> 00:48:24,480 seen on the page and live server is 1216 00:48:24,480 --> 00:48:27,119 using a script element that we do not 1217 00:48:27,119 --> 00:48:28,720 see on the page either and that can 1218 00:48:28,720 --> 00:48:31,440 contain javascript for example so 1219 00:48:31,440 --> 00:48:33,440 just to let you know if you leave a note 1220 00:48:33,440 --> 00:48:34,640 for yourself 1221 00:48:34,640 --> 00:48:37,200 it can be viewed by others and finally 1222 00:48:37,200 --> 00:48:39,520 now that we've added all of this html 1223 00:48:39,520 --> 00:48:42,880 content to our page we once again should 1224 00:48:42,880 --> 00:48:45,839 go to the validator markup validation 1225 00:48:45,839 --> 00:48:49,760 service from w3c to check our file to 1226 00:48:49,760 --> 00:48:51,599 see if it is valid html or if we have 1227 00:48:51,599 --> 00:48:54,480 any mistakes choose validate by file 1228 00:48:54,480 --> 00:48:55,520 upload 1229 00:48:55,520 --> 00:48:58,240 and then click choose file 1230 00:48:58,240 --> 00:49:00,240 i'm going to have to probably go to a 1231 00:49:00,240 --> 00:49:01,839 different folder from the one that i 1232 00:49:01,839 --> 00:49:04,960 checked last so i'll go to html course 1233 00:49:04,960 --> 00:49:07,040 lesson three which is the file we are 1234 00:49:07,040 --> 00:49:10,160 working with choose my index.html and 1235 00:49:10,160 --> 00:49:12,079 open that here with the validator now it 1236 00:49:12,079 --> 00:49:15,359 has the index.html file uploaded and we 1237 00:49:15,359 --> 00:49:17,280 can click check 1238 00:49:17,280 --> 00:49:20,000 and we'll see if we have valid html so 1239 00:49:20,000 --> 00:49:22,240 this is valid it's green document 1240 00:49:22,240 --> 00:49:24,079 checking completed no errors or warnings 1241 00:49:24,079 --> 00:49:26,000 to show if you have errors or warnings 1242 00:49:26,000 --> 00:49:28,400 it should point out exactly where that 1243 00:49:28,400 --> 00:49:30,480 error is and you can fix that in your 1244 00:49:30,480 --> 00:49:32,800 html 1245 00:49:32,800 --> 00:49:34,960 let's look at how to create lists on a 1246 00:49:34,960 --> 00:49:38,480 web page lists are very useful and are 1247 00:49:38,480 --> 00:49:41,760 used in many places on the web so we 1248 00:49:41,760 --> 00:49:43,200 have three different types of lists 1249 00:49:43,200 --> 00:49:44,800 we're going to create today ordered 1250 00:49:44,800 --> 00:49:47,440 lists unordered lists and description 1251 00:49:47,440 --> 00:49:49,920 lists let's start out with recapping 1252 00:49:49,920 --> 00:49:52,079 here we've got visual studio code on the 1253 00:49:52,079 --> 00:49:54,880 left and i've got the head element 1254 00:49:54,880 --> 00:49:57,680 collapsed so we had meta details inside 1255 00:49:57,680 --> 00:49:59,440 of there we can collapse that by 1256 00:49:59,440 --> 00:50:01,200 clicking on the arrow by the line and 1257 00:50:01,200 --> 00:50:04,400 you see between lines between 4 and 11 1258 00:50:04,400 --> 00:50:06,000 are now collapsed 1259 00:50:06,000 --> 00:50:08,000 so we're working inside of the body 1260 00:50:08,000 --> 00:50:10,960 element to add content to the page 1261 00:50:10,960 --> 00:50:13,119 and this is visual studio code and i'm 1262 00:50:13,119 --> 00:50:15,680 running the live server extension you 1263 00:50:15,680 --> 00:50:18,559 can see down here it says port 5500 1264 00:50:18,559 --> 00:50:20,480 click to close server if you've 1265 00:50:20,480 --> 00:50:23,119 installed the live server extension it 1266 00:50:23,119 --> 00:50:26,079 may say click to launch or something 1267 00:50:26,079 --> 00:50:27,839 like that which would actually launch 1268 00:50:27,839 --> 00:50:29,520 your web page for you because that's how 1269 00:50:29,520 --> 00:50:30,960 you want to view it 1270 00:50:30,960 --> 00:50:33,760 in a development environment you don't 1271 00:50:33,760 --> 00:50:35,920 want to just go to file and open the 1272 00:50:35,920 --> 00:50:38,480 file in your browser you want to have 1273 00:50:38,480 --> 00:50:41,200 that live server running that simulates 1274 00:50:41,200 --> 00:50:43,520 a web server if you're not familiar with 1275 00:50:43,520 --> 00:50:45,440 the live server extension you can click 1276 00:50:45,440 --> 00:50:48,319 on the extensions logo here and instead 1277 00:50:48,319 --> 00:50:50,000 of searching for prettier that i have in 1278 00:50:50,000 --> 00:50:51,920 there you can search for 1279 00:50:51,920 --> 00:50:53,359 live server 1280 00:50:53,359 --> 00:50:55,440 and you can install that live server 1281 00:50:55,440 --> 00:50:58,800 extension by ritwik day right here 1282 00:50:58,800 --> 00:51:01,440 okay so we've recapped all of that 1283 00:51:01,440 --> 00:51:03,680 here's the file tree with our files i'm 1284 00:51:03,680 --> 00:51:06,240 going to hide that by clicking the file 1285 00:51:06,240 --> 00:51:08,319 explorer here so we can see more of our 1286 00:51:08,319 --> 00:51:11,359 code and we will add lists to our web 1287 00:51:11,359 --> 00:51:14,480 page today so i'll scroll down 1288 00:51:14,480 --> 00:51:17,200 to under the subtopic of my daily 1289 00:51:17,200 --> 00:51:18,319 schedule 1290 00:51:18,319 --> 00:51:20,720 and notice how we had these line breaks 1291 00:51:20,720 --> 00:51:22,559 and spaces here well we're going to 1292 00:51:22,559 --> 00:51:24,559 replace these so i'm highlighting the 1293 00:51:24,559 --> 00:51:26,400 first one and then i'm going to press 1294 00:51:26,400 --> 00:51:29,200 ctrl d that highlights the next one and 1295 00:51:29,200 --> 00:51:31,920 ctrl d again now it has highlighted all 1296 00:51:31,920 --> 00:51:33,200 three of those 1297 00:51:33,200 --> 00:51:35,280 and instead of this line break i'm going 1298 00:51:35,280 --> 00:51:37,119 to type li 1299 00:51:37,119 --> 00:51:39,040 and press tab 1300 00:51:39,040 --> 00:51:41,359 that adds a list item 1301 00:51:41,359 --> 00:51:43,599 but we haven't enclosed this in a list 1302 00:51:43,599 --> 00:51:45,200 yet and we definitely don't need the 1303 00:51:45,200 --> 00:51:47,040 closing list items here so once again 1304 00:51:47,040 --> 00:51:49,200 ctrl d ctrl d 1305 00:51:49,200 --> 00:51:51,920 so all three of these will be list items 1306 00:51:51,920 --> 00:51:54,400 but they need to be inside of a list too 1307 00:51:54,400 --> 00:51:56,559 so let's make this an ordered list by 1308 00:51:56,559 --> 00:52:00,000 starting out with an ol and i'll press 1309 00:52:00,000 --> 00:52:02,960 tab and we got the closing ol tag as 1310 00:52:02,960 --> 00:52:04,480 well that stands for 1311 00:52:04,480 --> 00:52:07,119 ordered list as you might expect and i'm 1312 00:52:07,119 --> 00:52:09,599 going to actually put the ol down here 1313 00:52:09,599 --> 00:52:12,079 after the paragraph tag the closing 1314 00:52:12,079 --> 00:52:14,800 paragraph tag and i'm going to cut with 1315 00:52:14,800 --> 00:52:18,160 control x or you could retype if you 1316 00:52:18,160 --> 00:52:19,680 want to and 1317 00:52:19,680 --> 00:52:23,359 i pasted the closing paragraph tag right 1318 00:52:23,359 --> 00:52:26,160 after the end of let me tell you how so 1319 00:52:26,160 --> 00:52:28,720 this is a shortened paragraph now and 1320 00:52:28,720 --> 00:52:30,480 the list will not be inside of the 1321 00:52:30,480 --> 00:52:31,920 paragraph 1322 00:52:31,920 --> 00:52:34,000 now we have our ordered list but that 1323 00:52:34,000 --> 00:52:36,960 also needs closing li tags so i'm going 1324 00:52:36,960 --> 00:52:39,520 to type the less than symbol and a slash 1325 00:52:39,520 --> 00:52:41,680 and visual studio code instantly filled 1326 00:52:41,680 --> 00:52:44,000 in the closing the rest of what is 1327 00:52:44,000 --> 00:52:45,760 needed there and i'll do that again for 1328 00:52:45,760 --> 00:52:47,119 the second one 1329 00:52:47,119 --> 00:52:49,520 and then i'll do that here for the last 1330 00:52:49,520 --> 00:52:51,359 one and notice we do have the 1331 00:52:51,359 --> 00:52:54,240 abbreviation still nested inside of the 1332 00:52:54,240 --> 00:52:56,640 list item here so now i'm going to press 1333 00:52:56,640 --> 00:52:58,800 ctrl s and save 1334 00:52:58,800 --> 00:53:01,200 and visual studio code reformatted that 1335 00:53:01,200 --> 00:53:03,440 just a little for me but look at our 1336 00:53:03,440 --> 00:53:06,000 page now that we've added this list it's 1337 00:53:06,000 --> 00:53:08,160 an ordered list and it is numbered that 1338 00:53:08,160 --> 00:53:10,240 means it's in or in order numerical 1339 00:53:10,240 --> 00:53:13,599 order one two and three notice these are 1340 00:53:13,599 --> 00:53:14,400 not 1341 00:53:14,400 --> 00:53:16,960 this text is not enclosed inside of a 1342 00:53:16,960 --> 00:53:19,359 paragraph element so it's not creating 1343 00:53:19,359 --> 00:53:21,359 that extra space that a paragraph 1344 00:53:21,359 --> 00:53:23,040 element does they're stacked right on 1345 00:53:23,040 --> 00:53:24,720 top of each other there's still a little 1346 00:53:24,720 --> 00:53:26,800 bit of space but not like we have 1347 00:53:26,800 --> 00:53:29,440 between our paragraphs so that is an 1348 00:53:29,440 --> 00:53:31,359 ordered list we start out with the 1349 00:53:31,359 --> 00:53:33,920 ordered list element and then the list 1350 00:53:33,920 --> 00:53:37,280 items go inside it and each list item is 1351 00:53:37,280 --> 00:53:40,400 starting and then ending with the li now 1352 00:53:40,400 --> 00:53:42,800 let's scroll down and look at our 1353 00:53:42,800 --> 00:53:45,200 vacation area it says i'm also planning 1354 00:53:45,200 --> 00:53:46,640 a vacation 1355 00:53:46,640 --> 00:53:48,880 and we've got a places i would like to 1356 00:53:48,880 --> 00:53:51,920 visit area so after that let's go ahead 1357 00:53:51,920 --> 00:53:54,480 and add a ul which as you might guess 1358 00:53:54,480 --> 00:53:56,800 stands for unordered list 1359 00:53:56,800 --> 00:53:59,760 and we'll go ahead and cut that closing 1360 00:53:59,760 --> 00:54:02,640 tag and i want to put it after the 1361 00:54:02,640 --> 00:54:04,480 address here at the bottom 1362 00:54:04,480 --> 00:54:07,040 so this will be our full list now we 1363 00:54:07,040 --> 00:54:09,520 need to declare list items here 1364 00:54:09,520 --> 00:54:11,839 in this instance i'm going to go ahead 1365 00:54:11,839 --> 00:54:14,960 and keep the paragraph tags inside each 1366 00:54:14,960 --> 00:54:18,319 list item so we created an li there and 1367 00:54:18,319 --> 00:54:20,720 i'll use control x to cut 1368 00:54:20,720 --> 00:54:23,040 and close that first list item here for 1369 00:54:23,040 --> 00:54:24,800 the first paragraph 1370 00:54:24,800 --> 00:54:27,760 i'll do something similar here 1371 00:54:27,760 --> 00:54:30,559 got an li but the closing one is going 1372 00:54:30,559 --> 00:54:32,319 to be in a different spot because our 1373 00:54:32,319 --> 00:54:34,480 list item can have these tags nested 1374 00:54:34,480 --> 00:54:36,079 within it just like we nested the 1375 00:54:36,079 --> 00:54:38,480 paragraph here i'm going to go ahead and 1376 00:54:38,480 --> 00:54:40,880 nest the paragraph and the address 1377 00:54:40,880 --> 00:54:42,799 inside of the list item 1378 00:54:42,799 --> 00:54:46,079 here and so now if i save 1379 00:54:46,079 --> 00:54:48,400 and visual studio code reformatted my 1380 00:54:48,400 --> 00:54:50,799 code for me but notice here's the 1381 00:54:50,799 --> 00:54:52,559 beginning of the list item 1382 00:54:52,559 --> 00:54:54,799 and we have the end way down here after 1383 00:54:54,799 --> 00:54:56,960 the address so let's look at what this 1384 00:54:56,960 --> 00:54:59,040 unordered list looks like on our page 1385 00:54:59,040 --> 00:55:01,040 and you can see instead of numbers it 1386 00:55:01,040 --> 00:55:04,160 has dots it does have the extra space 1387 00:55:04,160 --> 00:55:06,559 created by the paragraph tags 1388 00:55:06,559 --> 00:55:09,920 and the address element still has the 1389 00:55:09,920 --> 00:55:11,920 content that it had before and still 1390 00:55:11,920 --> 00:55:14,880 formatted the same but notice our 1391 00:55:14,880 --> 00:55:17,280 ordered list and our unordered list are 1392 00:55:17,280 --> 00:55:20,079 both indented compared to being over 1393 00:55:20,079 --> 00:55:22,240 here flush to the left with everything 1394 00:55:22,240 --> 00:55:25,119 else we had like they were before so 1395 00:55:25,119 --> 00:55:26,160 similar 1396 00:55:26,160 --> 00:55:28,640 in formatting from an ordered list to an 1397 00:55:28,640 --> 00:55:30,079 unordered list 1398 00:55:30,079 --> 00:55:32,880 and also realize that really the only 1399 00:55:32,880 --> 00:55:34,960 difference is the bullet point here in 1400 00:55:34,960 --> 00:55:37,200 an unordered list versus the number in 1401 00:55:37,200 --> 00:55:38,480 an ordered list 1402 00:55:38,480 --> 00:55:41,520 the extra spaces were caused by the 1403 00:55:41,520 --> 00:55:43,440 paragraph element 1404 00:55:43,440 --> 00:55:46,480 inside of these unordered list items and 1405 00:55:46,480 --> 00:55:48,400 we did not use a paragraph element on 1406 00:55:48,400 --> 00:55:50,319 these ordered list items so the list 1407 00:55:50,319 --> 00:55:52,480 itself and the list items did not create 1408 00:55:52,480 --> 00:55:54,640 the extra space that was created by the 1409 00:55:54,640 --> 00:55:57,200 paragraph elements now let's scroll our 1410 00:55:57,200 --> 00:55:59,040 page we've got enough content we need to 1411 00:55:59,040 --> 00:56:00,720 make sure we're visiting the very bottom 1412 00:56:00,720 --> 00:56:03,440 here we want to add more under place i 1413 00:56:03,440 --> 00:56:06,000 want to avoid and i'm going to change 1414 00:56:06,000 --> 00:56:07,359 that to 1415 00:56:07,359 --> 00:56:10,079 places i want to avoid and let's go 1416 00:56:10,079 --> 00:56:12,319 ahead and remove our paragraph that says 1417 00:56:12,319 --> 00:56:14,640 anywhere cold no way 1418 00:56:14,640 --> 00:56:17,440 and let's add a description list here so 1419 00:56:17,440 --> 00:56:19,119 a description list as you might guess 1420 00:56:19,119 --> 00:56:21,359 starts with dl 1421 00:56:21,359 --> 00:56:23,520 now inside the description list there 1422 00:56:23,520 --> 00:56:25,119 are two different types of elements 1423 00:56:25,119 --> 00:56:27,599 instead of just an li like we had in our 1424 00:56:27,599 --> 00:56:30,319 other lists for a list item we have a 1425 00:56:30,319 --> 00:56:32,400 description term 1426 00:56:32,400 --> 00:56:34,960 and this description term could be 1427 00:56:34,960 --> 00:56:37,040 the place we want to talk about so let's 1428 00:56:37,040 --> 00:56:39,680 say the north pole 1429 00:56:39,680 --> 00:56:42,160 and now for the description term we need 1430 00:56:42,160 --> 00:56:44,640 to also have description details so 1431 00:56:44,640 --> 00:56:46,079 that's dd 1432 00:56:46,079 --> 00:56:49,520 and here i can put i here 1433 00:56:49,520 --> 00:56:50,880 this is 1434 00:56:50,880 --> 00:56:52,720 now let's go ahead and put our strong 1435 00:56:52,720 --> 00:56:55,760 emphasis back here 1436 00:56:55,760 --> 00:56:57,839 and i'll put cold and then our 1437 00:56:57,839 --> 00:57:00,640 exclamation mark so we have put a strong 1438 00:57:00,640 --> 00:57:02,559 emphasis on cold 1439 00:57:02,559 --> 00:57:04,319 and now i'll create an extra line here 1440 00:57:04,319 --> 00:57:06,960 just to space these apart another dt 1441 00:57:06,960 --> 00:57:10,240 i'll put the south pole 1442 00:57:10,240 --> 00:57:13,359 and then dd for the details description 1443 00:57:13,359 --> 00:57:14,960 details 1444 00:57:14,960 --> 00:57:18,240 and i'll say this is also called 1445 00:57:18,240 --> 00:57:20,640 and let's add one more 1446 00:57:20,640 --> 00:57:22,640 description term 1447 00:57:22,640 --> 00:57:24,720 this will be 1448 00:57:24,720 --> 00:57:27,359 mountain mountaintops 1449 00:57:27,359 --> 00:57:28,799 and dd 1450 00:57:28,799 --> 00:57:30,880 for description details 1451 00:57:30,880 --> 00:57:33,040 and these 1452 00:57:33,040 --> 00:57:35,599 if i expel these 1453 00:57:35,599 --> 00:57:37,119 these are 1454 00:57:37,119 --> 00:57:39,040 also cold 1455 00:57:39,040 --> 00:57:40,799 now if we save 1456 00:57:40,799 --> 00:57:42,319 let's scroll just a little bit more so 1457 00:57:42,319 --> 00:57:44,400 we can see all of our content here you 1458 00:57:44,400 --> 00:57:46,799 can see our description list has a 1459 00:57:46,799 --> 00:57:48,880 different format than the ordered list 1460 00:57:48,880 --> 00:57:51,520 and the unordered list our description 1461 00:57:51,520 --> 00:57:54,240 term is to the left and then the 1462 00:57:54,240 --> 00:57:56,880 description details are indented to the 1463 00:57:56,880 --> 00:57:59,280 right but here is our full list of the 1464 00:57:59,280 --> 00:58:02,400 north pole south pole and mountain tops 1465 00:58:02,400 --> 00:58:04,559 we want to avoid all of these places 1466 00:58:04,559 --> 00:58:06,640 when we go on our vacation with these 1467 00:58:06,640 --> 00:58:09,680 new lists now added to our file let's go 1468 00:58:09,680 --> 00:58:13,040 ahead and create an error on purpose 1469 00:58:13,040 --> 00:58:14,559 just to see 1470 00:58:14,559 --> 00:58:17,119 if we have an error in our page when we 1471 00:58:17,119 --> 00:58:21,119 check it at our validator.w3.org 1472 00:58:21,119 --> 00:58:22,799 and here i'm going to choose 1473 00:58:22,799 --> 00:58:25,520 file upload 1474 00:58:25,520 --> 00:58:27,760 and i may have to switch folders let's 1475 00:58:27,760 --> 00:58:30,319 see no i'm in the right one so i'll just 1476 00:58:30,319 --> 00:58:33,359 choose index dot three i think we're on 1477 00:58:33,359 --> 00:58:35,520 lesson four and i forgot to change the 1478 00:58:35,520 --> 00:58:37,839 file but i'll do that to make sure that 1479 00:58:37,839 --> 00:58:40,480 the github repo with all the source code 1480 00:58:40,480 --> 00:58:42,559 is correct so let's go ahead and check 1481 00:58:42,559 --> 00:58:44,160 this file 1482 00:58:44,160 --> 00:58:46,880 and yes we have some errors because we 1483 00:58:46,880 --> 00:58:49,440 created one specifically let's see if 1484 00:58:49,440 --> 00:58:51,520 that's our only error 1485 00:58:51,520 --> 00:58:53,760 as we have noted in the past 1486 00:58:53,760 --> 00:58:57,280 one error can create a cascade or a lot 1487 00:58:57,280 --> 00:58:59,599 of errors so now i've formatted this 1488 00:58:59,599 --> 00:59:01,040 correctly 1489 00:59:01,040 --> 00:59:03,040 let's go ahead and 1490 00:59:03,040 --> 00:59:05,680 load our file back up so we'll choose 1491 00:59:05,680 --> 00:59:08,000 file 1492 00:59:10,079 --> 00:59:12,720 we'll choose that index dot html file 1493 00:59:12,720 --> 00:59:14,160 again 1494 00:59:14,160 --> 00:59:16,000 and click check 1495 00:59:16,000 --> 00:59:17,680 now everything 1496 00:59:17,680 --> 00:59:20,079 is okay document checking complete no 1497 00:59:20,079 --> 00:59:22,480 errors or warnings to show so realize if 1498 00:59:22,480 --> 00:59:24,880 you have an error it could just be 1499 00:59:24,880 --> 00:59:27,200 one small syntax error that creates a 1500 00:59:27,200 --> 00:59:29,760 cascade of errors when we're checking 1501 00:59:29,760 --> 00:59:31,920 but this is a great way to learn and of 1502 00:59:31,920 --> 00:59:34,559 course look at the details of the code 1503 00:59:34,559 --> 00:59:36,799 and it's always a good idea to validate 1504 00:59:36,799 --> 00:59:38,480 your code after you write it to make 1505 00:59:38,480 --> 00:59:42,240 sure you don't have any syntax errors 1506 00:59:42,240 --> 00:59:44,240 let's move on to creating links on our 1507 00:59:44,240 --> 00:59:48,559 web page hypertext is the ht in html and 1508 00:59:48,559 --> 00:59:50,640 it's what links together everything on 1509 00:59:50,640 --> 00:59:52,799 the web it's really make what makes the 1510 00:59:52,799 --> 00:59:55,520 web work so well think about spider-man 1511 00:59:55,520 --> 00:59:57,359 or really any type of spider that's 1512 00:59:57,359 --> 00:59:59,520 throwing out strands of web and linking 1513 00:59:59,520 --> 01:00:01,760 things together that's essentially what 1514 01:00:01,760 --> 01:00:04,240 we're doing when we create hypertext 1515 01:00:04,240 --> 01:00:06,880 links we're linking the web together now 1516 01:00:06,880 --> 01:00:08,720 as we say link there can be some 1517 01:00:08,720 --> 01:00:10,640 confusion because notice here in visual 1518 01:00:10,640 --> 01:00:13,040 studio code on the left that i've got 1519 01:00:13,040 --> 01:00:15,119 link tags that we created 1520 01:00:15,119 --> 01:00:17,680 in the head part of the page that's from 1521 01:00:17,680 --> 01:00:19,839 lines 4 to 11 1522 01:00:19,839 --> 01:00:21,920 and these link tags are pulling in 1523 01:00:21,920 --> 01:00:24,400 resources from other parts of the web 1524 01:00:24,400 --> 01:00:26,400 whether it's something we have on our 1525 01:00:26,400 --> 01:00:29,040 server with our web page like this fav 1526 01:00:29,040 --> 01:00:30,240 icon 1527 01:00:30,240 --> 01:00:31,040 or 1528 01:00:31,040 --> 01:00:33,599 we could pull in something from another 1529 01:00:33,599 --> 01:00:35,680 part of the web like a font from google 1530 01:00:35,680 --> 01:00:37,520 fonts and things like that which we 1531 01:00:37,520 --> 01:00:39,760 haven't done yet but it's possible with 1532 01:00:39,760 --> 01:00:42,079 the link tag but that's not what we use 1533 01:00:42,079 --> 01:00:45,040 to link pages to each other i'm going to 1534 01:00:45,040 --> 01:00:46,880 collapse this head section by clicking 1535 01:00:46,880 --> 01:00:49,680 on the arrow over here by number 4 so we 1536 01:00:49,680 --> 01:00:51,119 have a little more room and now we're 1537 01:00:51,119 --> 01:00:53,119 looking at the body area in visual 1538 01:00:53,119 --> 01:00:55,440 studio code by the way i'm running the 1539 01:00:55,440 --> 01:00:58,240 live server extension and have our page 1540 01:00:58,240 --> 01:00:59,839 from our starter code that's available 1541 01:00:59,839 --> 01:01:02,400 for download at the github link in the 1542 01:01:02,400 --> 01:01:03,520 description 1543 01:01:03,520 --> 01:01:05,200 and i'm running that with the live 1544 01:01:05,200 --> 01:01:06,799 server you can see it running here it 1545 01:01:06,799 --> 01:01:08,880 says click to close the server shows 1546 01:01:08,880 --> 01:01:11,119 port 5500 1547 01:01:11,119 --> 01:01:13,119 okay in visual studio code 1548 01:01:13,119 --> 01:01:15,280 let's scroll down a little bit and let's 1549 01:01:15,280 --> 01:01:17,920 add what is called an anchor tag that 1550 01:01:17,920 --> 01:01:20,799 will create a link to another page on 1551 01:01:20,799 --> 01:01:24,160 the web so in our list where it says let 1552 01:01:24,160 --> 01:01:26,720 me tell you how and we're talking about 1553 01:01:26,720 --> 01:01:28,720 the different things we do to learn web 1554 01:01:28,720 --> 01:01:31,119 development we have an abbreviation for 1555 01:01:31,119 --> 01:01:33,520 the mozilla developer network maybe this 1556 01:01:33,520 --> 01:01:36,079 would be a good place to go ahead and 1557 01:01:36,079 --> 01:01:38,000 link to the mozilla developer network 1558 01:01:38,000 --> 01:01:40,000 and we can insert a link 1559 01:01:40,000 --> 01:01:43,359 around this mdn abbreviation inside 1560 01:01:43,359 --> 01:01:45,200 the inline element that is the 1561 01:01:45,200 --> 01:01:47,359 abbreviation element so i'm going to 1562 01:01:47,359 --> 01:01:50,640 press enter here to start a new line 1563 01:01:50,640 --> 01:01:52,799 now i'll just type a 1564 01:01:52,799 --> 01:01:55,520 and this is well i guess because it's 1565 01:01:55,520 --> 01:01:57,039 followed by mdn it's not doing it so 1566 01:01:57,039 --> 01:01:58,640 i'll start out with the less than sign 1567 01:01:58,640 --> 01:01:59,839 and then a 1568 01:01:59,839 --> 01:02:01,920 and this is the anchor tag that i'm 1569 01:02:01,920 --> 01:02:05,119 starting but by itself if we just put 1570 01:02:05,119 --> 01:02:06,559 the anchor tag 1571 01:02:06,559 --> 01:02:08,240 while you can do that 1572 01:02:08,240 --> 01:02:09,680 by itself 1573 01:02:09,680 --> 01:02:12,480 it will not link to anything it needs a 1574 01:02:12,480 --> 01:02:15,200 specific attribute that tells it where 1575 01:02:15,200 --> 01:02:17,200 to go so i'm going to press enter here 1576 01:02:17,200 --> 01:02:19,839 and we have it surrounded by this anchor 1577 01:02:19,839 --> 01:02:24,400 tag we need to add the href attribute 1578 01:02:24,400 --> 01:02:25,920 and now we're going to reference an 1579 01:02:25,920 --> 01:02:27,920 address on the web so this is where we 1580 01:02:27,920 --> 01:02:29,680 would put that address in 1581 01:02:29,680 --> 01:02:32,240 over here in the chrome browser i have 1582 01:02:32,240 --> 01:02:34,400 the mozilla developer network open we 1583 01:02:34,400 --> 01:02:36,160 can see up here at the top it's 1584 01:02:36,160 --> 01:02:39,160 developer.mozilla.org 1585 01:02:39,359 --> 01:02:41,039 and then there's a slash after that that 1586 01:02:41,039 --> 01:02:43,200 gives the specific language for the site 1587 01:02:43,200 --> 01:02:45,200 i believe it will default to the browser 1588 01:02:45,200 --> 01:02:47,280 choice so i'm going to remove that part 1589 01:02:47,280 --> 01:02:49,440 go ahead and select the rest 1590 01:02:49,440 --> 01:02:51,599 and now that i have copied that with 1591 01:02:51,599 --> 01:02:55,119 control c i'm going to click here inside 1592 01:02:55,119 --> 01:02:56,880 of visual studio code 1593 01:02:56,880 --> 01:02:59,359 and put that address right inside the 1594 01:02:59,359 --> 01:03:02,079 href attribute now i am wrapping the 1595 01:03:02,079 --> 01:03:04,480 code down to another line so you can see 1596 01:03:04,480 --> 01:03:06,640 it all it doesn't go off the screen i 1597 01:03:06,640 --> 01:03:09,119 could expand visual studio code here and 1598 01:03:09,119 --> 01:03:11,359 now you can see the full 1599 01:03:11,359 --> 01:03:14,240 address without that line wrapping 1600 01:03:14,240 --> 01:03:16,680 so we're linking to the 1601 01:03:16,680 --> 01:03:19,039 developer.mozilla.org website with this 1602 01:03:19,039 --> 01:03:20,000 link 1603 01:03:20,000 --> 01:03:22,079 and we can save this 1604 01:03:22,079 --> 01:03:24,160 and now i'm going to go ahead and bring 1605 01:03:24,160 --> 01:03:26,240 visual studio code back to the size i 1606 01:03:26,240 --> 01:03:28,640 had it the code lines will wrap 1607 01:03:28,640 --> 01:03:30,400 but if we look at our code 1608 01:03:30,400 --> 01:03:32,720 or our page in chrome that should have 1609 01:03:32,720 --> 01:03:34,720 now updated because we're using live 1610 01:03:34,720 --> 01:03:37,039 server you can see we have a link and it 1611 01:03:37,039 --> 01:03:39,119 turned purple it's a little hard for me 1612 01:03:39,119 --> 01:03:40,880 to see right now but we can change that 1613 01:03:40,880 --> 01:03:42,559 color in just a little bit but that 1614 01:03:42,559 --> 01:03:44,640 purple means a visited link if you have 1615 01:03:44,640 --> 01:03:46,880 not visited that site it's probably more 1616 01:03:46,880 --> 01:03:50,079 like a royal blue or a bright blue color 1617 01:03:50,079 --> 01:03:52,160 and that means it's not visited yet and 1618 01:03:52,160 --> 01:03:54,880 those are the default colors for links 1619 01:03:54,880 --> 01:03:56,480 but something about this link that we 1620 01:03:56,480 --> 01:03:58,880 need to acknowledge this is the full 1621 01:03:58,880 --> 01:04:01,359 address to that website and it's a 1622 01:04:01,359 --> 01:04:03,200 specific address 1623 01:04:03,200 --> 01:04:05,839 this is what you would call an absolute 1624 01:04:05,839 --> 01:04:08,720 reference this has the full address for 1625 01:04:08,720 --> 01:04:10,480 the web page where we're going but when 1626 01:04:10,480 --> 01:04:12,319 we link to something that's already on 1627 01:04:12,319 --> 01:04:14,319 the same server as our page where we're 1628 01:04:14,319 --> 01:04:16,160 hosting our website 1629 01:04:16,160 --> 01:04:18,400 then let's go ahead and expand this head 1630 01:04:18,400 --> 01:04:21,440 section again notice we're not giving 1631 01:04:21,440 --> 01:04:23,520 an absolute reference we're giving 1632 01:04:23,520 --> 01:04:25,680 what's called a relative reference 1633 01:04:25,680 --> 01:04:27,280 right now we don't even have a slash 1634 01:04:27,280 --> 01:04:28,799 here because we know 1635 01:04:28,799 --> 01:04:32,799 this html5 dot png file is in the same 1636 01:04:32,799 --> 01:04:36,160 folder as our index.html file and the 1637 01:04:36,160 --> 01:04:39,119 same with this main dot css file it's in 1638 01:04:39,119 --> 01:04:40,640 the same folder we don't even need to 1639 01:04:40,640 --> 01:04:43,039 provide a slash it's not in another 1640 01:04:43,039 --> 01:04:45,280 folder even so but it is a relative 1641 01:04:45,280 --> 01:04:47,760 reference and that's the difference so 1642 01:04:47,760 --> 01:04:50,720 we have an absolute reference here to a 1643 01:04:50,720 --> 01:04:53,119 place on the web and then we can provide 1644 01:04:53,119 --> 01:04:55,440 a relative reference to something that's 1645 01:04:55,440 --> 01:04:58,079 on the same server that we're on so now 1646 01:04:58,079 --> 01:05:00,720 let's go ahead and create a relative 1647 01:05:00,720 --> 01:05:03,039 reference to another page 1648 01:05:03,039 --> 01:05:04,799 and i'll scroll down to do this we 1649 01:05:04,799 --> 01:05:06,799 haven't created the page yet we'll do 1650 01:05:06,799 --> 01:05:10,240 that next but if you have your name here 1651 01:05:10,240 --> 01:05:12,079 here at the bottom i have my name where 1652 01:05:12,079 --> 01:05:13,680 we have the copyright symbol and in 1653 01:05:13,680 --> 01:05:15,440 chrome i can scroll down and we can see 1654 01:05:15,440 --> 01:05:18,480 this at the very bottom let's go ahead 1655 01:05:18,480 --> 01:05:19,760 and link 1656 01:05:19,760 --> 01:05:21,520 with a relative reference so i create 1657 01:05:21,520 --> 01:05:25,760 that anchor tag that a tag and then href 1658 01:05:25,760 --> 01:05:29,119 and equals and let's link to about 1659 01:05:29,119 --> 01:05:30,720 dot html 1660 01:05:30,720 --> 01:05:32,160 and notice i'm 1661 01:05:32,160 --> 01:05:34,799 putting quotes around that file name 1662 01:05:34,799 --> 01:05:37,520 just like i did for the full address in 1663 01:05:37,520 --> 01:05:40,000 the absolute reference above and now i 1664 01:05:40,000 --> 01:05:42,880 want to put my name of course between 1665 01:05:42,880 --> 01:05:46,000 the opening and closing anchor tag 1666 01:05:46,000 --> 01:05:48,640 and now that will link this to the about 1667 01:05:48,640 --> 01:05:50,400 page that we haven't created yet i'll 1668 01:05:50,400 --> 01:05:53,280 save and notice now this is that bright 1669 01:05:53,280 --> 01:05:55,760 blue or dark blue that i was mentioning 1670 01:05:55,760 --> 01:05:57,839 earlier a link that has not been visited 1671 01:05:57,839 --> 01:05:59,839 this page doesn't even exist yet so we 1672 01:05:59,839 --> 01:06:02,079 need to create this page if you don't 1673 01:06:02,079 --> 01:06:04,079 have the file explorer open in the top 1674 01:06:04,079 --> 01:06:06,480 left of visual studio code you can click 1675 01:06:06,480 --> 01:06:07,359 that 1676 01:06:07,359 --> 01:06:09,119 and you'll see the files that we have 1677 01:06:09,119 --> 01:06:11,599 here in the file tree what i want you to 1678 01:06:11,599 --> 01:06:15,440 do is click on the new file icon 1679 01:06:15,440 --> 01:06:18,559 name this page about.html 1680 01:06:18,559 --> 01:06:20,880 now this is a good place to go ahead and 1681 01:06:20,880 --> 01:06:22,960 pause the video you can click on the 1682 01:06:22,960 --> 01:06:25,119 file explorer tree over here the file 1683 01:06:25,119 --> 01:06:27,280 explorer to hide the tree if you need 1684 01:06:27,280 --> 01:06:28,400 more room 1685 01:06:28,400 --> 01:06:32,079 but go ahead and create an about page 1686 01:06:32,079 --> 01:06:33,920 you know everything we've already 1687 01:06:33,920 --> 01:06:34,880 learned 1688 01:06:34,880 --> 01:06:37,440 from the index.html page so what i want 1689 01:06:37,440 --> 01:06:39,680 you to do is pause the video 1690 01:06:39,680 --> 01:06:42,880 create your own about.html 1691 01:06:42,880 --> 01:06:45,359 and then come back and i will create one 1692 01:06:45,359 --> 01:06:47,520 with you okay i hope that went well for 1693 01:06:47,520 --> 01:06:49,640 you i'm going to help you create an 1694 01:06:49,640 --> 01:06:52,079 about.html page now or you can watch how 1695 01:06:52,079 --> 01:06:54,559 i do it and compare to what you did now 1696 01:06:54,559 --> 01:06:56,160 i've been doing this for a long time and 1697 01:06:56,160 --> 01:06:57,920 i'm going to take a few shortcuts so you 1698 01:06:57,920 --> 01:06:59,599 don't have to see me type everything out 1699 01:06:59,599 --> 01:07:02,000 i'm at the index.html page i'm going to 1700 01:07:02,000 --> 01:07:03,599 press ctrl a 1701 01:07:03,599 --> 01:07:07,839 to select everything then ctrl c to copy 1702 01:07:07,839 --> 01:07:09,119 everything 1703 01:07:09,119 --> 01:07:11,760 click the about.html page again 1704 01:07:11,760 --> 01:07:13,200 and i'm going to paste everything in 1705 01:07:13,200 --> 01:07:14,640 with control v 1706 01:07:14,640 --> 01:07:16,880 now as you're learning how to do this i 1707 01:07:16,880 --> 01:07:18,319 think it's important that you type 1708 01:07:18,319 --> 01:07:19,760 everything but i don't want to take up 1709 01:07:19,760 --> 01:07:21,119 your time 1710 01:07:21,119 --> 01:07:23,039 by having you watch me type everything 1711 01:07:23,039 --> 01:07:24,240 out so i'm just going to make some 1712 01:07:24,240 --> 01:07:25,680 changes here 1713 01:07:25,680 --> 01:07:28,079 the doctype is the same the html 1714 01:07:28,079 --> 01:07:29,680 elements the same and of course we have 1715 01:07:29,680 --> 01:07:32,240 a head section the meta tag for the 1716 01:07:32,240 --> 01:07:34,000 character sets the same the author is 1717 01:07:34,000 --> 01:07:34,960 the same 1718 01:07:34,960 --> 01:07:38,480 now this description meta tag 1719 01:07:38,480 --> 01:07:40,799 right here on line seven that could be 1720 01:07:40,799 --> 01:07:42,079 just a little different i'm also going 1721 01:07:42,079 --> 01:07:44,559 to press alt z to get this page to wrap 1722 01:07:44,559 --> 01:07:46,400 lines that are longer so now you can see 1723 01:07:46,400 --> 01:07:49,280 line 7 wraps down to a second line here 1724 01:07:49,280 --> 01:07:51,599 and we see the space to the left now in 1725 01:07:51,599 --> 01:07:53,760 this description i can change this just 1726 01:07:53,760 --> 01:07:57,200 a little bit and i'm going to say hi 1727 01:07:57,200 --> 01:07:59,520 i'm dave gray 1728 01:07:59,520 --> 01:08:02,960 this page is about me 1729 01:08:02,960 --> 01:08:04,720 so we've given an accurate description 1730 01:08:04,720 --> 01:08:07,359 for the page now and instead of my first 1731 01:08:07,359 --> 01:08:09,440 web page in the title i'm just going to 1732 01:08:09,440 --> 01:08:12,079 call it about me in the title 1733 01:08:12,079 --> 01:08:14,880 and now we still can use this same fave 1734 01:08:14,880 --> 01:08:17,359 icon and we're going to use the same 1735 01:08:17,359 --> 01:08:20,080 style sheet so this page will look like 1736 01:08:20,080 --> 01:08:22,880 the other page as far as the styles 1737 01:08:22,880 --> 01:08:25,440 and now we can change the heading for 1738 01:08:25,440 --> 01:08:28,319 the page and here i'm just going to say 1739 01:08:28,319 --> 01:08:30,319 hi 1740 01:08:30,319 --> 01:08:32,400 i'm dave gray 1741 01:08:32,400 --> 01:08:35,199 after that i'm going to eliminate most 1742 01:08:35,199 --> 01:08:37,520 of what we see here on the page so i'm 1743 01:08:37,520 --> 01:08:39,759 going to highlight everything from line 1744 01:08:39,759 --> 01:08:41,279 17 1745 01:08:41,279 --> 01:08:44,080 all the way down to 63 1746 01:08:44,080 --> 01:08:46,480 i pressed shift and i clicked on my 1747 01:08:46,480 --> 01:08:48,480 mouse there and i've selected all of 1748 01:08:48,480 --> 01:08:50,400 that specifically 1749 01:08:50,400 --> 01:08:52,400 and now you can see we're left with the 1750 01:08:52,400 --> 01:08:54,159 horizontal rules and the space in 1751 01:08:54,159 --> 01:08:56,480 between and so now i'm just going to put 1752 01:08:56,480 --> 01:08:58,719 a paragraph that's not really about me 1753 01:08:58,719 --> 01:09:01,440 i'm just going to create some lorem text 1754 01:09:01,440 --> 01:09:03,600 and i can do that with a p element let's 1755 01:09:03,600 --> 01:09:05,199 try lorem 1756 01:09:05,199 --> 01:09:06,640 times 1757 01:09:06,640 --> 01:09:09,600 1. i just want one paragraph click that 1758 01:09:09,600 --> 01:09:13,839 there we go one paragraph of information 1759 01:09:14,159 --> 01:09:16,080 so it's still kind of formatted that 1760 01:09:16,080 --> 01:09:18,000 strange i'm going to go ahead and enter 1761 01:09:18,000 --> 01:09:20,719 before and after there we go 1762 01:09:20,719 --> 01:09:22,640 and now we've got that single paragraph 1763 01:09:22,640 --> 01:09:24,000 here anyway 1764 01:09:24,000 --> 01:09:27,279 this is a basic about dot html and we 1765 01:09:27,279 --> 01:09:29,679 have linked to it so now let's 1766 01:09:29,679 --> 01:09:32,719 downsize visual studio code back here 1767 01:09:32,719 --> 01:09:33,520 with 1768 01:09:33,520 --> 01:09:36,159 the button you see right here the square 1769 01:09:36,159 --> 01:09:38,239 not minimized but downsized it's not 1770 01:09:38,239 --> 01:09:40,080 maximized either 1771 01:09:40,080 --> 01:09:43,440 and now our link to the about.html 1772 01:09:43,440 --> 01:09:45,600 should work so i'm going to click that 1773 01:09:45,600 --> 01:09:46,799 link 1774 01:09:46,799 --> 01:09:48,719 and here we're on the about page and now 1775 01:09:48,719 --> 01:09:51,839 notice my name is this dark purple again 1776 01:09:51,839 --> 01:09:54,080 so we have gone to the about page that 1777 01:09:54,080 --> 01:09:56,320 we just created says about me here in 1778 01:09:56,320 --> 01:09:58,480 the top tab i'm going to click the back 1779 01:09:58,480 --> 01:10:01,199 button to go back to the original home 1780 01:10:01,199 --> 01:10:03,280 page here now back on the home page 1781 01:10:03,280 --> 01:10:05,679 there is a third type of link that we 1782 01:10:05,679 --> 01:10:09,040 can create and this is a link to an area 1783 01:10:09,040 --> 01:10:11,120 on the same page on the page we're 1784 01:10:11,120 --> 01:10:13,280 already on we can create shortcuts to 1785 01:10:13,280 --> 01:10:15,840 different areas of the page so 1786 01:10:15,840 --> 01:10:18,000 we've had our absolute references we've 1787 01:10:18,000 --> 01:10:20,320 had our relative references and now this 1788 01:10:20,320 --> 01:10:22,159 is what i would call an internal 1789 01:10:22,159 --> 01:10:24,719 reference or it's an anchor link 1790 01:10:24,719 --> 01:10:27,440 directly to a portion of the page that 1791 01:10:27,440 --> 01:10:30,080 we want to go to in order to do this 1792 01:10:30,080 --> 01:10:31,760 we're going to add just a little bit 1793 01:10:31,760 --> 01:10:34,400 more to our page so i want to click on 1794 01:10:34,400 --> 01:10:36,960 the index.html there we are i'm going to 1795 01:10:36,960 --> 01:10:39,120 go ahead and collapse the head again 1796 01:10:39,120 --> 01:10:41,199 and we've got a couple of topic areas 1797 01:10:41,199 --> 01:10:43,440 besides our big hello world at the top 1798 01:10:43,440 --> 01:10:45,040 so we've got the part where we're ready 1799 01:10:45,040 --> 01:10:47,840 to learn html and we've got the part 1800 01:10:47,840 --> 01:10:49,600 that we're discussing planning a 1801 01:10:49,600 --> 01:10:50,960 vacation 1802 01:10:50,960 --> 01:10:53,120 so we're going to organize this into 1803 01:10:53,120 --> 01:10:55,679 sections and there's a semantic html 1804 01:10:55,679 --> 01:10:57,520 element called section so i'm going to 1805 01:10:57,520 --> 01:11:00,239 type the word section press tab 1806 01:11:00,239 --> 01:11:01,600 and then i'm going to highlight the 1807 01:11:01,600 --> 01:11:04,960 closing tag of the section ctrl x to go 1808 01:11:04,960 --> 01:11:06,640 ahead and cut that out 1809 01:11:06,640 --> 01:11:08,320 i'll come down here before the 1810 01:11:08,320 --> 01:11:11,120 horizontal rule used as a divider i'll 1811 01:11:11,120 --> 01:11:13,679 paste that closing section tag in 1812 01:11:13,679 --> 01:11:15,920 and if i save yes we got some auto 1813 01:11:15,920 --> 01:11:18,480 formatting there so now we have our 1814 01:11:18,480 --> 01:11:20,239 section separated and we've got 1815 01:11:20,239 --> 01:11:22,159 horizontal rules in between i'll go 1816 01:11:22,159 --> 01:11:23,760 ahead and add a space between each of 1817 01:11:23,760 --> 01:11:26,320 those i'm going to do the same thing for 1818 01:11:26,320 --> 01:11:29,520 the vacation planning area so type 1819 01:11:29,520 --> 01:11:31,600 section press tab 1820 01:11:31,600 --> 01:11:33,840 go ahead and highlight the closing tag 1821 01:11:33,840 --> 01:11:36,320 control x scroll down 1822 01:11:36,320 --> 01:11:38,000 to the bottom where we're finished 1823 01:11:38,000 --> 01:11:41,120 discussing the vacations and go ahead 1824 01:11:41,120 --> 01:11:43,280 and paste in that section now i'll save 1825 01:11:43,280 --> 01:11:45,440 once again took advantage of the auto 1826 01:11:45,440 --> 01:11:48,719 formatting and we'll leave a space 1827 01:11:48,719 --> 01:11:51,199 of course before the section here 1828 01:11:51,199 --> 01:11:52,800 between the horizontal rule and the 1829 01:11:52,800 --> 01:11:54,719 section and the same 1830 01:11:54,719 --> 01:11:56,320 at the end just so we can see a little 1831 01:11:56,320 --> 01:11:58,719 better after the closing section tag we 1832 01:11:58,719 --> 01:12:01,440 have a space so now we've created 1833 01:12:01,440 --> 01:12:05,040 semantic html sections and that's not 1834 01:12:05,040 --> 01:12:07,520 all we need we also need to give these 1835 01:12:07,520 --> 01:12:10,640 sections an id attribute so i'm just 1836 01:12:10,640 --> 01:12:14,560 going to give the first id value for the 1837 01:12:14,560 --> 01:12:17,600 i'm ready to learn html area and id of 1838 01:12:17,600 --> 01:12:19,040 html 1839 01:12:19,040 --> 01:12:21,120 and then in the next section i'm going 1840 01:12:21,120 --> 01:12:23,679 to give an id attribute and that value 1841 01:12:23,679 --> 01:12:24,880 is going to be 1842 01:12:24,880 --> 01:12:27,199 vacation 1843 01:12:27,199 --> 01:12:29,679 and once again ctrl s to save or you can 1844 01:12:29,679 --> 01:12:32,480 go to the file menu and choose save that 1845 01:12:32,480 --> 01:12:33,679 way as well 1846 01:12:33,679 --> 01:12:34,880 now that we've done that we still 1847 01:12:34,880 --> 01:12:36,880 haven't created the links but we have 1848 01:12:36,880 --> 01:12:38,000 created 1849 01:12:38,000 --> 01:12:41,040 the destination for each of the links 1850 01:12:41,040 --> 01:12:43,199 that we want to create so now let's 1851 01:12:43,199 --> 01:12:46,159 create one more semantic html element 1852 01:12:46,159 --> 01:12:48,640 and to do that after our hello world 1853 01:12:48,640 --> 01:12:49,520 heading 1854 01:12:49,520 --> 01:12:51,520 i'll go ahead and press enter to come 1855 01:12:51,520 --> 01:12:54,480 down a couple of lines type hr for one 1856 01:12:54,480 --> 01:12:56,480 more horizontal rule 1857 01:12:56,480 --> 01:12:58,560 and now between the horizontal rules i'm 1858 01:12:58,560 --> 01:13:01,920 going to type nav and this is a semantic 1859 01:13:01,920 --> 01:13:04,320 html element it says we're creating a 1860 01:13:04,320 --> 01:13:06,239 navigation area 1861 01:13:06,239 --> 01:13:09,120 inside the nav i'm going to type ul we 1862 01:13:09,120 --> 01:13:10,880 learned how to create unordered lists 1863 01:13:10,880 --> 01:13:12,000 already 1864 01:13:12,000 --> 01:13:14,800 and so now we've added an unordered list 1865 01:13:14,800 --> 01:13:17,040 and now we can add list items 1866 01:13:17,040 --> 01:13:18,880 and the first list item that we're going 1867 01:13:18,880 --> 01:13:22,159 to create is a link 1868 01:13:22,159 --> 01:13:24,320 and there it absolutely after i pressed 1869 01:13:24,320 --> 01:13:27,040 a and tab it knew we needed the href in 1870 01:13:27,040 --> 01:13:29,040 visual studio code so now it's waiting 1871 01:13:29,040 --> 01:13:31,920 for me to fill in this href now to link 1872 01:13:31,920 --> 01:13:35,040 to our html section here on the page 1873 01:13:35,040 --> 01:13:37,360 we need to add the hashtag 1874 01:13:37,360 --> 01:13:41,679 and then the id value so there's html 1875 01:13:41,679 --> 01:13:44,239 and so now we can put 1876 01:13:44,239 --> 01:13:47,280 learn html for this link 1877 01:13:47,280 --> 01:13:49,840 and then let's go ahead and add one more 1878 01:13:49,840 --> 01:13:51,360 a lowercase 1879 01:13:51,360 --> 01:13:52,560 press tab 1880 01:13:52,560 --> 01:13:54,960 and now hashtag 1881 01:13:54,960 --> 01:13:56,239 vacation 1882 01:13:56,239 --> 01:13:59,280 and we'll put here 1883 01:13:59,600 --> 01:14:02,159 planning a 1884 01:14:02,159 --> 01:14:03,840 vacation as a matter of fact let's 1885 01:14:03,840 --> 01:14:05,920 change this from learn html to learning 1886 01:14:05,920 --> 01:14:07,360 html 1887 01:14:07,360 --> 01:14:09,120 and now at the top instead of hello 1888 01:14:09,120 --> 01:14:10,400 world 1889 01:14:10,400 --> 01:14:12,239 i'm going to put my 1890 01:14:12,239 --> 01:14:15,800 goals for 1891 01:14:15,920 --> 01:14:18,320 the year 1892 01:14:19,199 --> 01:14:22,239 and now we have my goals for the year at 1893 01:14:22,239 --> 01:14:23,440 the top 1894 01:14:23,440 --> 01:14:25,520 and we've got learning html and planning 1895 01:14:25,520 --> 01:14:27,600 a vacation but i put them both in the 1896 01:14:27,600 --> 01:14:29,760 same list item and that's not what we 1897 01:14:29,760 --> 01:14:32,080 want so i'm going to go ahead and 1898 01:14:32,080 --> 01:14:34,480 highlight planning a vacation press 1899 01:14:34,480 --> 01:14:37,600 control x to cut that out 1900 01:14:37,600 --> 01:14:39,520 and now let's put it in its own list 1901 01:14:39,520 --> 01:14:42,640 item so li press tab we've got a new 1902 01:14:42,640 --> 01:14:44,400 list item 1903 01:14:44,400 --> 01:14:46,480 and we can paste that planning a 1904 01:14:46,480 --> 01:14:48,719 vacation if we save that looks much 1905 01:14:48,719 --> 01:14:50,880 better on our page even though the blue 1906 01:14:50,880 --> 01:14:52,400 isn't looking great on the darker 1907 01:14:52,400 --> 01:14:54,080 background we'll still change that in 1908 01:14:54,080 --> 01:14:55,120 the future 1909 01:14:55,120 --> 01:14:57,760 so now if we click learning html on the 1910 01:14:57,760 --> 01:14:59,679 page 1911 01:14:59,679 --> 01:15:01,920 it goes ahead and scrolls the page 1912 01:15:01,920 --> 01:15:04,080 directly up to the i'm ready to learn 1913 01:15:04,080 --> 01:15:07,440 html section we can click back and we go 1914 01:15:07,440 --> 01:15:08,960 back to where we were 1915 01:15:08,960 --> 01:15:11,840 and now if we click planning a vacation 1916 01:15:11,840 --> 01:15:13,679 it doesn't take us all the way to the 1917 01:15:13,679 --> 01:15:15,520 planning and vacation area because 1918 01:15:15,520 --> 01:15:17,440 there's no more content there's no more 1919 01:15:17,440 --> 01:15:19,920 space it can't scroll any higher but it 1920 01:15:19,920 --> 01:15:22,159 scrolled as far as it possibly could to 1921 01:15:22,159 --> 01:15:24,719 take us to that area and once again we 1922 01:15:24,719 --> 01:15:27,120 can press the back button to go back and 1923 01:15:27,120 --> 01:15:28,880 that dark purple's not looking too well 1924 01:15:28,880 --> 01:15:30,239 so we're going to need to change those 1925 01:15:30,239 --> 01:15:32,400 colors very soon before we change any 1926 01:15:32,400 --> 01:15:33,840 colors though let's scroll down and 1927 01:15:33,840 --> 01:15:35,600 create one more 1928 01:15:35,600 --> 01:15:37,920 link that's an internal link on our same 1929 01:15:37,920 --> 01:15:39,760 page here just to another area of the 1930 01:15:39,760 --> 01:15:42,400 page so at the very bottom 1931 01:15:42,400 --> 01:15:45,280 underneath our name and the link 1932 01:15:45,280 --> 01:15:48,159 to the about page let's go ahead and 1933 01:15:48,159 --> 01:15:50,400 return and add one more line here and 1934 01:15:50,400 --> 01:15:52,480 this will be a paragraph so we can press 1935 01:15:52,480 --> 01:15:54,159 p and tab 1936 01:15:54,159 --> 01:15:56,719 inside the paragraph let's start 1937 01:15:56,719 --> 01:15:58,159 an anchor 1938 01:15:58,159 --> 01:16:01,040 tag and there has the href attribute and 1939 01:16:01,040 --> 01:16:04,320 let's just link to the hashtag itself 1940 01:16:04,320 --> 01:16:06,640 now what we want to put in here for text 1941 01:16:06,640 --> 01:16:08,159 is back 1942 01:16:08,159 --> 01:16:09,600 to top 1943 01:16:09,600 --> 01:16:11,440 and we can save 1944 01:16:11,440 --> 01:16:13,679 now if we scroll down in our page here 1945 01:16:13,679 --> 01:16:16,000 we'll see the back to top link and if i 1946 01:16:16,000 --> 01:16:17,600 click it 1947 01:16:17,600 --> 01:16:19,600 it loads the page and takes us back to 1948 01:16:19,600 --> 01:16:20,560 the top 1949 01:16:20,560 --> 01:16:22,960 it's worth noting what we have up here 1950 01:16:22,960 --> 01:16:25,920 in the address bar of course live server 1951 01:16:25,920 --> 01:16:28,800 gives us our ip address which is our own 1952 01:16:28,800 --> 01:16:32,239 computer 127.0.0.1 1953 01:16:32,239 --> 01:16:34,239 nobody else on the web can see what 1954 01:16:34,239 --> 01:16:35,600 you're seeing this is just on your 1955 01:16:35,600 --> 01:16:36,880 computer 1956 01:16:36,880 --> 01:16:38,719 and then you've got a colon and the port 1957 01:16:38,719 --> 01:16:42,159 number 5500 where live server is serving 1958 01:16:42,159 --> 01:16:45,040 your page and we've got our index.html 1959 01:16:45,040 --> 01:16:47,360 file then notice you've got the hashtag 1960 01:16:47,360 --> 01:16:50,520 after that we could actually remove the 1961 01:16:50,520 --> 01:16:53,360 index.html and the index page will still 1962 01:16:53,360 --> 01:16:55,760 show by default just like you see right 1963 01:16:55,760 --> 01:16:57,199 here and now 1964 01:16:57,199 --> 01:17:00,159 once again if we click learning html 1965 01:17:00,159 --> 01:17:01,120 notice 1966 01:17:01,120 --> 01:17:04,080 in the address we get the hashtag html 1967 01:17:04,080 --> 01:17:06,320 when we click back it disappears if we 1968 01:17:06,320 --> 01:17:08,000 click planning to vacation we get the 1969 01:17:08,000 --> 01:17:09,760 hashtag vacation 1970 01:17:09,760 --> 01:17:12,320 in the address bar and if we click back 1971 01:17:12,320 --> 01:17:14,800 it disappears in previous tutorials i 1972 01:17:14,800 --> 01:17:16,560 had mentioned switching the theme over 1973 01:17:16,560 --> 01:17:18,400 to this dark mode that's easier on my 1974 01:17:18,400 --> 01:17:21,040 eyes was entirely optional so 1975 01:17:21,040 --> 01:17:22,960 if you're still using a white background 1976 01:17:22,960 --> 01:17:24,719 with black lettering 1977 01:17:24,719 --> 01:17:27,280 probably the purple and blue links look 1978 01:17:27,280 --> 01:17:29,199 just fine to you and you could just 1979 01:17:29,199 --> 01:17:31,679 leave it that way if you have switched 1980 01:17:31,679 --> 01:17:33,440 to the dark mode 1981 01:17:33,440 --> 01:17:35,520 theme that i have provided with some 1982 01:17:35,520 --> 01:17:38,000 basic css already let's go ahead and 1983 01:17:38,000 --> 01:17:40,000 make those changes so the links look 1984 01:17:40,000 --> 01:17:42,120 better as well so we're here in the 1985 01:17:42,120 --> 01:17:45,040 main.css file now in the file file 1986 01:17:45,040 --> 01:17:46,159 explorer 1987 01:17:46,159 --> 01:17:47,840 so we're just going to change the color 1988 01:17:47,840 --> 01:17:50,640 of our anchor tag and i'll switch that 1989 01:17:50,640 --> 01:17:54,080 color to a color named alice blue 1990 01:17:54,080 --> 01:17:55,360 after that 1991 01:17:55,360 --> 01:17:57,360 i also want to change what the link 1992 01:17:57,360 --> 01:17:59,360 looks like when it's been visited right 1993 01:17:59,360 --> 01:18:01,840 now it's that purple color so i'm going 1994 01:18:01,840 --> 01:18:04,480 to change that color to a light 1995 01:18:04,480 --> 01:18:05,920 gray 1996 01:18:05,920 --> 01:18:07,440 and 1997 01:18:07,440 --> 01:18:10,000 there's also another thing that we can 1998 01:18:10,000 --> 01:18:12,000 change and that is when you hover over 1999 01:18:12,000 --> 01:18:13,040 the link 2000 01:18:13,040 --> 01:18:15,679 or when the link is active 2001 01:18:15,679 --> 01:18:17,440 and then i'm just going to change that 2002 01:18:17,440 --> 01:18:19,040 color 2003 01:18:19,040 --> 01:18:23,280 to hashtag ee not three e e e there we 2004 01:18:23,280 --> 01:18:24,080 go 2005 01:18:24,080 --> 01:18:26,960 and save that and so now it's changed 2006 01:18:26,960 --> 01:18:29,120 the color of our links you can see this 2007 01:18:29,120 --> 01:18:31,280 is the light gray we visited these links 2008 01:18:31,280 --> 01:18:33,440 but when i hover over it gets a little 2009 01:18:33,440 --> 01:18:34,800 lighter 2010 01:18:34,800 --> 01:18:36,640 and so that looks good i think we've 2011 01:18:36,640 --> 01:18:38,239 visited every link here no we haven't 2012 01:18:38,239 --> 01:18:39,920 visited back to the top yet so you can 2013 01:18:39,920 --> 01:18:42,880 even see the alice blue color right here 2014 01:18:42,880 --> 01:18:45,040 and let's go ahead and visit back to the 2015 01:18:45,040 --> 01:18:46,560 top 2016 01:18:46,560 --> 01:18:48,000 and now 2017 01:18:48,000 --> 01:18:49,760 if we go back 2018 01:18:49,760 --> 01:18:51,600 you can see it's a little darker until i 2019 01:18:51,600 --> 01:18:53,280 hover over it so we've just changed 2020 01:18:53,280 --> 01:18:55,199 those colors we're not really covering 2021 01:18:55,199 --> 01:18:58,080 css yet we eventually will after we get 2022 01:18:58,080 --> 01:19:01,120 through all of the html but just for now 2023 01:19:01,120 --> 01:19:02,719 if you want those of course these will 2024 01:19:02,719 --> 01:19:05,040 be downloadable as well in the source 2025 01:19:05,040 --> 01:19:08,159 code let's go back to the index.html 2026 01:19:08,159 --> 01:19:10,320 file and let's hide this file explorer 2027 01:19:10,320 --> 01:19:12,640 by clicking on the icon in the top left 2028 01:19:12,640 --> 01:19:14,960 this is a good spot to talk about some 2029 01:19:14,960 --> 01:19:17,040 link naming conventions and things you 2030 01:19:17,040 --> 01:19:19,360 don't want to do so for now i'm just 2031 01:19:19,360 --> 01:19:20,880 going to use this link at the very 2032 01:19:20,880 --> 01:19:23,679 bottom that has my name as an example 2033 01:19:23,679 --> 01:19:26,159 and one thing you wouldn't want to do is 2034 01:19:26,159 --> 01:19:28,320 be instead of my name 2035 01:19:28,320 --> 01:19:30,000 just put in 2036 01:19:30,000 --> 01:19:32,480 the file text like this or what would be 2037 01:19:32,480 --> 01:19:37,800 worse would be a full url like www 2038 01:19:38,920 --> 01:19:42,000 about.html and if i save this of course 2039 01:19:42,000 --> 01:19:44,320 that's not to google that's just ugly 2040 01:19:44,320 --> 01:19:46,159 and of course you don't need all of that 2041 01:19:46,159 --> 01:19:49,520 you can pare that down to just actually 2042 01:19:49,520 --> 01:19:52,800 a short description of what is there you 2043 01:19:52,800 --> 01:19:55,520 don't really want the full url there so 2044 01:19:55,520 --> 01:19:58,960 i'll put this back to my name 2045 01:19:58,960 --> 01:20:01,199 and there we go and another thing you 2046 01:20:01,199 --> 01:20:05,440 really don't want to do is say this 2047 01:20:05,440 --> 01:20:07,440 links to 2048 01:20:07,440 --> 01:20:08,960 info 2049 01:20:08,960 --> 01:20:11,600 about because really that's redundant so 2050 01:20:11,600 --> 01:20:13,679 if i save that and we go this links to 2051 01:20:13,679 --> 01:20:15,199 info about and i didn't have a space 2052 01:20:15,199 --> 01:20:18,960 there i guess but either way saying this 2053 01:20:18,960 --> 01:20:21,440 links to is really redundant just saying 2054 01:20:21,440 --> 01:20:22,960 this is a link a screen reader knows 2055 01:20:22,960 --> 01:20:24,080 it's a link 2056 01:20:24,080 --> 01:20:25,600 you already know it's a link when you 2057 01:20:25,600 --> 01:20:28,239 see something underlined like that so 2058 01:20:28,239 --> 01:20:30,480 you don't need to say this links to or 2059 01:20:30,480 --> 01:20:33,120 this is a link about that's just 2060 01:20:33,120 --> 01:20:35,440 unnecessary you also want to keep your 2061 01:20:35,440 --> 01:20:37,520 link text as short as possible so 2062 01:20:37,520 --> 01:20:39,199 imagine if i had that same sentence 2063 01:20:39,199 --> 01:20:41,199 before this links to information about 2064 01:20:41,199 --> 01:20:43,040 dave gray and you just put the whole 2065 01:20:43,040 --> 01:20:45,760 sentence in the link that's way too long 2066 01:20:45,760 --> 01:20:48,639 just keep it to the exact topic so if 2067 01:20:48,639 --> 01:20:51,520 the page is about you as in our about 2068 01:20:51,520 --> 01:20:53,760 page just put your name in there for the 2069 01:20:53,760 --> 01:20:55,360 link you don't want the whole sentence 2070 01:20:55,360 --> 01:20:57,840 about that and now the very worst one of 2071 01:20:57,840 --> 01:21:00,480 all really would be to say something 2072 01:21:00,480 --> 01:21:02,000 to learn 2073 01:21:02,000 --> 01:21:04,400 more about me 2074 01:21:04,400 --> 01:21:06,560 comma and then instead of having your 2075 01:21:06,560 --> 01:21:07,520 name 2076 01:21:07,520 --> 01:21:09,679 right here for the text you put click 2077 01:21:09,679 --> 01:21:12,159 here we've probably all seen a link on 2078 01:21:12,159 --> 01:21:15,360 the web that says click here that has no 2079 01:21:15,360 --> 01:21:17,600 description whatsoever for what's on the 2080 01:21:17,600 --> 01:21:19,840 following page that's not good for the 2081 01:21:19,840 --> 01:21:22,639 context of what you're linking to it's 2082 01:21:22,639 --> 01:21:24,560 not good for a screen reader as it tries 2083 01:21:24,560 --> 01:21:27,280 to get context from what the link says 2084 01:21:27,280 --> 01:21:28,639 so really 2085 01:21:28,639 --> 01:21:30,480 a link that says click here and of 2086 01:21:30,480 --> 01:21:32,000 course you can imagine there could be 2087 01:21:32,000 --> 01:21:34,639 several links that say click here all on 2088 01:21:34,639 --> 01:21:36,000 the same page linking to different 2089 01:21:36,000 --> 01:21:39,120 things and that's just confusing so you 2090 01:21:39,120 --> 01:21:41,040 always want to avoid something like that 2091 01:21:41,040 --> 01:21:43,040 that says click here so once again i'll 2092 01:21:43,040 --> 01:21:45,280 remove all of this and we'll just go 2093 01:21:45,280 --> 01:21:47,520 back and we'll put our name here at this 2094 01:21:47,520 --> 01:21:49,360 link but i hope those pointers give you 2095 01:21:49,360 --> 01:21:52,080 some guidelines about naming just keep 2096 01:21:52,080 --> 01:21:55,360 it short and of course say what is on 2097 01:21:55,360 --> 01:21:57,280 the following page a very brief 2098 01:21:57,280 --> 01:21:59,679 description not a full sentence and 2099 01:21:59,679 --> 01:22:01,440 definitely not something generic like 2100 01:22:01,440 --> 01:22:03,800 click here okay i'm going to save the 2101 01:22:03,800 --> 01:22:06,320 index.html and we're going to go back to 2102 01:22:06,320 --> 01:22:07,560 the 2103 01:22:07,560 --> 01:22:10,880 about.html page and we'll add a few more 2104 01:22:10,880 --> 01:22:13,840 link types so we've got a section that 2105 01:22:13,840 --> 01:22:16,239 we're really saying this is about me 2106 01:22:16,239 --> 01:22:18,719 let's just add one more area here so we 2107 01:22:18,719 --> 01:22:21,679 can add another horizontal rule press 2108 01:22:21,679 --> 01:22:22,639 tab 2109 01:22:22,639 --> 01:22:25,199 and now let's add an unordered list 2110 01:22:25,199 --> 01:22:26,800 and inside this unordered list we'll 2111 01:22:26,800 --> 01:22:28,480 have list items 2112 01:22:28,480 --> 01:22:30,480 and this first list item should be a 2113 01:22:30,480 --> 01:22:34,000 download so we have a fav icon file that 2114 01:22:34,000 --> 01:22:37,520 we can offer for downloads so let's say 2115 01:22:37,520 --> 01:22:38,560 download 2116 01:22:38,560 --> 01:22:39,440 in 2117 01:22:39,440 --> 01:22:43,520 and then i'll give the anchor tag so a 2118 01:22:43,520 --> 01:22:47,360 href equals and now let's link to that 2119 01:22:47,360 --> 01:22:49,920 fav icon file that we have so that would 2120 01:22:49,920 --> 01:22:50,639 be 2121 01:22:50,639 --> 01:22:53,380 html5 2122 01:22:53,380 --> 01:22:54,960 [Music] 2123 01:22:54,960 --> 01:22:56,880 and now inside of this 2124 01:22:56,880 --> 01:23:00,239 we can put our html5 2125 01:23:00,239 --> 01:23:03,440 fave icon text but this won't allow us 2126 01:23:03,440 --> 01:23:06,880 to download the file yet we need to add 2127 01:23:06,880 --> 01:23:10,159 the download attribute 2128 01:23:10,159 --> 01:23:13,120 and now this is a download link so if we 2129 01:23:13,120 --> 01:23:14,239 save this 2130 01:23:14,239 --> 01:23:17,280 and we go ahead go back to the top over 2131 01:23:17,280 --> 01:23:18,880 here in chrome 2132 01:23:18,880 --> 01:23:20,880 and well i guess not back to the top we 2133 01:23:20,880 --> 01:23:22,719 need to go ahead and click 2134 01:23:22,719 --> 01:23:25,040 your name or my name whatever you've got 2135 01:23:25,040 --> 01:23:26,639 on your page and that takes us to the 2136 01:23:26,639 --> 01:23:28,880 about page now we have 2137 01:23:28,880 --> 01:23:32,480 download an html5 icon and remember this 2138 01:23:32,480 --> 01:23:35,040 icon is in our folder over here as i 2139 01:23:35,040 --> 01:23:36,639 click the file explorer so we've got 2140 01:23:36,639 --> 01:23:39,520 html5.png 2141 01:23:39,520 --> 01:23:40,880 and that's what we're going to download 2142 01:23:40,880 --> 01:23:43,760 so if we click this link 2143 01:23:43,760 --> 01:23:47,760 we instantly get a download of that file 2144 01:23:47,760 --> 01:23:50,400 so that is a download link now let's add 2145 01:23:50,400 --> 01:23:53,520 another type of link so add another 2146 01:23:53,520 --> 01:23:55,679 list item here 2147 01:23:55,679 --> 01:23:59,199 and inside our list item now let's say 2148 01:23:59,199 --> 01:24:01,679 contact me at 2149 01:24:01,679 --> 01:24:04,000 and now let's go ahead and do another 2150 01:24:04,000 --> 01:24:06,000 anchor tag with the href 2151 01:24:06,000 --> 01:24:08,159 and we can add an email link even though 2152 01:24:08,159 --> 01:24:10,320 these are not advised and i should say 2153 01:24:10,320 --> 01:24:12,320 before we add this these are not advised 2154 01:24:12,320 --> 01:24:14,239 because there are so many 2155 01:24:14,239 --> 01:24:16,800 spiders out there that crawl the web 2156 01:24:16,800 --> 01:24:20,000 really uh search spiders if you will and 2157 01:24:20,000 --> 01:24:22,480 what they do could harvest these email 2158 01:24:22,480 --> 01:24:24,560 addresses and so these have kind of 2159 01:24:24,560 --> 01:24:27,360 become a thing of the past most people 2160 01:24:27,360 --> 01:24:29,360 add a contact form which we'll talk 2161 01:24:29,360 --> 01:24:31,280 about forms in the future instead of 2162 01:24:31,280 --> 01:24:32,800 just putting their email address 2163 01:24:32,800 --> 01:24:35,600 directly in the page to be harvested but 2164 01:24:35,600 --> 01:24:38,000 to add an email link you start with mail 2165 01:24:38,000 --> 01:24:38,960 two 2166 01:24:38,960 --> 01:24:40,560 and after that you would just have your 2167 01:24:40,560 --> 01:24:42,480 email address so i'll just put 2168 01:24:42,480 --> 01:24:44,880 random at 2169 01:24:44,880 --> 01:24:46,719 email.com 2170 01:24:46,719 --> 01:24:49,040 and if that's your email address i'm 2171 01:24:49,040 --> 01:24:51,520 sorry but it seems random to me 2172 01:24:51,520 --> 01:24:53,920 and then i can just put 2173 01:24:53,920 --> 01:24:55,520 my 2174 01:24:55,520 --> 01:24:57,280 email address 2175 01:24:57,280 --> 01:24:59,520 which would complete the sentence rather 2176 01:24:59,520 --> 01:25:01,520 than actually typing the email address 2177 01:25:01,520 --> 01:25:02,719 there as well 2178 01:25:02,719 --> 01:25:04,719 so i like something like that as far as 2179 01:25:04,719 --> 01:25:07,199 being descriptive contact me at my email 2180 01:25:07,199 --> 01:25:08,880 address and that's what the link is the 2181 01:25:08,880 --> 01:25:10,560 link is describing 2182 01:25:10,560 --> 01:25:13,280 your email address okay then there's one 2183 01:25:13,280 --> 01:25:14,960 other type of link we can have oh let me 2184 01:25:14,960 --> 01:25:16,960 save that by the way and if you click 2185 01:25:16,960 --> 01:25:19,760 this link that says my email address it 2186 01:25:19,760 --> 01:25:23,120 would ask you what type of email client 2187 01:25:23,120 --> 01:25:25,360 you want to open these types of links 2188 01:25:25,360 --> 01:25:27,760 with is what it should do at least 2189 01:25:27,760 --> 01:25:30,400 okay the next link type that we have in 2190 01:25:30,400 --> 01:25:32,480 our list item will be 2191 01:25:32,480 --> 01:25:34,960 dialing a telephone number so now i'll 2192 01:25:34,960 --> 01:25:36,239 say 2193 01:25:36,239 --> 01:25:39,199 oops spell it right dial and now let's 2194 01:25:39,199 --> 01:25:41,840 put our anchor tag with the href and we 2195 01:25:41,840 --> 01:25:44,080 start out with t e l for the telephone 2196 01:25:44,080 --> 01:25:45,120 number 2197 01:25:45,120 --> 01:25:47,520 and you can experiment with this uh many 2198 01:25:47,520 --> 01:25:50,159 examples i've seen add the plus symbol 2199 01:25:50,159 --> 01:25:52,480 and i've also got it to work without the 2200 01:25:52,480 --> 01:25:54,400 plus symbol so i'll put the plus symbol 2201 01:25:54,400 --> 01:25:55,360 here 2202 01:25:55,360 --> 01:25:58,000 in the united states most phone numbers 2203 01:25:58,000 --> 01:26:00,800 are ten digits so i would have like one 2204 01:26:00,800 --> 01:26:02,639 two three would be the first set of 2205 01:26:02,639 --> 01:26:04,960 digits then four five six 2206 01:26:04,960 --> 01:26:07,280 and the last set of digits seven eight 2207 01:26:07,280 --> 01:26:09,280 zero something like that 2208 01:26:09,280 --> 01:26:11,360 and that is the telephone link so i 2209 01:26:11,360 --> 01:26:14,560 could say dial and then i could just put 2210 01:26:14,560 --> 01:26:17,120 my phone number just like i did with my 2211 01:26:17,120 --> 01:26:18,800 email address 2212 01:26:18,800 --> 01:26:20,960 and now especially on a mobile phone if 2213 01:26:20,960 --> 01:26:23,120 this was a mobile website this would be 2214 01:26:23,120 --> 01:26:24,880 very handy you could tap this and it 2215 01:26:24,880 --> 01:26:27,199 should open up the dialer if i click 2216 01:26:27,199 --> 01:26:29,600 this link now in chrome 2217 01:26:29,600 --> 01:26:31,520 it wants to make a call it's asking me 2218 01:26:31,520 --> 01:26:33,120 how to do it and pick an app to do it 2219 01:26:33,120 --> 01:26:35,360 because i'm here on my laptop but on a 2220 01:26:35,360 --> 01:26:37,199 mobile device this would probably open 2221 01:26:37,199 --> 01:26:39,120 up the dialer right away now let's look 2222 01:26:39,120 --> 01:26:41,199 at one more type of attribute here so 2223 01:26:41,199 --> 01:26:43,679 i'm just going to put one more list item 2224 01:26:43,679 --> 01:26:44,880 inside that 2225 01:26:44,880 --> 01:26:46,719 one more anchor tag with the hrep 2226 01:26:46,719 --> 01:26:47,840 attribute 2227 01:26:47,840 --> 01:26:49,920 and we're going to link directly to 2228 01:26:49,920 --> 01:26:52,480 google so we need an absolute reference 2229 01:26:52,480 --> 01:26:54,719 this would be https 2230 01:26:54,719 --> 01:26:59,000 colon slash www.google.com 2231 01:26:59,120 --> 01:27:00,960 and we can put the slash if we want to 2232 01:27:00,960 --> 01:27:02,080 as well 2233 01:27:02,080 --> 01:27:05,440 and this is an absolute reference but 2234 01:27:05,440 --> 01:27:07,679 the attribute oh and i haven't really 2235 01:27:07,679 --> 01:27:09,600 put in any text let's go ahead and just 2236 01:27:09,600 --> 01:27:12,320 put google up because we're not really 2237 01:27:12,320 --> 01:27:14,960 adding any extra context to this so the 2238 01:27:14,960 --> 01:27:16,719 attribute that we need to consider that 2239 01:27:16,719 --> 01:27:19,920 we haven't used yet is target and what i 2240 01:27:19,920 --> 01:27:21,920 want to do is have this open in a new 2241 01:27:21,920 --> 01:27:22,880 tab 2242 01:27:22,880 --> 01:27:25,679 so i'm going to use quotes then you put 2243 01:27:25,679 --> 01:27:27,199 underscore 2244 01:27:27,199 --> 01:27:28,800 blank 2245 01:27:28,800 --> 01:27:31,120 and save and now we have a link to 2246 01:27:31,120 --> 01:27:32,880 google so 2247 01:27:32,880 --> 01:27:34,960 let me maybe add a little context here 2248 01:27:34,960 --> 01:27:36,639 i'll put 2249 01:27:36,639 --> 01:27:39,040 open google 2250 01:27:39,040 --> 01:27:40,480 in a new 2251 01:27:40,480 --> 01:27:42,080 tab period 2252 01:27:42,080 --> 01:27:43,760 save that and now we've got our link to 2253 01:27:43,760 --> 01:27:47,199 google if we click this we opened up a 2254 01:27:47,199 --> 01:27:49,679 new tab and i don't have internet right 2255 01:27:49,679 --> 01:27:51,280 now i guess i need to check my 2256 01:27:51,280 --> 01:27:53,040 connection internet's back up and 2257 01:27:53,040 --> 01:27:55,679 running let's click this link again 2258 01:27:55,679 --> 01:27:58,080 and there's google so we've opened it in 2259 01:27:58,080 --> 01:28:00,800 a new tab and all is well so i'll go 2260 01:28:00,800 --> 01:28:02,320 ahead and close that there's the one 2261 01:28:02,320 --> 01:28:03,520 that didn't work 2262 01:28:03,520 --> 01:28:05,440 and now we're back to our page now 2263 01:28:05,440 --> 01:28:07,360 there's one more type of link i want to 2264 01:28:07,360 --> 01:28:09,679 add before we finish today let's scroll 2265 01:28:09,679 --> 01:28:12,560 down in our about.html 2266 01:28:12,560 --> 01:28:14,960 and underneath our copyright line let's 2267 01:28:14,960 --> 01:28:16,800 go ahead and press enter 2268 01:28:16,800 --> 01:28:18,320 add a paragraph 2269 01:28:18,320 --> 01:28:21,040 and inside here we'll add the link that 2270 01:28:21,040 --> 01:28:23,920 we want to add so type a for anchor 2271 01:28:23,920 --> 01:28:26,719 and now the href is just going to have a 2272 01:28:26,719 --> 01:28:28,400 slash value 2273 01:28:28,400 --> 01:28:31,440 what this does is link back to the root 2274 01:28:31,440 --> 01:28:33,639 of our website and that is our 2275 01:28:33,639 --> 01:28:36,159 index.html it's the page that loads by 2276 01:28:36,159 --> 01:28:38,480 default remember i had said we don't 2277 01:28:38,480 --> 01:28:40,520 even have to have the 2278 01:28:40,520 --> 01:28:43,040 index.html up here in the address it's 2279 01:28:43,040 --> 01:28:46,000 just the slash after the ip address and 2280 01:28:46,000 --> 01:28:48,320 the port here on our local server and if 2281 01:28:48,320 --> 01:28:50,880 we had a domain name like google.com 2282 01:28:50,880 --> 01:28:53,360 well then the slash would essentially be 2283 01:28:53,360 --> 01:28:55,520 the home it doesn't have anything else 2284 01:28:55,520 --> 01:28:57,440 after the slash it loads a page by 2285 01:28:57,440 --> 01:28:59,199 default so that's the same thing we're 2286 01:28:59,199 --> 01:29:01,120 doing for our website so here we can 2287 01:29:01,120 --> 01:29:02,639 just put 2288 01:29:02,639 --> 01:29:04,719 back to home 2289 01:29:04,719 --> 01:29:06,880 and save this and now we have a link 2290 01:29:06,880 --> 01:29:09,199 that will take us back to our index page 2291 01:29:09,199 --> 01:29:11,120 so let's click this link 2292 01:29:11,120 --> 01:29:14,000 and we're back to our index.html but 2293 01:29:14,000 --> 01:29:14,960 notice 2294 01:29:14,960 --> 01:29:17,040 in the web address it doesn't even have 2295 01:29:17,040 --> 01:29:19,120 the index.html up here it doesn't need 2296 01:29:19,120 --> 01:29:21,120 that because it loads this page by 2297 01:29:21,120 --> 01:29:23,199 default this is the first page of your 2298 01:29:23,199 --> 01:29:25,040 website now that we've made all of these 2299 01:29:25,040 --> 01:29:27,040 changes to our web page and we've 2300 01:29:27,040 --> 01:29:29,600 actually added a second web page let's 2301 01:29:29,600 --> 01:29:33,120 go to validator.w3.org 2302 01:29:33,120 --> 01:29:35,440 and validate make sure that we don't 2303 01:29:35,440 --> 01:29:38,560 have any errors in our index.html 2304 01:29:38,560 --> 01:29:41,120 and ourabout.html we're going to choose 2305 01:29:41,120 --> 01:29:43,520 validate by file upload 2306 01:29:43,520 --> 01:29:45,360 and choose file 2307 01:29:45,360 --> 01:29:47,360 and for me i'm going to have to go into 2308 01:29:47,360 --> 01:29:50,800 my html tutorials folder click html 2309 01:29:50,800 --> 01:29:53,840 course and i'm in the zero five lesson 2310 01:29:53,840 --> 01:29:56,400 here so index.html 2311 01:29:56,400 --> 01:29:59,679 open the file and check 2312 01:29:59,679 --> 01:30:01,840 and document checking complete no errors 2313 01:30:01,840 --> 01:30:03,679 or warnings to show now we want to do 2314 01:30:03,679 --> 01:30:05,199 the same thing 2315 01:30:05,199 --> 01:30:08,320 for the about.html 2316 01:30:08,320 --> 01:30:10,400 and let's check that as well 2317 01:30:10,400 --> 01:30:11,920 and once again document checking 2318 01:30:11,920 --> 01:30:13,760 completed no errors or warnings to show 2319 01:30:13,760 --> 01:30:16,000 if you have errors or warnings of course 2320 01:30:16,000 --> 01:30:18,080 follow up on what it shows you here in 2321 01:30:18,080 --> 01:30:19,679 the validator and i hope you've learned 2322 01:30:19,679 --> 01:30:21,920 a lot about the different kinds of links 2323 01:30:21,920 --> 01:30:25,679 you can create in your html files 2324 01:30:25,679 --> 01:30:27,679 let's look at adding images to our web 2325 01:30:27,679 --> 01:30:29,760 page until now we've only worked with 2326 01:30:29,760 --> 01:30:32,719 text but html supports multimedia and 2327 01:30:32,719 --> 01:30:36,000 images are a big part of that so what we 2328 01:30:36,000 --> 01:30:38,080 want to do is go to visual studio code 2329 01:30:38,080 --> 01:30:40,639 that i have here on the left and i have 2330 01:30:40,639 --> 01:30:43,440 our project running here on the right 2331 01:30:43,440 --> 01:30:46,480 and we're using live server for that so 2332 01:30:46,480 --> 01:30:48,480 the live server has launched down here 2333 01:30:48,480 --> 01:30:50,560 and you can click to close the server or 2334 01:30:50,560 --> 01:30:52,080 open the server 2335 01:30:52,080 --> 01:30:53,600 if you don't have the live server 2336 01:30:53,600 --> 01:30:55,360 extension search for that here in the 2337 01:30:55,360 --> 01:30:56,639 extensions 2338 01:30:56,639 --> 01:30:57,679 find 2339 01:30:57,679 --> 01:30:59,280 live server 2340 01:30:59,280 --> 01:31:01,840 and that should pull up by ritwik day 2341 01:31:01,840 --> 01:31:04,000 and you just want to install that and it 2342 01:31:04,000 --> 01:31:06,239 can launch your page for you 2343 01:31:06,239 --> 01:31:08,480 okay going back to what we need we have 2344 01:31:08,480 --> 01:31:10,639 clicked on the file explorer 2345 01:31:10,639 --> 01:31:12,719 in visual studio code and we need to 2346 01:31:12,719 --> 01:31:15,760 create a folder to hold our image files 2347 01:31:15,760 --> 01:31:18,880 so i'll type img to name this folder 2348 01:31:18,880 --> 01:31:21,679 and it is a common practice to keep your 2349 01:31:21,679 --> 01:31:24,880 images for your web page or web pages in 2350 01:31:24,880 --> 01:31:26,800 a separate folder as you organize your 2351 01:31:26,800 --> 01:31:27,840 project 2352 01:31:27,840 --> 01:31:29,360 now that we've got that i'm going to 2353 01:31:29,360 --> 01:31:32,080 grab some images and paste those in so 2354 01:31:32,080 --> 01:31:34,000 we can work with them you'll be able to 2355 01:31:34,000 --> 01:31:37,120 download these images from the files and 2356 01:31:37,120 --> 01:31:38,719 resources that i share in the 2357 01:31:38,719 --> 01:31:41,040 description however at the end of this 2358 01:31:41,040 --> 01:31:43,600 tutorial i'm also going to go over some 2359 01:31:43,600 --> 01:31:46,000 resources where you can download your 2360 01:31:46,000 --> 01:31:48,480 own images that are free for use 2361 01:31:48,480 --> 01:31:50,560 so now inside this image folder i'm just 2362 01:31:50,560 --> 01:31:53,600 going to right click and choose paste 2363 01:31:53,600 --> 01:31:55,760 and paste these images in 2364 01:31:55,760 --> 01:31:58,080 let's look at what we've got i can click 2365 01:31:58,080 --> 01:32:00,159 on the vacation image 2366 01:32:00,159 --> 01:32:02,639 and i get this vacation image here and 2367 01:32:02,639 --> 01:32:04,800 notice at the bottom we can see the size 2368 01:32:04,800 --> 01:32:08,719 of the image it's 400 by 267 those are 2369 01:32:08,719 --> 01:32:11,520 pixels we can look at this html logo 2370 01:32:11,520 --> 01:32:14,480 that we're going to use it's 300 by 300 2371 01:32:14,480 --> 01:32:16,560 and we've got an image of the caribbean 2372 01:32:16,560 --> 01:32:20,320 as well and it's 400 by 225. so i'm 2373 01:32:20,320 --> 01:32:22,719 going to collapse this now 2374 01:32:22,719 --> 01:32:23,679 and 2375 01:32:23,679 --> 01:32:25,920 we're going to use those in our html 2376 01:32:25,920 --> 01:32:28,159 code so now i'll click on the file 2377 01:32:28,159 --> 01:32:30,639 explorer to hide the file tree and this 2378 01:32:30,639 --> 01:32:33,199 all starts with the image tag so let's 2379 01:32:33,199 --> 01:32:35,600 scroll down in our html to where we want 2380 01:32:35,600 --> 01:32:38,880 to insert our first image in our page 2381 01:32:38,880 --> 01:32:41,120 we're going to put it right below 2382 01:32:41,120 --> 01:32:43,440 the paragraph that says this is my first 2383 01:32:43,440 --> 01:32:46,320 web page in the i'm ready to learn html 2384 01:32:46,320 --> 01:32:49,840 section okay let's start by typing img 2385 01:32:49,840 --> 01:32:52,320 and pressing tab and then visual studio 2386 01:32:52,320 --> 01:32:54,080 code will help us with that image 2387 01:32:54,080 --> 01:32:55,360 abbreviation 2388 01:32:55,360 --> 01:32:57,280 and it will automatically fill out the 2389 01:32:57,280 --> 01:32:59,679 rest of the image element now notice the 2390 01:32:59,679 --> 01:33:02,159 image element doesn't have a closing 2391 01:33:02,159 --> 01:33:04,239 element like we see here with a heading 2392 01:33:04,239 --> 01:33:06,480 or we see here with a paragraph 2393 01:33:06,480 --> 01:33:08,480 sometimes you will see it 2394 01:33:08,480 --> 01:33:11,040 with a slash like that at the end which 2395 01:33:11,040 --> 01:33:14,159 means it's self-closing html does not 2396 01:33:14,159 --> 01:33:16,880 require that i should say html5 does not 2397 01:33:16,880 --> 01:33:19,520 require that however if you are using 2398 01:33:19,520 --> 01:33:22,159 this in the future in something like 2399 01:33:22,159 --> 01:33:25,199 react it may require that so that's just 2400 01:33:25,199 --> 01:33:27,040 something to be aware of right now i 2401 01:33:27,040 --> 01:33:29,840 won't put that in because html5 does not 2402 01:33:29,840 --> 01:33:31,440 require it and that's what we're 2403 01:33:31,440 --> 01:33:33,920 focusing on okay notice the image 2404 01:33:33,920 --> 01:33:36,560 element has a source attribute and an 2405 01:33:36,560 --> 01:33:39,040 alt attribute automatically the source 2406 01:33:39,040 --> 01:33:42,239 attribute tells html where to grab the 2407 01:33:42,239 --> 01:33:44,880 image we want so we start by typing the 2408 01:33:44,880 --> 01:33:47,120 folder name that we created now we see 2409 01:33:47,120 --> 01:33:49,280 the folder here image slash and i can 2410 01:33:49,280 --> 01:33:50,560 click on that 2411 01:33:50,560 --> 01:33:52,880 and then it provides us the names of the 2412 01:33:52,880 --> 01:33:54,880 images that we have well we want the 2413 01:33:54,880 --> 01:33:57,600 html logo that i saved so i'll just 2414 01:33:57,600 --> 01:34:00,000 click on that and there is the full 2415 01:34:00,000 --> 01:34:03,120 relative path to our image it's in the 2416 01:34:03,120 --> 01:34:06,400 same project here and it's on our local 2417 01:34:06,400 --> 01:34:07,600 server 2418 01:34:07,600 --> 01:34:09,600 in this area so we don't need that 2419 01:34:09,600 --> 01:34:12,000 absolute url that would grab it from 2420 01:34:12,000 --> 01:34:14,560 somewhere else on the web so this is 2421 01:34:14,560 --> 01:34:16,960 once again a relative path to our folder 2422 01:34:16,960 --> 01:34:19,440 and then to the image then we have the 2423 01:34:19,440 --> 01:34:22,000 alt attribute now the alt attribute has 2424 01:34:22,000 --> 01:34:24,320 a couple of purposes 2425 01:34:24,320 --> 01:34:27,280 one is to help assistive technology for 2426 01:34:27,280 --> 01:34:29,679 those that may not be able to see the 2427 01:34:29,679 --> 01:34:31,840 image we are putting on the page the 2428 01:34:31,840 --> 01:34:33,520 assistive technology like a screen 2429 01:34:33,520 --> 01:34:35,440 reader will read the description of the 2430 01:34:35,440 --> 01:34:39,440 image so let's put html5 2431 01:34:39,440 --> 01:34:43,600 logo as the alt text but this also 2432 01:34:43,600 --> 01:34:46,719 makes this alt text appear on the page 2433 01:34:46,719 --> 01:34:49,440 if the image for some reason does not 2434 01:34:49,440 --> 01:34:51,600 load so first of all let's just save our 2435 01:34:51,600 --> 01:34:53,840 page and you'll see the logo 2436 01:34:53,840 --> 01:34:55,760 now appear on the web page and suddenly 2437 01:34:55,760 --> 01:34:57,760 our page got much more interesting it's 2438 01:34:57,760 --> 01:35:00,000 awesome putting images into our web 2439 01:35:00,000 --> 01:35:03,280 pages however let's go ahead and change 2440 01:35:03,280 --> 01:35:06,159 the file name so that it doesn't find 2441 01:35:06,159 --> 01:35:07,920 the image and let's see what happens on 2442 01:35:07,920 --> 01:35:09,280 the page 2443 01:35:09,280 --> 01:35:11,760 now we have a broken image icon but 2444 01:35:11,760 --> 01:35:15,280 notice our alt text appears html5 logo 2445 01:35:15,280 --> 01:35:17,920 so that is another purpose of the alt 2446 01:35:17,920 --> 01:35:20,239 attribute i'll fix that so we get our 2447 01:35:20,239 --> 01:35:23,280 logo back now there's other attributes 2448 01:35:23,280 --> 01:35:26,080 that we can and probably should use with 2449 01:35:26,080 --> 01:35:29,280 an image so one is title now we've seen 2450 01:35:29,280 --> 01:35:31,920 the title attribute before remember the 2451 01:35:31,920 --> 01:35:32,800 title 2452 01:35:32,800 --> 01:35:34,719 text that we provide here in the title 2453 01:35:34,719 --> 01:35:37,199 attribute is not accessible a screen 2454 01:35:37,199 --> 01:35:40,639 reader will not read it so this can't be 2455 01:35:40,639 --> 01:35:42,880 something that is very important that 2456 01:35:42,880 --> 01:35:45,840 everybody should know this is text 2457 01:35:45,840 --> 01:35:48,800 that can complement our image but it's 2458 01:35:48,800 --> 01:35:50,960 not necessarily 2459 01:35:50,960 --> 01:35:53,760 required the page is complete without it 2460 01:35:53,760 --> 01:35:55,600 but we can add some complementary text 2461 01:35:55,600 --> 01:35:58,159 here so i'll just put i am 2462 01:35:58,159 --> 01:36:00,560 learning html5 2463 01:36:00,560 --> 01:36:02,480 it doesn't have to be i don't even need 2464 01:36:02,480 --> 01:36:05,280 the period really it doesn't have to be 2465 01:36:05,280 --> 01:36:08,080 identical to the alt text at all this 2466 01:36:08,080 --> 01:36:09,840 should be complementary but now if we 2467 01:36:09,840 --> 01:36:12,800 mouse over the image we'll see the title 2468 01:36:12,800 --> 01:36:15,280 pop-up that says i am learning html5 and 2469 01:36:15,280 --> 01:36:17,679 that's complementary a couple of other 2470 01:36:17,679 --> 01:36:21,199 attributes that way back in the 1990s 2471 01:36:21,199 --> 01:36:23,920 these were required however for years 2472 01:36:23,920 --> 01:36:26,080 these have not been required but now 2473 01:36:26,080 --> 01:36:29,520 they're coming back and it's width 2474 01:36:29,520 --> 01:36:32,239 and height so if we define a width here 2475 01:36:32,239 --> 01:36:34,639 and we want to provide the same width of 2476 01:36:34,639 --> 01:36:37,920 our image now i saved this image with a 2477 01:36:37,920 --> 01:36:40,159 file name that tells me it reminds me 2478 01:36:40,159 --> 01:36:42,639 exactly the width and the height 2479 01:36:42,639 --> 01:36:45,280 and it's 300 pixels by 300 pixels so 2480 01:36:45,280 --> 01:36:48,159 i'll just put 300 if we just provide the 2481 01:36:48,159 --> 01:36:49,520 width 2482 01:36:49,520 --> 01:36:53,040 html will remember or shift 2483 01:36:53,040 --> 01:36:56,400 the image to match so the aspect ratio 2484 01:36:56,400 --> 01:36:58,560 stays the same so if i switch this to 2485 01:36:58,560 --> 01:36:59,920 200 2486 01:36:59,920 --> 01:37:03,040 and save notice it also adjusted the 2487 01:37:03,040 --> 01:37:05,360 height of the image however we want to 2488 01:37:05,360 --> 01:37:06,560 provide 2489 01:37:06,560 --> 01:37:08,880 both we want to provide the width and 2490 01:37:08,880 --> 01:37:11,360 the height and let's provide exactly 2491 01:37:11,360 --> 01:37:12,880 what they are 2492 01:37:12,880 --> 01:37:14,960 and i'll tell you why this is making a 2493 01:37:14,960 --> 01:37:17,920 comeback and why it is now recommended 2494 01:37:17,920 --> 01:37:20,480 to provide the width and the height even 2495 01:37:20,480 --> 01:37:22,239 though we can change this in the future 2496 01:37:22,239 --> 01:37:25,360 with css so i'm saying we provide these 2497 01:37:25,360 --> 01:37:28,080 but yes css may change 2498 01:37:28,080 --> 01:37:30,560 and override these values so why do we 2499 01:37:30,560 --> 01:37:32,480 provide them well it's a little 2500 01:37:32,480 --> 01:37:34,719 complicated but it's called cumulative 2501 01:37:34,719 --> 01:37:37,119 layout shift if you've ever gone to a 2502 01:37:37,119 --> 01:37:38,320 web page 2503 01:37:38,320 --> 01:37:40,080 and you were getting ready to click on 2504 01:37:40,080 --> 01:37:42,159 something and then you saw the page 2505 01:37:42,159 --> 01:37:44,639 shift around maybe a pop-up ad appeared 2506 01:37:44,639 --> 01:37:46,320 or a banner ad and you clicked on 2507 01:37:46,320 --> 01:37:47,600 something that you didn't intend to 2508 01:37:47,600 --> 01:37:49,760 click because the button or the image 2509 01:37:49,760 --> 01:37:52,000 that you wanted to click suddenly moved 2510 01:37:52,000 --> 01:37:55,360 that is cumulative layout shift so we 2511 01:37:55,360 --> 01:37:57,920 provide the width and the height now to 2512 01:37:57,920 --> 01:38:00,000 tell the browser hey 2513 01:38:00,000 --> 01:38:01,920 this is going to take up some space here 2514 01:38:01,920 --> 01:38:04,000 and this is how much if we don't provide 2515 01:38:04,000 --> 01:38:06,400 that the browser shifts everything once 2516 01:38:06,400 --> 01:38:09,199 it figures out the size of the image now 2517 01:38:09,199 --> 01:38:11,760 once again you can still change the size 2518 01:38:11,760 --> 01:38:14,320 of the image make it responsive which 2519 01:38:14,320 --> 01:38:16,239 would adapt to mobile devices and 2520 01:38:16,239 --> 01:38:19,040 everything else with css so we really 2521 01:38:19,040 --> 01:38:21,360 provide this information with the width 2522 01:38:21,360 --> 01:38:23,679 and the height just to give the browser 2523 01:38:23,679 --> 01:38:28,159 an idea of the size and the aspect ratio 2524 01:38:28,159 --> 01:38:30,639 coming in so it just kind of prepares 2525 01:38:30,639 --> 01:38:32,960 itself and that helps just a little bit 2526 01:38:32,960 --> 01:38:35,199 it is now recommended by google 2527 01:38:35,199 --> 01:38:38,159 developers that we do provide the width 2528 01:38:38,159 --> 01:38:40,880 and the height in the image element with 2529 01:38:40,880 --> 01:38:42,880 our first image added now let's scroll 2530 01:38:42,880 --> 01:38:45,920 down and add a second image to our page 2531 01:38:45,920 --> 01:38:47,840 and we'll scroll down to our vacation 2532 01:38:47,840 --> 01:38:50,159 area place i'd like to visit let's 2533 01:38:50,159 --> 01:38:53,280 change this to places i'd like to visit 2534 01:38:53,280 --> 01:38:54,159 and 2535 01:38:54,159 --> 01:38:56,320 they've got i've heard good things about 2536 01:38:56,320 --> 01:38:58,639 the caribbean so this seems like a great 2537 01:38:58,639 --> 01:39:00,800 place to put an image of a caribbean 2538 01:39:00,800 --> 01:39:03,440 beach so once again we'll type our img 2539 01:39:03,440 --> 01:39:05,840 abbreviation and press tab 2540 01:39:05,840 --> 01:39:07,920 and then visual studio code helps us out 2541 01:39:07,920 --> 01:39:10,800 by providing the image element with the 2542 01:39:10,800 --> 01:39:13,600 source and alt attributes ready to go so 2543 01:39:13,600 --> 01:39:16,000 for the source once again type the name 2544 01:39:16,000 --> 01:39:19,760 of our folder press slash and now we get 2545 01:39:19,760 --> 01:39:21,520 the names of the images we have ready 2546 01:39:21,520 --> 01:39:22,639 i'm going to 2547 01:39:22,639 --> 01:39:24,239 choose caribbean 2548 01:39:24,239 --> 01:39:26,880 and then in the alt area i'm going to 2549 01:39:26,880 --> 01:39:28,960 type 2550 01:39:28,960 --> 01:39:31,199 caribbean beach 2551 01:39:31,199 --> 01:39:33,679 and now let's save and see what we get 2552 01:39:33,679 --> 01:39:35,520 on the page when we scroll down because 2553 01:39:35,520 --> 01:39:36,880 we have to scroll down a little ways to 2554 01:39:36,880 --> 01:39:39,440 see it and there is our caribbean beach 2555 01:39:39,440 --> 01:39:42,800 image so now let's add a title attribute 2556 01:39:42,800 --> 01:39:44,400 that's just a little different than our 2557 01:39:44,400 --> 01:39:47,280 alt attribute just complementary text 2558 01:39:47,280 --> 01:39:49,199 and this is i 2559 01:39:49,199 --> 01:39:50,719 want to visit 2560 01:39:50,719 --> 01:39:52,880 a 2561 01:39:52,880 --> 01:39:55,600 caribbean beach 2562 01:39:55,600 --> 01:39:58,080 and we'll save that now we're getting 2563 01:39:58,080 --> 01:40:00,960 closer but remember we should apply the 2564 01:40:00,960 --> 01:40:03,440 width and the height attributes as well 2565 01:40:03,440 --> 01:40:05,600 so let's click on the file explorer 2566 01:40:05,600 --> 01:40:08,320 because i didn't have the width and the 2567 01:40:08,320 --> 01:40:11,040 height saved in the name of this jpeg 2568 01:40:11,040 --> 01:40:14,480 file dot jpg notice the other image we 2569 01:40:14,480 --> 01:40:16,960 used was a dot png there are different 2570 01:40:16,960 --> 01:40:19,360 image file types and those have 2571 01:40:19,360 --> 01:40:21,679 different extensions so now i'll click 2572 01:40:21,679 --> 01:40:22,560 the 2573 01:40:22,560 --> 01:40:25,440 explorer up here we'll go back open the 2574 01:40:25,440 --> 01:40:27,760 image folder and i'm going to click on 2575 01:40:27,760 --> 01:40:29,840 the caribbean image 2576 01:40:29,840 --> 01:40:31,840 now when i do that in visual studio code 2577 01:40:31,840 --> 01:40:34,000 it shows the image and at the bottom i 2578 01:40:34,000 --> 01:40:35,679 can see it is 2579 01:40:35,679 --> 01:40:36,800 pixels 2580 01:40:36,800 --> 01:40:40,000 by 225 the first number is the width so 2581 01:40:40,000 --> 01:40:42,560 i'm going to close this now 2582 01:40:42,560 --> 01:40:44,480 click file explorer to hide that so i 2583 01:40:44,480 --> 01:40:46,560 have a little more room and now i can 2584 01:40:46,560 --> 01:40:47,679 say 2585 01:40:47,679 --> 01:40:49,440 width 2586 01:40:49,440 --> 01:40:51,360 equals 400 2587 01:40:51,360 --> 01:40:52,960 and the height 2588 01:40:52,960 --> 01:40:55,679 equals 225 2589 01:40:55,679 --> 01:40:58,080 and if we save everything should remain 2590 01:40:58,080 --> 01:41:00,080 the same we've just provided these extra 2591 01:41:00,080 --> 01:41:02,000 attributes now i've noticed 2592 01:41:02,000 --> 01:41:02,800 that 2593 01:41:02,800 --> 01:41:04,800 this wrapped a little strange here in 2594 01:41:04,800 --> 01:41:06,639 visual studio code but know that the 2595 01:41:06,639 --> 01:41:08,719 width and the height are still part of 2596 01:41:08,719 --> 01:41:11,440 the image element that we started right 2597 01:41:11,440 --> 01:41:12,400 here 2598 01:41:12,400 --> 01:41:14,000 okay now that we've got that let's go 2599 01:41:14,000 --> 01:41:16,960 ahead and remove the in from the jpeg so 2600 01:41:16,960 --> 01:41:18,880 it will not find the image and make sure 2601 01:41:18,880 --> 01:41:21,440 our alt text appears yes we've got a 2602 01:41:21,440 --> 01:41:23,679 broken image icon but it says caribbean 2603 01:41:23,679 --> 01:41:26,480 beach and that is our alt text so i'll 2604 01:41:26,480 --> 01:41:28,960 fix that by putting the n back in the 2605 01:41:28,960 --> 01:41:30,960 name spelling it correctly and the image 2606 01:41:30,960 --> 01:41:32,960 shows up because now visual studio code 2607 01:41:32,960 --> 01:41:35,360 can find the file for us okay we had to 2608 01:41:35,360 --> 01:41:37,199 scroll down to see this image because 2609 01:41:37,199 --> 01:41:39,119 our page is long enough 2610 01:41:39,119 --> 01:41:41,600 that if we scroll to the top 2611 01:41:41,600 --> 01:41:44,480 we don't see our vacation area anymore 2612 01:41:44,480 --> 01:41:47,280 now this bottom of the page here you 2613 01:41:47,280 --> 01:41:48,880 could call it a crease if it was a 2614 01:41:48,880 --> 01:41:51,040 newspaper and a lot of the terminology 2615 01:41:51,040 --> 01:41:52,800 kind of goes back to newspapers and 2616 01:41:52,800 --> 01:41:55,600 magazines as we talk about layout and so 2617 01:41:55,600 --> 01:41:57,679 this bottom part 2618 01:41:57,679 --> 01:42:00,880 that defines the line that anything 2619 01:42:00,880 --> 01:42:03,360 below that we do not see right now 2620 01:42:03,360 --> 01:42:07,119 that's called the fold so anything 2621 01:42:07,119 --> 01:42:09,679 after this area that we can now see is 2622 01:42:09,679 --> 01:42:12,239 called below the fold so anything below 2623 01:42:12,239 --> 01:42:14,800 the fold we have to scroll to c and now 2624 01:42:14,800 --> 01:42:17,440 we scroll to see this image well there's 2625 01:42:17,440 --> 01:42:19,600 one more attribute for this image that i 2626 01:42:19,600 --> 01:42:21,679 want to talk about and it's the loading 2627 01:42:21,679 --> 01:42:23,280 attribute 2628 01:42:23,280 --> 01:42:25,440 and if we provide loading and we can set 2629 01:42:25,440 --> 01:42:27,679 it equal to a value and there's two 2630 01:42:27,679 --> 01:42:30,000 possible values the first one 2631 01:42:30,000 --> 01:42:32,880 is eager but we never have to provide 2632 01:42:32,880 --> 01:42:35,920 this this is the value by default so if 2633 01:42:35,920 --> 01:42:38,639 we do not provide the loading attribute 2634 01:42:38,639 --> 01:42:40,639 the loading attribute is always there 2635 01:42:40,639 --> 01:42:42,639 and it's just set to eager we just don't 2636 01:42:42,639 --> 01:42:43,600 see it 2637 01:42:43,600 --> 01:42:46,719 but the one that we do need to provide 2638 01:42:46,719 --> 01:42:48,320 is called lazy 2639 01:42:48,320 --> 01:42:50,400 and what you want to do for performance 2640 01:42:50,400 --> 01:42:52,000 for your web page 2641 01:42:52,000 --> 01:42:55,119 is for any image that is below the fold 2642 01:42:55,119 --> 01:42:57,760 that is one you do not currently see 2643 01:42:57,760 --> 01:43:00,480 when the page loads you want to set the 2644 01:43:00,480 --> 01:43:02,719 loading attribute to lazy and that means 2645 01:43:02,719 --> 01:43:06,080 the browser will only load that image 2646 01:43:06,080 --> 01:43:08,880 when it knows it is about to show it 2647 01:43:08,880 --> 01:43:10,880 when we start to scroll 2648 01:43:10,880 --> 01:43:14,880 now firefox the web browser firefox is 2649 01:43:14,880 --> 01:43:17,760 much easier to demonstrate this in 2650 01:43:17,760 --> 01:43:20,320 chrome wants to display the image much 2651 01:43:20,320 --> 01:43:22,960 earlier so it right now this image is 2652 01:43:22,960 --> 01:43:24,560 close enough 2653 01:43:24,560 --> 01:43:26,480 to the area that we see that it will 2654 01:43:26,480 --> 01:43:28,400 still load this caribbean image 2655 01:43:28,400 --> 01:43:30,880 automatically that we have here so i 2656 01:43:30,880 --> 01:43:33,360 need to create some extra space and i 2657 01:43:33,360 --> 01:43:35,840 can demonstrate this to you by using 2658 01:43:35,840 --> 01:43:37,760 something called chrome dev tools that's 2659 01:43:37,760 --> 01:43:39,920 available in the browser so let's do 2660 01:43:39,920 --> 01:43:42,560 that now i'm going to scroll back up 2661 01:43:42,560 --> 01:43:44,960 above places i'd like to visit 2662 01:43:44,960 --> 01:43:48,080 to the hr area the horizontal rule that 2663 01:43:48,080 --> 01:43:50,159 we have going across right here before 2664 01:43:50,159 --> 01:43:53,280 the i am also planning a vacation 2665 01:43:53,280 --> 01:43:56,159 and i'll type an abbreviation 2666 01:43:56,159 --> 01:43:58,719 br for a line break and then i'll put 2667 01:43:58,719 --> 01:44:00,719 the asterisk for times and i'm going to 2668 01:44:00,719 --> 01:44:02,639 put 150. 2669 01:44:02,639 --> 01:44:04,639 this emit abbreviation that visual 2670 01:44:04,639 --> 01:44:07,400 studio code supports we'll insert 2671 01:44:07,400 --> 01:44:10,239 150 line breaks into our page there's no 2672 01:44:10,239 --> 01:44:11,760 way i would want to type all of those 2673 01:44:11,760 --> 01:44:13,679 individually but i can do it with this 2674 01:44:13,679 --> 01:44:15,360 abbreviation so i'll click that and 2675 01:44:15,360 --> 01:44:17,040 suddenly we have all of these line 2676 01:44:17,040 --> 01:44:18,159 breaks 2677 01:44:18,159 --> 01:44:21,360 if i save and we don't see this change 2678 01:44:21,360 --> 01:44:23,520 but now there's a lot of space between 2679 01:44:23,520 --> 01:44:25,360 the sections and that's what i need to 2680 01:44:25,360 --> 01:44:27,520 demonstrate this so we've changed the 2681 01:44:27,520 --> 01:44:29,600 code i'm going to click the maximize 2682 01:44:29,600 --> 01:44:31,679 button here in chrome to bring the 2683 01:44:31,679 --> 01:44:34,320 browser all the way out and now let's 2684 01:44:34,320 --> 01:44:35,840 right click 2685 01:44:35,840 --> 01:44:38,880 and choose inspect and you could also do 2686 01:44:38,880 --> 01:44:40,639 this with keys 2687 01:44:40,639 --> 01:44:42,880 and it would be control shift and the 2688 01:44:42,880 --> 01:44:45,360 letter i all at once the control key the 2689 01:44:45,360 --> 01:44:47,119 shift key and the letter i i'm just 2690 01:44:47,119 --> 01:44:49,280 going to right click and choose inspect 2691 01:44:49,280 --> 01:44:51,920 either way we'll open up the dev tools 2692 01:44:51,920 --> 01:44:53,520 in chrome 2693 01:44:53,520 --> 01:44:54,960 now that we're getting the dev tools 2694 01:44:54,960 --> 01:44:55,760 open 2695 01:44:55,760 --> 01:44:57,280 it will automatically open to the 2696 01:44:57,280 --> 01:45:00,159 elements tab and notice how if i 2697 01:45:00,159 --> 01:45:03,199 hover over an area in the elements now 2698 01:45:03,199 --> 01:45:04,960 it highlights those on the left in the 2699 01:45:04,960 --> 01:45:06,960 browser so here i've hovered over my 2700 01:45:06,960 --> 01:45:09,280 goals for the year and we can see that i 2701 01:45:09,280 --> 01:45:11,119 can hover over the section that 2702 01:45:11,119 --> 01:45:12,960 discusses html 2703 01:45:12,960 --> 01:45:15,199 and it highlights that section what we 2704 01:45:15,199 --> 01:45:16,719 want to do though is click the two 2705 01:45:16,719 --> 01:45:19,119 greater than symbols here at the top and 2706 01:45:19,119 --> 01:45:23,280 i'm going to choose the network tab 2707 01:45:23,280 --> 01:45:25,760 once it shows the network tab 2708 01:45:25,760 --> 01:45:28,880 you'll want your disable cache 2709 01:45:28,880 --> 01:45:30,719 to have the check mark 2710 01:45:30,719 --> 01:45:33,520 and that is because browsers know to 2711 01:45:33,520 --> 01:45:36,000 save images after they've loaded them 2712 01:45:36,000 --> 01:45:38,639 initially so they can reload them fast 2713 01:45:38,639 --> 01:45:40,800 but that is called the cache where it 2714 01:45:40,800 --> 01:45:42,840 stores the images that's 2715 01:45:42,840 --> 01:45:45,920 cache we want to disable that cache so 2716 01:45:45,920 --> 01:45:48,400 we can demonstrate this also 2717 01:45:48,400 --> 01:45:50,320 in this area right below the filters you 2718 01:45:50,320 --> 01:45:55,600 see all fetch slash xhr js css 2719 01:45:55,600 --> 01:45:57,600 choose the image all we are interested 2720 01:45:57,600 --> 01:45:59,360 in right now are the image files we 2721 01:45:59,360 --> 01:46:01,280 don't want to see the rest of the files 2722 01:46:01,280 --> 01:46:03,600 so once you've done all of that 2723 01:46:03,600 --> 01:46:05,280 we're going to go ahead 2724 01:46:05,280 --> 01:46:07,840 and reload the page so i'm going to 2725 01:46:07,840 --> 01:46:09,679 click the reload icon up here in the 2726 01:46:09,679 --> 01:46:10,960 browser 2727 01:46:10,960 --> 01:46:14,560 and we've reloaded and notice down here 2728 01:46:14,560 --> 01:46:18,159 we just see the html logo file that's 2729 01:46:18,159 --> 01:46:20,400 all that has loaded right now 2730 01:46:20,400 --> 01:46:22,880 and now as we scroll down as we get 2731 01:46:22,880 --> 01:46:24,960 close to the caribbean image file we 2732 01:46:24,960 --> 01:46:27,360 will see it load because it has 2733 01:46:27,360 --> 01:46:30,000 the loading attribute set to lazy so 2734 01:46:30,000 --> 01:46:31,840 only once we get close and i created a 2735 01:46:31,840 --> 01:46:34,159 lot of space here so i'm scrolling down 2736 01:46:34,159 --> 01:46:36,480 and fairly soon it should pop up there 2737 01:46:36,480 --> 01:46:37,440 it is 2738 01:46:37,440 --> 01:46:39,520 we don't see it on the page yet over 2739 01:46:39,520 --> 01:46:41,600 here but it's getting close so chrome 2740 01:46:41,600 --> 01:46:44,560 loaded it in preparation for us to see 2741 01:46:44,560 --> 01:46:48,080 it but what that really helps is that it 2742 01:46:48,080 --> 01:46:50,239 did not load the image right when we 2743 01:46:50,239 --> 01:46:52,480 loaded our page so that made our page 2744 01:46:52,480 --> 01:46:55,280 load faster it only loads these images 2745 01:46:55,280 --> 01:46:57,119 when it thinks it's going to need them 2746 01:46:57,119 --> 01:46:59,760 and that is lazy loading so now you can 2747 01:46:59,760 --> 01:47:02,080 click the x here in the top right to 2748 01:47:02,080 --> 01:47:04,960 close the dev tools then i'm going to 2749 01:47:04,960 --> 01:47:06,159 click the 2750 01:47:06,159 --> 01:47:08,320 maximize button again to get the browser 2751 01:47:08,320 --> 01:47:10,320 back to the size we wanted it i'll drag 2752 01:47:10,320 --> 01:47:13,440 it down here so we can see everything 2753 01:47:13,440 --> 01:47:16,000 and then over in visual studio code i'm 2754 01:47:16,000 --> 01:47:19,040 going to press ctrl z which is undo you 2755 01:47:19,040 --> 01:47:20,960 could also go to the edit menu and 2756 01:47:20,960 --> 01:47:23,920 choose undo but i'll do control z 2757 01:47:23,920 --> 01:47:26,400 and get rid of all those line breaks but 2758 01:47:26,400 --> 01:47:28,639 again if you want to demonstrate that 2759 01:47:28,639 --> 01:47:31,280 you can just type in br and then how 2760 01:47:31,280 --> 01:47:33,280 many of those elements you want in 2761 01:47:33,280 --> 01:47:36,080 visual studio code will recognize that 2762 01:47:36,080 --> 01:47:39,360 so that is a demonstration of a lazy 2763 01:47:39,360 --> 01:47:41,360 loading technique that helps your pages 2764 01:47:41,360 --> 01:47:43,280 load faster imagine if you had a page 2765 01:47:43,280 --> 01:47:46,960 that had a dozen or 20 or even 50 images 2766 01:47:46,960 --> 01:47:48,800 you wouldn't want the page to continue 2767 01:47:48,800 --> 01:47:50,800 loading until it loaded all of those 2768 01:47:50,800 --> 01:47:54,239 images so lazy loading is a very good 2769 01:47:54,239 --> 01:47:56,320 performance technique especially when 2770 01:47:56,320 --> 01:47:58,239 you're dealing with lots of images that 2771 01:47:58,239 --> 01:48:01,119 are below the fold now let's add a new 2772 01:48:01,119 --> 01:48:02,800 element to our page and it's something 2773 01:48:02,800 --> 01:48:05,360 we're going to wrap this image in so 2774 01:48:05,360 --> 01:48:07,600 i'll put it underneath the paragraph 2775 01:48:07,600 --> 01:48:09,040 that says i've heard good things about 2776 01:48:09,040 --> 01:48:10,480 the caribbean and i'm going to type the 2777 01:48:10,480 --> 01:48:11,360 word 2778 01:48:11,360 --> 01:48:14,400 figure and i'll press tab because figure 2779 01:48:14,400 --> 01:48:16,719 is an element now i'll highlight the 2780 01:48:16,719 --> 01:48:20,239 closing tag and press control x to cut 2781 01:48:20,239 --> 01:48:22,239 you can also get these options that i 2782 01:48:22,239 --> 01:48:24,719 use with the keyboard shortcuts in the 2783 01:48:24,719 --> 01:48:27,840 edit menu there's cut copy and paste so 2784 01:48:27,840 --> 01:48:31,040 it's ctrl x to cut and now at the end of 2785 01:48:31,040 --> 01:48:33,199 the image here i'm going to paste which 2786 01:48:33,199 --> 01:48:36,239 is ctrl v and now i've got the opening 2787 01:48:36,239 --> 01:48:38,320 and closing figure tags 2788 01:48:38,320 --> 01:48:40,560 i'll highlight the image here and just 2789 01:48:40,560 --> 01:48:43,199 tab it in as i'm used to seeing it so 2790 01:48:43,199 --> 01:48:46,400 the image is inside the figure element 2791 01:48:46,400 --> 01:48:49,280 now this by itself won't do much but it 2792 01:48:49,280 --> 01:48:51,360 is saying we've got a figure with an 2793 01:48:51,360 --> 01:48:53,920 image and we can add a caption and it 2794 01:48:53,920 --> 01:48:55,679 tells the browser 2795 01:48:55,679 --> 01:48:57,360 that the caption 2796 01:48:57,360 --> 01:48:59,760 big caption element 2797 01:48:59,760 --> 01:49:02,960 is related to the image which is better 2798 01:49:02,960 --> 01:49:05,040 than just putting a paragraph underneath 2799 01:49:05,040 --> 01:49:06,639 it the paragraph 2800 01:49:06,639 --> 01:49:08,320 while we could visually see it's 2801 01:49:08,320 --> 01:49:10,239 probably related to the image if it was 2802 01:49:10,239 --> 01:49:12,560 right under the image it's not telling 2803 01:49:12,560 --> 01:49:15,440 the browser or assistive technology that 2804 01:49:15,440 --> 01:49:17,920 it is a caption for the image this 2805 01:49:17,920 --> 01:49:20,080 spells it out for both the browser and 2806 01:49:20,080 --> 01:49:21,920 assistive technology that yes what we 2807 01:49:21,920 --> 01:49:24,080 put in here is directly related to this 2808 01:49:24,080 --> 01:49:25,760 image but it doesn't have to be 2809 01:49:25,760 --> 01:49:28,800 identical to the alt attribute of the 2810 01:49:28,800 --> 01:49:31,040 image although it should kind of be a 2811 01:49:31,040 --> 01:49:33,520 description of the image so i'll put 2812 01:49:33,520 --> 01:49:35,119 caribbean 2813 01:49:35,119 --> 01:49:37,199 beach 2814 01:49:37,199 --> 01:49:40,159 getaway here as our fig caption and now 2815 01:49:40,159 --> 01:49:42,639 it does show up on the page and notice 2816 01:49:42,639 --> 01:49:45,040 the image has been indented just a 2817 01:49:45,040 --> 01:49:47,040 little bit and once again we can change 2818 01:49:47,040 --> 01:49:48,719 all of the layout of the page and how 2819 01:49:48,719 --> 01:49:51,119 everything looks with css in the future 2820 01:49:51,119 --> 01:49:52,960 but this is just the 2821 01:49:52,960 --> 01:49:55,520 default behavior when we apply a figure 2822 01:49:55,520 --> 01:49:57,520 it's indented somewhat so we have an 2823 01:49:57,520 --> 01:50:00,159 image and the caption now let's go ahead 2824 01:50:00,159 --> 01:50:02,560 and add our last image as well and we 2825 01:50:02,560 --> 01:50:05,280 want to put that underneath margarita 2826 01:50:05,280 --> 01:50:07,679 island reserve riviera cancun an actual 2827 01:50:07,679 --> 01:50:10,480 resort in the mexican 2828 01:50:10,480 --> 01:50:13,360 riviera cancun area so we'll scroll down 2829 01:50:13,360 --> 01:50:14,320 here 2830 01:50:14,320 --> 01:50:15,920 and underneath the address we want to 2831 01:50:15,920 --> 01:50:17,280 add an image 2832 01:50:17,280 --> 01:50:20,239 of at least the cancun area because 2833 01:50:20,239 --> 01:50:21,679 that's where we're thinking about going 2834 01:50:21,679 --> 01:50:23,599 so image and 2835 01:50:23,599 --> 01:50:26,080 we press the tab button and we get the 2836 01:50:26,080 --> 01:50:28,960 source and alt attribute again so let's 2837 01:50:28,960 --> 01:50:31,440 type img that's the name of our folder 2838 01:50:31,440 --> 01:50:34,320 and slash and now we've got our vacation 2839 01:50:34,320 --> 01:50:36,480 image and that looks good 2840 01:50:36,480 --> 01:50:40,000 and now we can put in the alt tag the 2841 01:50:40,000 --> 01:50:42,159 cancun 2842 01:50:42,159 --> 01:50:44,960 vacation for our vacation image 2843 01:50:44,960 --> 01:50:47,840 and now in the title 2844 01:50:47,840 --> 01:50:51,119 we can put something like 2845 01:50:51,760 --> 01:50:55,520 five o'clock 2846 01:50:55,679 --> 01:50:57,520 somewhere because that's kind of related 2847 01:50:57,520 --> 01:51:00,000 to margaritaville and jimmy buffett 2848 01:51:00,000 --> 01:51:02,960 and he's famous for that saying and it's 2849 01:51:02,960 --> 01:51:05,119 five o'clock somewhere there's something 2850 01:51:05,119 --> 01:51:07,440 worth noting about this phrase we've got 2851 01:51:07,440 --> 01:51:09,760 single quotations here inside of our 2852 01:51:09,760 --> 01:51:12,239 double quotations now that's what's 2853 01:51:12,239 --> 01:51:14,800 possible if we had used single quotes 2854 01:51:14,800 --> 01:51:17,599 out here this would not be possible but 2855 01:51:17,599 --> 01:51:21,199 we can use single quotes inside of our 2856 01:51:21,199 --> 01:51:23,360 double quotes so this does work now 2857 01:51:23,360 --> 01:51:25,280 let's go ahead and save 2858 01:51:25,280 --> 01:51:27,199 and if we look at the page right 2859 01:51:27,199 --> 01:51:29,040 underneath the address for the resort 2860 01:51:29,040 --> 01:51:31,040 we're thinking about we've got our 2861 01:51:31,040 --> 01:51:33,440 caribbean vacation image and if we mouse 2862 01:51:33,440 --> 01:51:34,960 over we've got the 2863 01:51:34,960 --> 01:51:36,960 title it's five o'clock somewhere that 2864 01:51:36,960 --> 01:51:39,360 looks good but notice we don't have the 2865 01:51:39,360 --> 01:51:42,080 space or the indentation that we get 2866 01:51:42,080 --> 01:51:44,000 from the figure element so let's go 2867 01:51:44,000 --> 01:51:46,719 ahead and put a figure element around 2868 01:51:46,719 --> 01:51:49,599 this image as well so we'll type 2869 01:51:49,599 --> 01:51:52,560 figure press tab once again i'm going to 2870 01:51:52,560 --> 01:51:55,440 highlight the closing tag press control 2871 01:51:55,440 --> 01:51:56,960 x 2872 01:51:56,960 --> 01:51:59,599 underneath the image ctrl v to paste it 2873 01:51:59,599 --> 01:52:02,000 in and if i save i should get some auto 2874 01:52:02,000 --> 01:52:03,840 formatting and so now i've got the image 2875 01:52:03,840 --> 01:52:06,639 indented inside the figure and let's add 2876 01:52:06,639 --> 01:52:08,960 a caption here as well remember it's the 2877 01:52:08,960 --> 01:52:11,760 fig caption element so i'll press tab 2878 01:52:11,760 --> 01:52:13,520 and now let's put 2879 01:52:13,520 --> 01:52:16,920 a caribbean 2880 01:52:19,360 --> 01:52:21,280 vacation 2881 01:52:21,280 --> 01:52:23,119 image 2882 01:52:23,119 --> 01:52:25,280 so it's not quite the same as our alt 2883 01:52:25,280 --> 01:52:27,280 attribute it's not the same as our title 2884 01:52:27,280 --> 01:52:29,920 attribute but it's a nice description of 2885 01:52:29,920 --> 01:52:32,239 this image okay we're not quite finished 2886 01:52:32,239 --> 01:52:34,800 with our image it's easy to forget some 2887 01:52:34,800 --> 01:52:36,800 of these attributes that we might not 2888 01:52:36,800 --> 01:52:39,280 think about applying right away so one 2889 01:52:39,280 --> 01:52:41,280 we know we need is the loading because 2890 01:52:41,280 --> 01:52:43,679 this will absolutely be below the fold 2891 01:52:43,679 --> 01:52:45,920 so let's set that to lazy as well and 2892 01:52:45,920 --> 01:52:48,400 save and now let's click on the file 2893 01:52:48,400 --> 01:52:51,040 explorer again in the top left and let's 2894 01:52:51,040 --> 01:52:53,440 look at our vacation image and find the 2895 01:52:53,440 --> 01:52:54,800 dimensions 2896 01:52:54,800 --> 01:52:56,719 and we can see here at the bottom it's 2897 01:52:56,719 --> 01:52:58,840 400 pixels by 2898 01:52:58,840 --> 01:53:03,280 267 pixels so now we can close that out 2899 01:53:03,280 --> 01:53:05,280 and click on the file explorer to hide 2900 01:53:05,280 --> 01:53:06,480 that again 2901 01:53:06,480 --> 01:53:08,719 and let's provide width and height so 2902 01:53:08,719 --> 01:53:11,040 the width is equal to 2903 01:53:11,040 --> 01:53:14,400 400 and the height 2904 01:53:14,400 --> 01:53:18,639 is equal to 267. so now we've provided 2905 01:53:18,639 --> 01:53:20,719 all the correct attributes that we need 2906 01:53:20,719 --> 01:53:22,159 for this image 2907 01:53:22,159 --> 01:53:23,760 and everything looks good here on the 2908 01:53:23,760 --> 01:53:24,719 page 2909 01:53:24,719 --> 01:53:26,800 one more thing i want to add about 2910 01:53:26,800 --> 01:53:30,800 figure figure is not just for images so 2911 01:53:30,800 --> 01:53:33,599 let's scroll up here in vs code back to 2912 01:53:33,599 --> 01:53:35,599 our html area 2913 01:53:35,599 --> 01:53:37,360 and we do have 2914 01:53:37,360 --> 01:53:40,800 our html logo right here underneath this 2915 01:53:40,800 --> 01:53:42,880 is my first web page we'll scroll back 2916 01:53:42,880 --> 01:53:45,679 up to this area here on the page as well 2917 01:53:45,679 --> 01:53:48,880 and now we can add a figure underneath 2918 01:53:48,880 --> 01:53:50,719 this image 2919 01:53:50,719 --> 01:53:53,040 so i'll type the word figure again 2920 01:53:53,040 --> 01:53:56,000 and now let's add a fig caption first 2921 01:53:56,000 --> 01:53:58,159 the fig caption element needs to either 2922 01:53:58,159 --> 01:54:01,280 be the first thing inside of a figure or 2923 01:54:01,280 --> 01:54:04,480 the last thing it can be either or so 2924 01:54:04,480 --> 01:54:06,400 here i'm going to type 2925 01:54:06,400 --> 01:54:07,199 in 2926 01:54:07,199 --> 01:54:08,639 example 2927 01:54:08,639 --> 01:54:11,040 of html5 2928 01:54:11,040 --> 01:54:13,040 code and that will be our caption so 2929 01:54:13,040 --> 01:54:15,280 let's save that much and we see that 2930 01:54:15,280 --> 01:54:18,320 here but really we have no content 2931 01:54:18,320 --> 01:54:20,639 inside of our figure yet so let's go 2932 01:54:20,639 --> 01:54:22,320 ahead and add some content and i'll add 2933 01:54:22,320 --> 01:54:25,280 a paragraph which is a block level 2934 01:54:25,280 --> 01:54:27,599 element we've discussed that in the past 2935 01:54:27,599 --> 01:54:29,920 block versus inline 2936 01:54:29,920 --> 01:54:32,400 and now for the text of the paragraph i 2937 01:54:32,400 --> 01:54:34,800 want to put that inside of an inline 2938 01:54:34,800 --> 01:54:36,880 element that will not create a line 2939 01:54:36,880 --> 01:54:40,960 break and it's a code element code this 2940 01:54:40,960 --> 01:54:43,760 element code helps you actually display 2941 01:54:43,760 --> 01:54:45,760 code if that's what you want to use you 2942 01:54:45,760 --> 01:54:47,760 can use other elements inside of it 2943 01:54:47,760 --> 01:54:50,480 though so if i want to display html code 2944 01:54:50,480 --> 01:54:53,360 i can't simply put an h1 element because 2945 01:54:53,360 --> 01:54:56,560 then it applies this element to the page 2946 01:54:56,560 --> 01:54:58,560 we need to go back to what we learned 2947 01:54:58,560 --> 01:55:01,599 about html entities to provide 2948 01:55:01,599 --> 01:55:04,880 the less than sign which is in ampersand 2949 01:55:04,880 --> 01:55:08,400 lt with a semicolon then i could type h1 2950 01:55:08,400 --> 01:55:11,280 and then ampersand gt with a semicolon 2951 01:55:11,280 --> 01:55:13,599 for the greater than symbol and now i'll 2952 01:55:13,599 --> 01:55:14,560 put 2953 01:55:14,560 --> 01:55:16,400 hello world 2954 01:55:16,400 --> 01:55:18,400 with an exclamation mark and then i'll 2955 01:55:18,400 --> 01:55:19,679 do the 2956 01:55:19,679 --> 01:55:22,239 less than html entity again and then a 2957 01:55:22,239 --> 01:55:25,920 slash h1 and then the ampersand 2958 01:55:25,920 --> 01:55:29,360 gt semicolon which is greater than 2959 01:55:29,360 --> 01:55:31,520 in a semicolon and now if we look at the 2960 01:55:31,520 --> 01:55:32,639 page 2961 01:55:32,639 --> 01:55:36,159 we have got an example of some html code 2962 01:55:36,159 --> 01:55:39,199 printed directly to our web page so this 2963 01:55:39,199 --> 01:55:41,440 is another example of how to use a 2964 01:55:41,440 --> 01:55:43,520 figure element it can contain other 2965 01:55:43,520 --> 01:55:46,400 content such as a code sample and you 2966 01:55:46,400 --> 01:55:48,400 can have a caption at the top just as 2967 01:55:48,400 --> 01:55:50,800 easily as you can at the bottom of the 2968 01:55:50,800 --> 01:55:53,119 figure okay our code for the lesson is 2969 01:55:53,119 --> 01:55:55,280 complete but i do want to show you some 2970 01:55:55,280 --> 01:55:58,159 image resources but before we can do 2971 01:55:58,159 --> 01:56:00,960 that we need to validate our code with 2972 01:56:00,960 --> 01:56:03,760 the validator once again so i'm going to 2973 01:56:03,760 --> 01:56:05,760 grab this and make it just a little 2974 01:56:05,760 --> 01:56:07,760 wider so the validator shows up better 2975 01:56:07,760 --> 01:56:12,080 here remember we're at validator.w3.org 2976 01:56:12,080 --> 01:56:15,840 we want to click validate by file upload 2977 01:56:15,840 --> 01:56:17,679 click choose file make sure you're in 2978 01:56:17,679 --> 01:56:20,480 the correct folder once this folder area 2979 01:56:20,480 --> 01:56:23,760 opens up and i'm in the lesson six 2980 01:56:23,760 --> 01:56:25,760 folder and then i'm going to choose the 2981 01:56:25,760 --> 01:56:27,599 index file that we're working in and 2982 01:56:27,599 --> 01:56:30,800 choose open and from there i can choose 2983 01:56:30,800 --> 01:56:31,840 check 2984 01:56:31,840 --> 01:56:34,080 and it should check the html it says 2985 01:56:34,080 --> 01:56:36,719 document checking completed no errors or 2986 01:56:36,719 --> 01:56:39,040 warnings to show that's what you want if 2987 01:56:39,040 --> 01:56:41,040 you do get an error warning it should 2988 01:56:41,040 --> 01:56:43,440 tell you what line it's on in your code 2989 01:56:43,440 --> 01:56:45,920 and you can refer to visual studio code 2990 01:56:45,920 --> 01:56:48,159 find the line and fix the error that it 2991 01:56:48,159 --> 01:56:50,480 is telling you about so once again 2992 01:56:50,480 --> 01:56:52,560 validate your code before you finish 2993 01:56:52,560 --> 01:56:54,719 before finishing this image lesson i 2994 01:56:54,719 --> 01:56:56,639 wanted to share some resources that i 2995 01:56:56,639 --> 01:56:58,639 use now there are many resources out 2996 01:56:58,639 --> 01:57:00,639 there so these are just a few and i'm 2997 01:57:00,639 --> 01:57:02,960 sure you can find others as well first 2998 01:57:02,960 --> 01:57:05,199 there's this article that has 21 of the 2999 01:57:05,199 --> 01:57:08,159 best placeholder image generators using 3000 01:57:08,159 --> 01:57:10,800 placeholder images is very common 3001 01:57:10,800 --> 01:57:12,560 practice when you're laying out a page 3002 01:57:12,560 --> 01:57:14,159 and you're not sure the images you want 3003 01:57:14,159 --> 01:57:16,960 to use yet what you can do is take a uh 3004 01:57:16,960 --> 01:57:20,719 url like this from placeholder.com 3005 01:57:20,719 --> 01:57:23,280 and put it in as the value of the source 3006 01:57:23,280 --> 01:57:27,280 attribute in your html image tag 3007 01:57:27,280 --> 01:57:29,840 and then it will generate a placeholder 3008 01:57:29,840 --> 01:57:31,520 image until you find the image you want 3009 01:57:31,520 --> 01:57:33,599 to put there some of these other image 3010 01:57:33,599 --> 01:57:35,599 generators actually provide pictures 3011 01:57:35,599 --> 01:57:37,520 like the second one on the list called 3012 01:57:37,520 --> 01:57:40,000 phil murray provides random pictures of 3013 01:57:40,000 --> 01:57:41,760 the actor bill murray but it works in 3014 01:57:41,760 --> 01:57:45,280 the same way you put the url in 3015 01:57:45,280 --> 01:57:48,560 for the source attribute value in your 3016 01:57:48,560 --> 01:57:50,320 image tag and then you will get a 3017 01:57:50,320 --> 01:57:52,480 picture of bill murray from this image 3018 01:57:52,480 --> 01:57:54,960 generator okay the next several sites 3019 01:57:54,960 --> 01:57:57,520 are just great places to download 3020 01:57:57,520 --> 01:57:59,199 freely 3021 01:57:59,199 --> 01:58:01,599 usable images as it says right here 3022 01:58:01,599 --> 01:58:04,400 these are licensed for free use it's 3023 01:58:04,400 --> 01:58:07,040 important to download and use images 3024 01:58:07,040 --> 01:58:09,119 that you actually have the usage rights 3025 01:58:09,119 --> 01:58:10,239 to so 3026 01:58:10,239 --> 01:58:12,400 this is a good way to do that find them 3027 01:58:12,400 --> 01:58:13,000 on 3028 01:58:13,000 --> 01:58:16,000 unsplash.com is my favorite you can also 3029 01:58:16,000 --> 01:58:18,880 go to pexels.com as you see here very 3030 01:58:18,880 --> 01:58:21,360 similar site you can also go to 3031 01:58:21,360 --> 01:58:24,159 gratisography.com 3032 01:58:24,159 --> 01:58:26,960 and this site has unique and kind of 3033 01:58:26,960 --> 01:58:28,800 funny pictures so that's kind of neat 3034 01:58:28,800 --> 01:58:29,679 too 3035 01:58:29,679 --> 01:58:31,440 and you never know what you'll see on 3036 01:58:31,440 --> 01:58:33,960 these the next one is 3037 01:58:33,960 --> 01:58:36,880 pixabay.com very much like the previous 3038 01:58:36,880 --> 01:58:39,040 ones i showed you from there i want to 3039 01:58:39,040 --> 01:58:41,760 suggest some free image software it's 3040 01:58:41,760 --> 01:58:44,400 called orphan view i've used this for 3041 01:58:44,400 --> 01:58:46,800 years it's just really lightweight 3042 01:58:46,800 --> 01:58:49,840 software easy to use and you can load in 3043 01:58:49,840 --> 01:58:52,239 an image and resize it and that's what i 3044 01:58:52,239 --> 01:58:54,000 usually use it for you can also crop 3045 01:58:54,000 --> 01:58:56,400 images with it i'll pull it over here as 3046 01:58:56,400 --> 01:58:58,880 i have an instance of earphone view open 3047 01:58:58,880 --> 01:58:59,920 already 3048 01:58:59,920 --> 01:59:01,679 you can see i've got in this large 3049 01:59:01,679 --> 01:59:04,080 picture of the caribbean beach but you 3050 01:59:04,080 --> 01:59:06,639 can go to the edit menu 3051 01:59:06,639 --> 01:59:08,480 and you can see different options that 3052 01:59:08,480 --> 01:59:11,119 are here such as the crop 3053 01:59:11,119 --> 01:59:12,639 and of course we'd have to select an 3054 01:59:12,639 --> 01:59:15,199 area to do it but in the image menu 3055 01:59:15,199 --> 01:59:17,679 there is a resize resample 3056 01:59:17,679 --> 01:59:19,920 and here you can see you've got the 3057 01:59:19,920 --> 01:59:22,239 dimensions of the image but i can resize 3058 01:59:22,239 --> 01:59:25,080 this it's a huge image right now at 3059 01:59:25,080 --> 01:59:27,440 5464 pixels wide 3060 01:59:27,440 --> 01:59:30,719 i'll take it to say 400 pixels 3061 01:59:30,719 --> 01:59:33,679 and it stays in sync so it keeps the 3062 01:59:33,679 --> 01:59:36,040 aspect ratio and now we're at 3063 01:59:36,040 --> 01:59:38,639 225 for the height so you see the 3064 01:59:38,639 --> 01:59:40,719 current size and then the new size i'll 3065 01:59:40,719 --> 01:59:42,080 click ok 3066 01:59:42,080 --> 01:59:44,159 and it brings it down to a much smaller 3067 01:59:44,159 --> 01:59:46,880 nicer size easy to save as well as a new 3068 01:59:46,880 --> 01:59:47,760 name 3069 01:59:47,760 --> 01:59:50,480 and a great little software to use from 3070 01:59:50,480 --> 01:59:52,920 there i also recommend 3071 01:59:52,920 --> 01:59:56,719 canva.com now disclosure here there is a 3072 01:59:56,719 --> 01:59:59,679 paid subscription to use this site 3073 01:59:59,679 --> 02:00:03,040 however i believe they have a free 3074 02:00:03,040 --> 02:00:04,800 account that you can at least get some 3075 02:00:04,800 --> 02:00:06,480 of the features or try it out so 3076 02:00:06,480 --> 02:00:08,639 canva.com is good 3077 02:00:08,639 --> 02:00:11,040 after you've got your images and even 3078 02:00:11,040 --> 02:00:13,679 after you have resized your images to 3079 02:00:13,679 --> 02:00:15,440 the smaller size that you would probably 3080 02:00:15,440 --> 02:00:17,920 use on your web page it's also a good 3081 02:00:17,920 --> 02:00:22,280 idea to drag and drop them into 3082 02:00:22,280 --> 02:00:25,119 tinypng.com i believe this also comes up 3083 02:00:25,119 --> 02:00:28,239 if you type in tinyjpg.com 3084 02:00:28,239 --> 02:00:30,800 but it will compress the images 3085 02:00:30,800 --> 02:00:33,679 and they will still look good but they 3086 02:00:33,679 --> 02:00:35,920 get a smaller file size so they load to 3087 02:00:35,920 --> 02:00:37,840 that web page faster which is always 3088 02:00:37,840 --> 02:00:40,320 important so all of these resources are 3089 02:00:40,320 --> 02:00:42,239 great and i will put links to all of 3090 02:00:42,239 --> 02:00:45,440 them in the description below 3091 02:00:45,440 --> 02:00:48,000 documents need organization and our html 3092 02:00:48,000 --> 02:00:50,320 files are no different html achieves 3093 02:00:50,320 --> 02:00:52,880 document organization with semantics in 3094 02:00:52,880 --> 02:00:54,800 this lesson we're going to improve our 3095 02:00:54,800 --> 02:00:57,440 code with the semantic html layout let's 3096 02:00:57,440 --> 02:00:59,840 get started i've got visual studio code 3097 02:00:59,840 --> 02:01:02,800 here on the left with our index.html 3098 02:01:02,800 --> 02:01:06,000 open and on the right i have got our 3099 02:01:06,000 --> 02:01:08,800 index html page displaying and we're 3100 02:01:08,800 --> 02:01:11,199 using the live server extension for 3101 02:01:11,199 --> 02:01:14,320 visual studio code to display that page 3102 02:01:14,320 --> 02:01:16,000 and you can see it's launched down here 3103 02:01:16,000 --> 02:01:17,920 you can click the close or open the 3104 02:01:17,920 --> 02:01:20,159 server you can search for that extension 3105 02:01:20,159 --> 02:01:23,040 over here at the extensions icon if you 3106 02:01:23,040 --> 02:01:25,360 do not have it again it's the live 3107 02:01:25,360 --> 02:01:28,480 server extension okay so we're adding 3108 02:01:28,480 --> 02:01:32,159 semantics to our index html page now 3109 02:01:32,159 --> 02:01:34,159 we've already added some so let's 3110 02:01:34,159 --> 02:01:36,719 highlight what we have done already as 3111 02:01:36,719 --> 02:01:38,239 we've built this page out over the 3112 02:01:38,239 --> 02:01:40,800 lessons the main thing that we have done 3113 02:01:40,800 --> 02:01:44,080 correctly is add a hierarchy of headers 3114 02:01:44,080 --> 02:01:46,960 you only want one h1 per page 3115 02:01:46,960 --> 02:01:49,599 and this should be an outline much like 3116 02:01:49,599 --> 02:01:52,080 you would have an outline for an essay 3117 02:01:52,080 --> 02:01:54,639 or any type of paper topic you would 3118 02:01:54,639 --> 02:01:56,639 write so this is your title for the 3119 02:01:56,639 --> 02:01:58,719 whole page essentially 3120 02:01:58,719 --> 02:02:01,520 and from there you can have multiple h2 3121 02:02:01,520 --> 02:02:04,080 headers which is one level down in the 3122 02:02:04,080 --> 02:02:05,280 hierarchy 3123 02:02:05,280 --> 02:02:08,080 and they would define subtopics and then 3124 02:02:08,080 --> 02:02:10,560 beneath that you could have h3 headers 3125 02:02:10,560 --> 02:02:13,679 if there was a subtopic of a subtopic 3126 02:02:13,679 --> 02:02:15,840 and so on and that continues to h6 3127 02:02:15,840 --> 02:02:17,760 although you really don't want any more 3128 02:02:17,760 --> 02:02:19,360 than about three 3129 02:02:19,360 --> 02:02:23,679 levels of headings on a page so h1 h2h3 3130 02:02:23,679 --> 02:02:26,400 would be the ideal way to have a page 3131 02:02:26,400 --> 02:02:29,760 laid out after that we need to consider 3132 02:02:29,760 --> 02:02:32,000 some things about semantic html writing 3133 02:02:32,000 --> 02:02:34,800 semantic html helps us quickly see or 3134 02:02:34,800 --> 02:02:36,639 read the different sections in a web 3135 02:02:36,639 --> 02:02:39,199 page and navigate to those sections now 3136 02:02:39,199 --> 02:02:42,159 we've already added a nav element to our 3137 02:02:42,159 --> 02:02:45,360 page and nav elements are semantic 3138 02:02:45,360 --> 02:02:48,080 elements so this says we have a grouping 3139 02:02:48,080 --> 02:02:49,920 of links here and we can see that on the 3140 02:02:49,920 --> 02:02:52,480 page with learning html and planning a 3141 02:02:52,480 --> 02:02:54,400 vacation we have a grouping of links 3142 02:02:54,400 --> 02:02:56,000 here that will help us navigate to the 3143 02:02:56,000 --> 02:02:57,440 rest of the page 3144 02:02:57,440 --> 02:02:59,840 we also have an hr which stands for 3145 02:02:59,840 --> 02:03:02,800 horizontal rule in the past i believe i 3146 02:03:02,800 --> 02:03:04,719 might have said these didn't really have 3147 02:03:04,719 --> 02:03:06,719 a semantic meaning but they do they're 3148 02:03:06,719 --> 02:03:08,400 currently viewed 3149 02:03:08,400 --> 02:03:11,599 as semantic elements and it means that 3150 02:03:11,599 --> 02:03:14,800 there is a topic change so something is 3151 02:03:14,800 --> 02:03:16,320 changing and of course we have a couple 3152 02:03:16,320 --> 02:03:18,480 of topics on our page and we have 3153 02:03:18,480 --> 02:03:20,880 horizontal rules between those in the 3154 02:03:20,880 --> 02:03:23,520 future as we learn css we may want to 3155 02:03:23,520 --> 02:03:26,320 remove the horizontal rules we see here 3156 02:03:26,320 --> 02:03:29,280 that divide our navigation and our 3157 02:03:29,280 --> 02:03:31,679 heading for the page and replace those 3158 02:03:31,679 --> 02:03:34,159 with lines that we can create with css 3159 02:03:34,159 --> 02:03:36,080 because we're not really separating 3160 02:03:36,080 --> 02:03:38,080 topics here although it doesn't hurt to 3161 02:03:38,080 --> 02:03:40,080 have these horizontal rules in place at 3162 02:03:40,080 --> 02:03:42,159 this time and the main thing to convey 3163 02:03:42,159 --> 02:03:44,880 about semantic html is the word semantic 3164 02:03:44,880 --> 02:03:47,760 that means it provides meaning as the 3165 02:03:47,760 --> 02:03:49,840 nav element says hey this is a 3166 02:03:49,840 --> 02:03:52,719 navigation area or the h1 element says 3167 02:03:52,719 --> 02:03:55,360 hey this is a heading we can also get 3168 02:03:55,360 --> 02:03:57,280 that from other parts of the page we 3169 02:03:57,280 --> 02:04:00,159 added section elements that say this is 3170 02:04:00,159 --> 02:04:03,119 a new section so they provide additional 3171 02:04:03,119 --> 02:04:04,079 meaning 3172 02:04:04,079 --> 02:04:05,599 rather than just 3173 02:04:05,599 --> 02:04:07,199 a generic 3174 02:04:07,199 --> 02:04:09,520 divider and we will talk about what a 3175 02:04:09,520 --> 02:04:12,159 generic divider is later as well now in 3176 02:04:12,159 --> 02:04:14,880 addition semantic html makes our pages 3177 02:04:14,880 --> 02:04:16,800 accessible to screen readers and other 3178 02:04:16,800 --> 02:04:19,199 assistive technology and that is very 3179 02:04:19,199 --> 02:04:21,440 important as we create pages now while 3180 02:04:21,440 --> 02:04:24,159 we've added some semantic html already 3181 02:04:24,159 --> 02:04:27,599 let's add the three big areas that most 3182 02:04:27,599 --> 02:04:30,719 consider for pages the first is not a 3183 02:04:30,719 --> 02:04:34,239 heads section but a header for our page 3184 02:04:34,239 --> 02:04:37,040 now we have a heading which is the title 3185 02:04:37,040 --> 02:04:40,239 of the page but we can wrap this in a 3186 02:04:40,239 --> 02:04:42,800 header element and there can be more 3187 02:04:42,800 --> 02:04:45,840 than one header element per page however 3188 02:04:45,840 --> 02:04:48,079 it needs to follow the heading hierarchy 3189 02:04:48,079 --> 02:04:51,679 so imagine if we had a social media site 3190 02:04:51,679 --> 02:04:54,320 now every post whether it would be a 3191 02:04:54,320 --> 02:04:57,360 blog post or a post like facebook or 3192 02:04:57,360 --> 02:05:00,159 instagram every post could have its own 3193 02:05:00,159 --> 02:05:03,199 header and it might have a subtitle in 3194 02:05:03,199 --> 02:05:05,119 that post as well 3195 02:05:05,119 --> 02:05:08,159 but this is a header now for our full 3196 02:05:08,159 --> 02:05:11,360 page so this would be at the top level 3197 02:05:11,360 --> 02:05:13,679 of our page with the hierarchy here of 3198 02:05:13,679 --> 02:05:16,000 h1 which is the heading for our page 3199 02:05:16,000 --> 02:05:18,320 notice we've also included the 3200 02:05:18,320 --> 02:05:19,760 navigation 3201 02:05:19,760 --> 02:05:22,400 inside of our header and we can go ahead 3202 02:05:22,400 --> 02:05:25,119 and remove this horizontal rule and i 3203 02:05:25,119 --> 02:05:26,960 think it will be just fine we don't need 3204 02:05:26,960 --> 02:05:29,360 the semantic meaning of a change topic 3205 02:05:29,360 --> 02:05:31,280 there and i think it's going to look 3206 02:05:31,280 --> 02:05:33,360 okay without the line as well so let's 3207 02:05:33,360 --> 02:05:34,880 save this now 3208 02:05:34,880 --> 02:05:36,960 and we can see live server updates our 3209 02:05:36,960 --> 02:05:38,719 page immediately so we can see the 3210 02:05:38,719 --> 02:05:42,000 change and really all we see visually is 3211 02:05:42,000 --> 02:05:43,760 that our horizontal rule is removed 3212 02:05:43,760 --> 02:05:46,639 however we have added some extra meaning 3213 02:05:46,639 --> 02:05:49,760 to our html here now that this is the 3214 02:05:49,760 --> 02:05:53,119 heading or the header section for our 3215 02:05:53,119 --> 02:05:55,440 full page now the next element we want 3216 02:05:55,440 --> 02:05:58,560 to add is the main element now there can 3217 02:05:58,560 --> 02:06:02,560 only be one main element per page and by 3218 02:06:02,560 --> 02:06:04,639 definition that would make sense you can 3219 02:06:04,639 --> 02:06:06,000 only have one 3220 02:06:06,000 --> 02:06:08,320 main area for content 3221 02:06:08,320 --> 02:06:10,480 per page and so we'll start here and 3222 02:06:10,480 --> 02:06:13,119 it's going to include our sections that 3223 02:06:13,119 --> 02:06:15,920 we've created so i used ctrl x to cut 3224 02:06:15,920 --> 02:06:18,480 the closing main element tag 3225 02:06:18,480 --> 02:06:21,119 and i'll scroll down to where our 3226 02:06:21,119 --> 02:06:24,639 second section ends before our area here 3227 02:06:24,639 --> 02:06:26,960 at the end and i'll paste 3228 02:06:26,960 --> 02:06:29,520 the closing main element and save and we 3229 02:06:29,520 --> 02:06:31,760 can see visual studio code reformatted 3230 02:06:31,760 --> 02:06:35,119 for us so now we've got the main 3231 02:06:35,119 --> 02:06:37,119 element wrapping 3232 02:06:37,119 --> 02:06:40,480 our two topic areas of vacation 3233 02:06:40,480 --> 02:06:43,920 and of html so we've added a header and 3234 02:06:43,920 --> 02:06:46,320 a main element now one other thing we 3235 02:06:46,320 --> 02:06:49,599 can add for our page is a footer now 3236 02:06:49,599 --> 02:06:51,920 just like the header there can be more 3237 02:06:51,920 --> 02:06:54,560 than one footer per page 3238 02:06:54,560 --> 02:06:57,119 and that might be a footer for a blog 3239 02:06:57,119 --> 02:06:59,679 post or a footer for a social media post 3240 02:06:59,679 --> 02:07:02,159 but this is the footer for our 3241 02:07:02,159 --> 02:07:04,719 entire page in this example once again 3242 02:07:04,719 --> 02:07:07,360 ctrl x to cut that closing tag and i'm 3243 02:07:07,360 --> 02:07:09,280 going to wrap everything we have here at 3244 02:07:09,280 --> 02:07:11,199 the end in the footer 3245 02:07:11,199 --> 02:07:12,960 one other thing i want to add just 3246 02:07:12,960 --> 02:07:14,880 because i didn't do it before we 3247 02:07:14,880 --> 02:07:17,040 validated our page throughout the other 3248 02:07:17,040 --> 02:07:19,520 lessons and it's not an error it's not a 3249 02:07:19,520 --> 02:07:22,000 problem but i want to include this 3250 02:07:22,000 --> 02:07:24,159 information here about the copyright i 3251 02:07:24,159 --> 02:07:26,000 want to include that in a paragraph 3252 02:07:26,000 --> 02:07:27,199 element so 3253 02:07:27,199 --> 02:07:29,360 i'm going to make sure that's lowercase 3254 02:07:29,360 --> 02:07:31,440 well i'm like getting a capital there we 3255 02:07:31,440 --> 02:07:32,320 go 3256 02:07:32,320 --> 02:07:34,960 and then i'm going to once again 3257 02:07:34,960 --> 02:07:37,760 cut the closing tag and put it 3258 02:07:37,760 --> 02:07:40,560 after the content and save it gets 3259 02:07:40,560 --> 02:07:42,880 reformatted it really doesn't change the 3260 02:07:42,880 --> 02:07:45,760 look i just wanted both inside that 3261 02:07:45,760 --> 02:07:47,199 paragraph and that might help in the 3262 02:07:47,199 --> 02:07:49,599 future when we want to format this area 3263 02:07:49,599 --> 02:07:52,400 as well with css so now our document has 3264 02:07:52,400 --> 02:07:54,639 been outlined into three major sections 3265 02:07:54,639 --> 02:07:57,840 we have a footer a main area and a 3266 02:07:57,840 --> 02:08:00,480 header and then inside the header we've 3267 02:08:00,480 --> 02:08:03,760 already discussed we have a navigation 3268 02:08:03,760 --> 02:08:05,840 element that is also 3269 02:08:05,840 --> 02:08:09,040 semantic html our list is also semantic 3270 02:08:09,040 --> 02:08:11,360 html we know right away that this is 3271 02:08:11,360 --> 02:08:13,119 providing a list and this would be 3272 02:08:13,119 --> 02:08:15,199 identified by assistive technology as 3273 02:08:15,199 --> 02:08:17,920 well now there can be more than one nav 3274 02:08:17,920 --> 02:08:22,079 element per page so we might have a nav 3275 02:08:22,079 --> 02:08:24,880 area in the footer footers often have 3276 02:08:24,880 --> 02:08:26,880 links to other areas 3277 02:08:26,880 --> 02:08:28,880 of a website now we've only got a couple 3278 02:08:28,880 --> 02:08:31,040 of links in our footer and one goes back 3279 02:08:31,040 --> 02:08:33,040 to the top and the other does go to our 3280 02:08:33,040 --> 02:08:35,840 about page however it's not a grouping 3281 02:08:35,840 --> 02:08:37,920 of links where we would organize if we 3282 02:08:37,920 --> 02:08:39,760 had several other things here i might 3283 02:08:39,760 --> 02:08:42,639 consider a nav and if you do have more 3284 02:08:42,639 --> 02:08:45,199 than one nav element per page it's 3285 02:08:45,199 --> 02:08:47,840 important that they are labeled so 3286 02:08:47,840 --> 02:08:51,440 assistive technology knows which nav is 3287 02:08:51,440 --> 02:08:54,480 which and here we can do that with an 3288 02:08:54,480 --> 02:08:56,880 attribute called aria 3289 02:08:56,880 --> 02:08:57,920 label 3290 02:08:57,920 --> 02:08:59,599 and then we can set it equal to 3291 02:08:59,599 --> 02:09:01,679 something that clearly says what it is 3292 02:09:01,679 --> 02:09:03,760 like primary 3293 02:09:03,760 --> 02:09:06,960 navigation and now we have labeled 3294 02:09:06,960 --> 02:09:10,079 our nav as the primary navigation area 3295 02:09:10,079 --> 02:09:12,719 if you did include a heading in the nav 3296 02:09:12,719 --> 02:09:15,440 element which is not required but if you 3297 02:09:15,440 --> 02:09:18,400 did you could link to that so you could 3298 02:09:18,400 --> 02:09:20,400 have an h2 here 3299 02:09:20,400 --> 02:09:23,360 and then in the h2 we might put 3300 02:09:23,360 --> 02:09:25,760 primary 3301 02:09:25,760 --> 02:09:29,040 navigation if i can spell it there we go 3302 02:09:29,040 --> 02:09:32,880 and now let's give this an id 3303 02:09:32,880 --> 02:09:35,280 and here we'll give the id 3304 02:09:35,280 --> 02:09:38,880 the same value primary 3305 02:09:38,960 --> 02:09:42,639 navigation and then here instead of arya 3306 02:09:42,639 --> 02:09:45,520 we would say aria 3307 02:09:45,520 --> 02:09:48,480 labeled by is the correct attribute here 3308 02:09:48,480 --> 02:09:50,800 now we're looking at 3309 02:09:50,800 --> 02:09:53,679 our primary navigation value 3310 02:09:53,679 --> 02:09:55,840 and it's saying hey it's labeled by this 3311 02:09:55,840 --> 02:09:58,880 value that's in the h2 so you can link 3312 02:09:58,880 --> 02:10:01,599 these together with an aria labeled by 3313 02:10:01,599 --> 02:10:03,840 pointing back to the id 3314 02:10:03,840 --> 02:10:06,320 of a heading however since we're not 3315 02:10:06,320 --> 02:10:09,360 going to have an h2 in our nav 3316 02:10:09,360 --> 02:10:11,599 i'll go ahead and remove that and you 3317 02:10:11,599 --> 02:10:15,040 can just choose the aria label attribute 3318 02:10:15,040 --> 02:10:17,360 and set that equal to primary navigation 3319 02:10:17,360 --> 02:10:20,079 which is equally accessible to screen 3320 02:10:20,079 --> 02:10:22,159 readers and other technologies okay 3321 02:10:22,159 --> 02:10:25,040 let's scroll down into this main area 3322 02:10:25,040 --> 02:10:29,280 previously we broke our topics html and 3323 02:10:29,280 --> 02:10:30,400 vacation 3324 02:10:30,400 --> 02:10:33,360 into sections which are semantic html 3325 02:10:33,360 --> 02:10:36,639 tags however there is a more appropriate 3326 02:10:36,639 --> 02:10:38,960 tag now that we kind of have an idea of 3327 02:10:38,960 --> 02:10:41,599 how our page is laid out because these 3328 02:10:41,599 --> 02:10:42,480 are 3329 02:10:42,480 --> 02:10:44,239 areas that could be 3330 02:10:44,239 --> 02:10:46,239 on their own maybe they would each have 3331 02:10:46,239 --> 02:10:48,960 their own page but much like a social 3332 02:10:48,960 --> 02:10:52,719 media post or a blog post some type of 3333 02:10:52,719 --> 02:10:55,360 article you might think there is an 3334 02:10:55,360 --> 02:10:57,520 article element so i have highlighted 3335 02:10:57,520 --> 02:10:59,280 this section and i'm going to type 3336 02:10:59,280 --> 02:11:01,840 article instead and i believe we'll find 3337 02:11:01,840 --> 02:11:04,400 that vs code changes our closing tag 3338 02:11:04,400 --> 02:11:06,159 immediately yes and it was already 3339 02:11:06,159 --> 02:11:08,320 changed to article so 3340 02:11:08,320 --> 02:11:10,400 instead of a section let's call this an 3341 02:11:10,400 --> 02:11:13,040 article because it clearly has its own 3342 02:11:13,040 --> 02:11:15,840 topic and now let's do the same for our 3343 02:11:15,840 --> 02:11:18,079 other section based on vacation so we 3344 02:11:18,079 --> 02:11:19,840 can highlight it 3345 02:11:19,840 --> 02:11:22,320 change it to article and we'll verify 3346 02:11:22,320 --> 02:11:26,079 that the closing tag is also article 3347 02:11:26,079 --> 02:11:28,880 and yes it is right here so now we have 3348 02:11:28,880 --> 02:11:31,040 two articles instead of sections now 3349 02:11:31,040 --> 02:11:33,679 there is sometimes a debate about which 3350 02:11:33,679 --> 02:11:35,520 should be used and it's really not 3351 02:11:35,520 --> 02:11:38,960 clearly defined if article or section is 3352 02:11:38,960 --> 02:11:41,760 the proper choice they would both pass a 3353 02:11:41,760 --> 02:11:44,880 validator check so really the way i look 3354 02:11:44,880 --> 02:11:47,599 at it is an article has a clear topic 3355 02:11:47,599 --> 02:11:49,760 where a section is more generic you 3356 02:11:49,760 --> 02:11:51,520 might use a section 3357 02:11:51,520 --> 02:11:54,320 just to actually create a little section 3358 02:11:54,320 --> 02:11:57,040 in your code whereas an article has a 3359 02:11:57,040 --> 02:11:59,840 clear topic that the area is about so 3360 02:11:59,840 --> 02:12:02,079 now inside of the article we could 3361 02:12:02,079 --> 02:12:05,040 create other articles but now i want to 3362 02:12:05,040 --> 02:12:08,000 go ahead and add a couple of sections 3363 02:12:08,000 --> 02:12:10,639 inside of our html article so as our 3364 02:12:10,639 --> 02:12:12,560 article begins we've got the heading 3365 02:12:12,560 --> 02:12:14,800 which is h2 and it says i'm ready to 3366 02:12:14,800 --> 02:12:16,960 learn html and then we have a paragraph 3367 02:12:16,960 --> 02:12:18,880 saying this is my first web page that's 3368 02:12:18,880 --> 02:12:21,840 fine let's go ahead and add the section 3369 02:12:21,840 --> 02:12:24,079 after that point 3370 02:12:24,079 --> 02:12:26,560 and now once again i'll press tab to get 3371 02:12:26,560 --> 02:12:28,800 both the opening and closing tags i'm 3372 02:12:28,800 --> 02:12:30,639 going to highlight the closing tag 3373 02:12:30,639 --> 02:12:33,119 control x to copy it i'm going to bring 3374 02:12:33,119 --> 02:12:35,520 it down here to just underneath the 3375 02:12:35,520 --> 02:12:37,599 figure and that's where we'll end this 3376 02:12:37,599 --> 02:12:40,320 first section i also want to go ahead 3377 02:12:40,320 --> 02:12:43,760 and add a subheading here which is an h3 3378 02:12:43,760 --> 02:12:46,159 and i'll just make this html5 as that's 3379 02:12:46,159 --> 02:12:49,199 what the section is about and now our 3380 02:12:49,199 --> 02:12:52,960 section has the subheading html5 it has 3381 02:12:52,960 --> 02:12:56,159 the html5 logo and it has our figure 3382 02:12:56,159 --> 02:12:59,040 that has our code sample of html5 that 3383 02:12:59,040 --> 02:13:00,719 all seems related 3384 02:13:00,719 --> 02:13:03,199 now let's add another section and this 3385 02:13:03,199 --> 02:13:06,880 is the my daily schedule section so 3386 02:13:06,880 --> 02:13:09,599 lowercase again is what i prefer 3387 02:13:09,599 --> 02:13:11,920 and so we'll have section and the 3388 02:13:11,920 --> 02:13:14,880 closing section tag i will cut that and 3389 02:13:14,880 --> 02:13:16,639 i'll put it here at the end of the list 3390 02:13:16,639 --> 02:13:19,280 before the closing article tag so now we 3391 02:13:19,280 --> 02:13:22,159 have two clear sections inside of our 3392 02:13:22,159 --> 02:13:24,560 article and they both have headings that 3393 02:13:24,560 --> 02:13:27,119 are h3 so we're at the third tier of the 3394 02:13:27,119 --> 02:13:28,880 heading with the h1 3395 02:13:28,880 --> 02:13:30,719 being the heading for the overall page 3396 02:13:30,719 --> 02:13:33,440 the h2 being the heading for the article 3397 02:13:33,440 --> 02:13:36,000 and then the h3s being the headings for 3398 02:13:36,000 --> 02:13:38,480 the nested sections within the article 3399 02:13:38,480 --> 02:13:40,719 so we're keeping our hierarchy in place 3400 02:13:40,719 --> 02:13:43,840 underneath the list we can add another 3401 02:13:43,840 --> 02:13:46,239 element and just a little more content 3402 02:13:46,239 --> 02:13:48,880 let's call this an aside this is a 3403 02:13:48,880 --> 02:13:51,280 semantic element and if you think about 3404 02:13:51,280 --> 02:13:53,599 how a web page is laid out often times 3405 02:13:53,599 --> 02:13:56,159 you think of an aside as the sidebar to 3406 02:13:56,159 --> 02:13:58,880 the page but it could also just be 3407 02:13:58,880 --> 02:14:01,920 another section of complementary text 3408 02:14:01,920 --> 02:14:03,280 that is not 3409 02:14:03,280 --> 02:14:05,520 as important as what's in the main 3410 02:14:05,520 --> 02:14:07,760 section or article that you are putting 3411 02:14:07,760 --> 02:14:09,840 it inside of and that's what we'll do 3412 02:14:09,840 --> 02:14:12,639 here and then i want to use some other 3413 02:14:12,639 --> 02:14:15,119 semantic elements just to demonstrate 3414 02:14:15,119 --> 02:14:17,679 how they work so now i'm going to add a 3415 02:14:17,679 --> 02:14:21,040 detail semantic element and inside a 3416 02:14:21,040 --> 02:14:24,000 details element you want to add a 3417 02:14:24,000 --> 02:14:26,400 summary element now the summary if this 3418 02:14:26,400 --> 02:14:28,719 was a product we might just put warranty 3419 02:14:28,719 --> 02:14:31,440 information in here as the summary here 3420 02:14:31,440 --> 02:14:33,040 i'm going to put something that's more 3421 02:14:33,040 --> 02:14:36,320 like a question and it will display how 3422 02:14:36,320 --> 02:14:38,560 the details and summary work so i'm 3423 02:14:38,560 --> 02:14:42,159 going to say guess the number 3424 02:14:42,159 --> 02:14:44,400 of hours 3425 02:14:44,400 --> 02:14:46,159 i code 3426 02:14:46,159 --> 02:14:49,040 per day as our summary now underneath we 3427 02:14:49,040 --> 02:14:51,679 can put the answer to this question and 3428 02:14:51,679 --> 02:14:56,000 now i'm going to put i start at 3429 02:14:56,000 --> 02:14:59,599 8am and i write 3430 02:14:59,599 --> 02:15:01,360 code for 3431 02:15:01,360 --> 02:15:04,719 let's say three hours 3432 02:15:04,719 --> 02:15:06,960 every morning 3433 02:15:06,960 --> 02:15:09,679 and we can save that 3434 02:15:09,679 --> 02:15:11,360 i'll scroll up so we have it up here 3435 02:15:11,360 --> 02:15:13,119 towards the middle of our page 3436 02:15:13,119 --> 02:15:15,520 and now let's scroll up here and let's 3437 02:15:15,520 --> 02:15:18,079 look at what we have on the page because 3438 02:15:18,079 --> 02:15:20,159 the rest of our semantic changes really 3439 02:15:20,159 --> 02:15:22,880 didn't change the appearance here 3440 02:15:22,880 --> 02:15:25,840 but this where we added this new content 3441 02:15:25,840 --> 02:15:28,320 notice we're not seeing this paragraph 3442 02:15:28,320 --> 02:15:30,000 at this point we just see guess the 3443 02:15:30,000 --> 02:15:31,920 number of hours i code per day but it 3444 02:15:31,920 --> 02:15:34,159 has this little arrow next to it if we 3445 02:15:34,159 --> 02:15:35,040 click 3446 02:15:35,040 --> 02:15:36,480 on this 3447 02:15:36,480 --> 02:15:39,280 then we see the answer 3448 02:15:39,280 --> 02:15:41,679 so that's a nice little addition that 3449 02:15:41,679 --> 02:15:45,119 this html element adds and again these 3450 02:15:45,119 --> 02:15:48,000 are all semantic elements so the aside 3451 02:15:48,000 --> 02:15:50,079 has some meaning that it's complementary 3452 02:15:50,079 --> 02:15:52,880 text it's not as important as what's in 3453 02:15:52,880 --> 02:15:54,560 the rest of the article 3454 02:15:54,560 --> 02:15:56,800 the details and the summary work 3455 02:15:56,800 --> 02:15:59,520 together so this could once again 3456 02:15:59,520 --> 02:16:01,520 provide details about a product say 3457 02:16:01,520 --> 02:16:03,599 warranty information something else a 3458 02:16:03,599 --> 02:16:06,159 return policy whatever but you could 3459 02:16:06,159 --> 02:16:08,560 also use it kind of as a quiz here where 3460 02:16:08,560 --> 02:16:11,199 you have a question and an answer let's 3461 02:16:11,199 --> 02:16:13,119 go ahead and add just a couple of more 3462 02:16:13,119 --> 02:16:15,840 semantic elements to this one is what we 3463 02:16:15,840 --> 02:16:17,520 can do with a highlighter just like you 3464 02:16:17,520 --> 02:16:19,199 might use a highlighter on a piece of 3465 02:16:19,199 --> 02:16:22,400 paper there is an element called mark so 3466 02:16:22,400 --> 02:16:24,560 i'm going to mark what i want to 3467 02:16:24,560 --> 02:16:26,560 highlight here in the text 3468 02:16:26,560 --> 02:16:29,040 and by including it in the text you know 3469 02:16:29,040 --> 02:16:31,760 it's an inline element and not a block 3470 02:16:31,760 --> 02:16:33,040 element 3471 02:16:33,040 --> 02:16:34,719 so now if i save that we have 3472 02:16:34,719 --> 02:16:35,920 highlighted 3473 02:16:35,920 --> 02:16:37,599 number of hours 3474 02:16:37,599 --> 02:16:40,319 now inside the answer we're looking at 3475 02:16:40,319 --> 02:16:42,960 some time here we have 8 am and we also 3476 02:16:42,960 --> 02:16:46,719 have a duration of 3 hours we can add 3477 02:16:46,719 --> 02:16:50,080 some meaning to that in the text as well 3478 02:16:50,080 --> 02:16:52,319 and we can provide a time element then 3479 02:16:52,319 --> 02:16:54,319 we need a date 3480 02:16:54,319 --> 02:16:56,080 time attribute 3481 02:16:56,080 --> 02:16:58,559 and for the date time attribute value i 3482 02:16:58,559 --> 02:17:01,359 want to put in the actual hours it 3483 02:17:01,359 --> 02:17:03,439 accepts several values so this would be 3484 02:17:03,439 --> 02:17:06,880 o 800 on a 24 hour clock 3485 02:17:06,880 --> 02:17:08,960 and now let's put the closing time 3486 02:17:08,960 --> 02:17:11,920 element after the 8 am here 3487 02:17:11,920 --> 02:17:14,800 and notice if i save this right now 3488 02:17:14,800 --> 02:17:17,519 and show this it does not change what 8 3489 02:17:17,519 --> 02:17:19,679 am looks like at all but once again it 3490 02:17:19,679 --> 02:17:22,559 provides meaning in our html for 3491 02:17:22,559 --> 02:17:24,479 technologies that are reading it 3492 02:17:24,479 --> 02:17:26,880 especially those assistive technologies 3493 02:17:26,880 --> 02:17:29,359 but it could also provide some meaning 3494 02:17:29,359 --> 02:17:32,319 for the browser itself now also it says 3495 02:17:32,319 --> 02:17:34,479 as i write code for three hours we can 3496 02:17:34,479 --> 02:17:37,120 provide a time element for the duration 3497 02:17:37,120 --> 02:17:39,519 too so we have time once again with the 3498 02:17:39,519 --> 02:17:42,319 date time attribute and now we'll put in 3499 02:17:42,319 --> 02:17:44,719 a different value because there is a 3500 02:17:44,719 --> 02:17:47,760 value for duration i'm going to put this 3501 02:17:47,760 --> 02:17:49,040 closing 3502 02:17:49,040 --> 02:17:51,120 tag at the end of the three hours now 3503 02:17:51,120 --> 02:17:53,120 let's look at the value for duration we 3504 02:17:53,120 --> 02:17:54,840 would put in 3505 02:17:54,840 --> 02:17:58,559 pt3h and remember there is a link in all 3506 02:17:58,559 --> 02:18:01,679 of the html resources that i link to in 3507 02:18:01,679 --> 02:18:03,920 the description there is a link that 3508 02:18:03,920 --> 02:18:05,840 shows all of the html elements so you 3509 02:18:05,840 --> 02:18:08,639 can look up for example the time element 3510 02:18:08,639 --> 02:18:10,639 on the mozilla developer network that's 3511 02:18:10,639 --> 02:18:13,359 the mdn site and you can look at all the 3512 02:18:13,359 --> 02:18:15,760 values that could be accepted for the 3513 02:18:15,760 --> 02:18:18,880 date time attribute okay let's save this 3514 02:18:18,880 --> 02:18:21,280 and move down to our vacation area where 3515 02:18:21,280 --> 02:18:24,000 we also want to add two sections i think 3516 02:18:24,000 --> 02:18:26,319 these are clearly defined already where 3517 02:18:26,319 --> 02:18:28,960 we have sub headings for places i'd like 3518 02:18:28,960 --> 02:18:31,120 to visit and really we have a subheading 3519 02:18:31,120 --> 02:18:33,040 for places i don't want to visit i 3520 02:18:33,040 --> 02:18:35,840 believe so here let's go ahead and add a 3521 02:18:35,840 --> 02:18:39,519 section again lowercase 3522 02:18:39,519 --> 02:18:42,319 and i'll take that closing section tag 3523 02:18:42,319 --> 02:18:45,840 highlight it ctrl x to cut i'll scroll 3524 02:18:45,840 --> 02:18:47,280 down here 3525 02:18:47,280 --> 02:18:50,000 and we'll add that before the next 3526 02:18:50,000 --> 02:18:52,319 subheading so 3527 02:18:52,319 --> 02:18:55,040 there we go and save that and of course 3528 02:18:55,040 --> 02:18:56,880 it reformats again 3529 02:18:56,880 --> 02:18:59,679 now i'll add a section element 3530 02:18:59,679 --> 02:19:02,319 and put the closing after we finish our 3531 02:19:02,319 --> 02:19:05,439 places i want to avoid section 3532 02:19:05,439 --> 02:19:06,800 and that would be at the end of our 3533 02:19:06,800 --> 02:19:08,880 description list 3534 02:19:08,880 --> 02:19:10,719 and we can save that now we've got two 3535 02:19:10,719 --> 02:19:13,840 sections inside of this article as well 3536 02:19:13,840 --> 02:19:16,319 and really once again it doesn't change 3537 02:19:16,319 --> 02:19:18,960 the look but it does change how the 3538 02:19:18,960 --> 02:19:21,439 browser interprets and it definitely 3539 02:19:21,439 --> 02:19:24,639 adds a benefit for assistive technology 3540 02:19:24,639 --> 02:19:26,319 now before we look at our document 3541 02:19:26,319 --> 02:19:28,080 outline with these changes i want to 3542 02:19:28,080 --> 02:19:29,920 quickly discuss and i'll just do it here 3543 02:19:29,920 --> 02:19:31,519 by this comment where it says add more 3544 02:19:31,519 --> 02:19:33,920 places two different elements that you 3545 02:19:33,920 --> 02:19:36,880 want to avoid as you're learning html 3546 02:19:36,880 --> 02:19:38,479 and then later on 3547 02:19:38,479 --> 02:19:41,519 you can use them as we possibly get into 3548 02:19:41,519 --> 02:19:44,880 them with css but there is a div in an 3549 02:19:44,880 --> 02:19:47,439 older html code you will see divs 3550 02:19:47,439 --> 02:19:49,920 everywhere sometimes you still do 3551 02:19:49,920 --> 02:19:51,760 when those people that have been using 3552 02:19:51,760 --> 02:19:53,840 divs are used to still writing them and 3553 02:19:53,840 --> 02:19:55,840 they just continue what they've been 3554 02:19:55,840 --> 02:19:58,640 doing in the past however there is no 3555 02:19:58,640 --> 02:20:01,920 semantic meaning to a div think of a div 3556 02:20:01,920 --> 02:20:05,040 much like a section without the semantic 3557 02:20:05,040 --> 02:20:08,479 meaning it's just stands for divider and 3558 02:20:08,479 --> 02:20:10,640 really you can put them anywhere but if 3559 02:20:10,640 --> 02:20:11,840 you do 3560 02:20:11,840 --> 02:20:13,760 you really have to do a lot of work to 3561 02:20:13,760 --> 02:20:15,439 get them to convey meaning you have to 3562 02:20:15,439 --> 02:20:19,040 add additional attributes that help 3563 02:20:19,040 --> 02:20:21,439 assistive technology interpret these 3564 02:20:21,439 --> 02:20:23,840 elements because they have no meaning as 3565 02:20:23,840 --> 02:20:26,720 is they are block elements so 3566 02:20:26,720 --> 02:20:29,760 a very similar element that is an inline 3567 02:20:29,760 --> 02:20:32,240 element if we just wanted to wrap a word 3568 02:20:32,240 --> 02:20:35,359 or two in a paragraph in an element 3569 02:20:35,359 --> 02:20:36,560 is span 3570 02:20:36,560 --> 02:20:38,960 we'll definitely use some spans as we 3571 02:20:38,960 --> 02:20:42,479 learn css however once again they have 3572 02:20:42,479 --> 02:20:45,840 no meaning whatsoever by themselves they 3573 02:20:45,840 --> 02:20:49,280 don't change or add any value to your 3574 02:20:49,280 --> 02:20:52,000 code and we would use them possibly to 3575 02:20:52,000 --> 02:20:55,359 apply some css styling to some words 3576 02:20:55,359 --> 02:20:57,600 that we would highlight around span so 3577 02:20:57,600 --> 02:21:00,240 we really want to avoid both of these 3578 02:21:00,240 --> 02:21:03,280 elements as you learn html really work 3579 02:21:03,280 --> 02:21:06,640 on using semantic elements and then 3580 02:21:06,640 --> 02:21:08,640 when you understand what semantic 3581 02:21:08,640 --> 02:21:11,040 elements are and how to use them and 3582 02:21:11,040 --> 02:21:13,520 then occasionally when just no semantic 3583 02:21:13,520 --> 02:21:16,640 element is the correct choice 3584 02:21:16,640 --> 02:21:18,880 that is the time that we actually should 3585 02:21:18,880 --> 02:21:20,960 use divs and spans so i'm going to 3586 02:21:20,960 --> 02:21:22,800 delete those for now 3587 02:21:22,800 --> 02:21:25,280 and save our document and now i'll just 3588 02:21:25,280 --> 02:21:27,600 scroll our code up to the very top and 3589 02:21:27,600 --> 02:21:30,560 i'm going to do the same for our page 3590 02:21:30,560 --> 02:21:33,040 over here on the right now what i want 3591 02:21:33,040 --> 02:21:34,800 to bring your attention to i'm going to 3592 02:21:34,800 --> 02:21:36,960 maximize the browser 3593 02:21:36,960 --> 02:21:38,560 and we're going to go to the chrome web 3594 02:21:38,560 --> 02:21:41,439 store and look at an extension we can 3595 02:21:41,439 --> 02:21:45,120 add and that extension is html5 3596 02:21:45,120 --> 02:21:47,680 outliner so search for that 3597 02:21:47,680 --> 02:21:50,479 you'll find html5 outliner you can click 3598 02:21:50,479 --> 02:21:52,800 on that and i've got it installed 3599 02:21:52,800 --> 02:21:55,520 already so mine says remove from chrome 3600 02:21:55,520 --> 02:21:58,160 yours would probably say install here 3601 02:21:58,160 --> 02:22:00,399 and it will look at our semantic 3602 02:22:00,399 --> 02:22:03,280 elements and make an outline of our page 3603 02:22:03,280 --> 02:22:05,680 so let's check that out okay i'm going 3604 02:22:05,680 --> 02:22:07,600 to bring our page back down to the size 3605 02:22:07,600 --> 02:22:09,600 we had it 3606 02:22:09,600 --> 02:22:11,600 down here to the bottom now once you've 3607 02:22:11,600 --> 02:22:13,280 got that extension installed you may 3608 02:22:13,280 --> 02:22:16,000 have to restart your version of chrome 3609 02:22:16,000 --> 02:22:17,840 to get it to work but here we go click 3610 02:22:17,840 --> 02:22:21,200 on html5 outliner and look we have got 3611 02:22:21,200 --> 02:22:24,319 an outline of our current page so we've 3612 02:22:24,319 --> 02:22:26,560 got our heading hierarchy correct with 3613 02:22:26,560 --> 02:22:29,760 my goals for the year an untitled nav 3614 02:22:29,760 --> 02:22:32,000 that's okay we didn't put a heading in 3615 02:22:32,000 --> 02:22:33,600 there like i said we could have put an 3616 02:22:33,600 --> 02:22:35,920 h2 it's just saying we didn't have one 3617 02:22:35,920 --> 02:22:38,479 but a nav doesn't require one but 3618 02:22:38,479 --> 02:22:40,479 remember if you do have more than one 3619 02:22:40,479 --> 02:22:43,600 nav element per page then you do need to 3620 02:22:43,600 --> 02:22:45,920 at least appropriately label that for 3621 02:22:45,920 --> 02:22:48,560 assistive technology okay now we've got 3622 02:22:48,560 --> 02:22:51,120 another section this is our article i'm 3623 02:22:51,120 --> 02:22:53,760 ready to learn html and that's our h2 3624 02:22:53,760 --> 02:22:54,720 heading 3625 02:22:54,720 --> 02:22:56,960 inside the article remember we have two 3626 02:22:56,960 --> 02:22:59,760 sections we have the html5 and my daily 3627 02:22:59,760 --> 02:23:02,560 schedule and then we have an aside and 3628 02:23:02,560 --> 02:23:06,800 this aside was inside the second section 3629 02:23:06,800 --> 02:23:09,120 it's also untitled which is okay and a 3630 02:23:09,120 --> 02:23:13,200 side does not have to have a heading but 3631 02:23:13,200 --> 02:23:15,520 it just notes that as it's untitled here 3632 02:23:15,520 --> 02:23:17,760 if you added a heading inside of the 3633 02:23:17,760 --> 02:23:21,040 aside say an h4 then it would of course 3634 02:23:21,040 --> 02:23:23,439 appear there now we've got our other 3635 02:23:23,439 --> 02:23:25,359 section this our other article actually 3636 02:23:25,359 --> 02:23:27,680 this i am also planning a vacation that 3637 02:23:27,680 --> 02:23:29,040 was an h2 3638 02:23:29,040 --> 02:23:31,439 and then these are h3 headings so you 3639 02:23:31,439 --> 02:23:33,520 can see how important the headings are 3640 02:23:33,520 --> 02:23:35,600 the heading hierarchy if you don't get 3641 02:23:35,600 --> 02:23:39,040 any other semantics correct in your page 3642 02:23:39,040 --> 02:23:40,560 that's the one thing to really 3643 02:23:40,560 --> 02:23:42,800 understand is the heading hierarchy of a 3644 02:23:42,800 --> 02:23:44,960 page but all of these other semantic 3645 02:23:44,960 --> 02:23:47,439 elements definitely help outline your 3646 02:23:47,439 --> 02:23:50,720 page and add meaning avoiding these is 3647 02:23:50,720 --> 02:23:52,880 the biggest mistake you can possibly 3648 02:23:52,880 --> 02:23:55,600 make as you are constructing an html 3649 02:23:55,600 --> 02:23:57,520 page okay now that we've looked at our 3650 02:23:57,520 --> 02:24:00,240 outline let's once again validate our 3651 02:24:00,240 --> 02:24:02,399 page i'll pull this over just so we see 3652 02:24:02,399 --> 02:24:04,479 a little bit better i'll click 3653 02:24:04,479 --> 02:24:08,800 file upload we're at validator.w3.org 3654 02:24:08,800 --> 02:24:11,280 and i'm going to click choose file i 3655 02:24:11,280 --> 02:24:12,960 have to make sure i'm in the right 3656 02:24:12,960 --> 02:24:16,560 lesson folder i am not so i need to go 3657 02:24:16,560 --> 02:24:19,280 into html course 3658 02:24:19,280 --> 02:24:20,760 lesson 7 3659 02:24:20,760 --> 02:24:23,720 index.html just make sure you upload the 3660 02:24:23,720 --> 02:24:26,080 index.html you were working on for this 3661 02:24:26,080 --> 02:24:27,040 lesson 3662 02:24:27,040 --> 02:24:28,960 click check and we'll see if we have any 3663 02:24:28,960 --> 02:24:31,280 problems if you have a problem it will 3664 02:24:31,280 --> 02:24:33,280 show here it should tell you what line 3665 02:24:33,280 --> 02:24:35,120 and what the problem is but we're good 3666 02:24:35,120 --> 02:24:37,280 to go document checking completed no 3667 02:24:37,280 --> 02:24:40,560 errors or warnings to show 3668 02:24:40,560 --> 02:24:43,280 let's add a table to our web page tables 3669 02:24:43,280 --> 02:24:45,439 structure tabular data that is data 3670 02:24:45,439 --> 02:24:47,280 that's made up of rows and columns we 3671 02:24:47,280 --> 02:24:49,520 often see this with schedules 3672 02:24:49,520 --> 02:24:51,760 statistics in sports and many different 3673 02:24:51,760 --> 02:24:53,439 types of data flight schedules for 3674 02:24:53,439 --> 02:24:54,479 example 3675 02:24:54,479 --> 02:24:57,359 and what we don't want to use tables for 3676 02:24:57,359 --> 02:24:59,439 are an entire page layout back in the 3677 02:24:59,439 --> 02:25:02,000 90s and early 2000s it was very common 3678 02:25:02,000 --> 02:25:04,000 to use a table to structure your entire 3679 02:25:04,000 --> 02:25:06,560 html page so you may see some old code 3680 02:25:06,560 --> 02:25:08,880 that does that but we do not want to do 3681 02:25:08,880 --> 02:25:11,760 that we want to stick with semantic html 3682 02:25:11,760 --> 02:25:14,000 and in the future you'll learn css and 3683 02:25:14,000 --> 02:25:16,319 we'll design our page layouts with 3684 02:25:16,319 --> 02:25:20,240 semantic html and css not tables okay 3685 02:25:20,240 --> 02:25:22,160 tables do really need a little bit of 3686 02:25:22,160 --> 02:25:26,000 css to look kind of accurate however we 3687 02:25:26,000 --> 02:25:28,800 can start creating a table without css 3688 02:25:28,800 --> 02:25:30,720 so let's do that now i'm going to scroll 3689 02:25:30,720 --> 02:25:34,160 down in our html file and we want to get 3690 02:25:34,160 --> 02:25:35,920 to this section that says my daily 3691 02:25:35,920 --> 02:25:38,399 schedule the subsection and then we 3692 02:25:38,399 --> 02:25:40,640 describe the daily schedule a little bit 3693 02:25:40,640 --> 02:25:42,479 and we even have the aside here that 3694 02:25:42,479 --> 02:25:44,800 says guess the number of hours i code 3695 02:25:44,800 --> 02:25:47,200 per day so we want to put some of this 3696 02:25:47,200 --> 02:25:49,760 in a chart or a table if we will not 3697 02:25:49,760 --> 02:25:52,479 really a chart i guess so 3698 02:25:52,479 --> 02:25:55,120 here we go with a line break 3699 02:25:55,120 --> 02:25:57,840 and underneath this break we'll put a 3700 02:25:57,840 --> 02:26:00,240 table element 3701 02:26:00,240 --> 02:26:02,000 inside the table element i want to 3702 02:26:02,000 --> 02:26:03,600 scroll up just a little bit so we can 3703 02:26:03,600 --> 02:26:05,680 see this better inside the table element 3704 02:26:05,680 --> 02:26:07,920 i'm going to type a tr element which 3705 02:26:07,920 --> 02:26:09,760 stands for table row 3706 02:26:09,760 --> 02:26:12,080 and inside the table row we put our data 3707 02:26:12,080 --> 02:26:15,120 cells and those use td elements which 3708 02:26:15,120 --> 02:26:17,600 stands for table data okay the first 3709 02:26:17,600 --> 02:26:20,080 thing i'm going to do now is start a 3710 02:26:20,080 --> 02:26:23,280 time element which is going to have a 3711 02:26:23,280 --> 02:26:24,160 date 3712 02:26:24,160 --> 02:26:25,760 time attribute 3713 02:26:25,760 --> 02:26:28,800 we'll set that equal to 8 am 3714 02:26:28,800 --> 02:26:31,600 and inside this we'll put 8 am 3715 02:26:31,600 --> 02:26:34,000 notice i've pressed alt z already which 3716 02:26:34,000 --> 02:26:36,160 has my code wrapping down to the next 3717 02:26:36,160 --> 02:26:38,479 line if it would extend further so if 3718 02:26:38,479 --> 02:26:40,800 your code is extending outside of the 3719 02:26:40,800 --> 02:26:42,479 window here in visual studio code just 3720 02:26:42,479 --> 02:26:44,399 press alt z and it will wrap to the next 3721 02:26:44,399 --> 02:26:45,200 line 3722 02:26:45,200 --> 02:26:47,120 i'll put a hyphen here 3723 02:26:47,120 --> 02:26:48,880 and then another time element with a 3724 02:26:48,880 --> 02:26:51,920 date time attribute 3725 02:26:51,920 --> 02:26:54,560 i'm going to set that equal to 3726 02:26:54,560 --> 02:26:57,760 11 am and i'll put 11 am here so now we 3727 02:26:57,760 --> 02:27:00,640 have 8 am to 11 am and our first data 3728 02:27:00,640 --> 02:27:01,680 cell 3729 02:27:01,680 --> 02:27:03,760 and then i'll put the activity in the 3730 02:27:03,760 --> 02:27:06,240 next data cell and here we'll put 3731 02:27:06,240 --> 02:27:08,160 write code 3732 02:27:08,160 --> 02:27:11,840 now i'm going to highlight this full row 3733 02:27:11,840 --> 02:27:13,680 and then press shift alt and the down 3734 02:27:13,680 --> 02:27:16,319 arrow and it will copy that down so i've 3735 02:27:16,319 --> 02:27:18,399 created another row quickly so we can 3736 02:27:18,399 --> 02:27:19,200 just 3737 02:27:19,200 --> 02:27:21,359 edit some of the information here so now 3738 02:27:21,359 --> 02:27:24,960 i'll start at 11 am 3739 02:27:25,040 --> 02:27:28,240 and then i'll switch the next one to 12 3740 02:27:28,240 --> 02:27:31,040 pm 3741 02:27:31,040 --> 02:27:34,080 and so there's our one hour for lunch so 3742 02:27:34,080 --> 02:27:37,200 here we can put 3743 02:27:37,439 --> 02:27:40,000 eat lunch now let's do this one more 3744 02:27:40,000 --> 02:27:43,040 time or i'll highlight the row 3745 02:27:43,040 --> 02:27:44,640 and then press shift alt and the down 3746 02:27:44,640 --> 02:27:45,760 arrow 3747 02:27:45,760 --> 02:27:47,760 and now we'll have our afternoon time 3748 02:27:47,760 --> 02:27:50,399 here so this is a 24 hour clock that we 3749 02:27:50,399 --> 02:27:52,000 need to be aware of as well so we'll 3750 02:27:52,000 --> 02:27:54,160 start at 12 pm 3751 02:27:54,160 --> 02:27:57,040 and now this will be 17 3752 02:27:57,040 --> 02:28:00,479 and this would be 5 p.m over here 3753 02:28:00,479 --> 02:28:03,840 so now from 12 p.m to 5 p.m we can put 3754 02:28:03,840 --> 02:28:06,399 in another activity and i'll just say 3755 02:28:06,399 --> 02:28:08,720 study for 3756 02:28:08,720 --> 02:28:10,880 other courses 3757 02:28:10,880 --> 02:28:12,960 and we'll save now let's scroll down 3758 02:28:12,960 --> 02:28:14,960 over here in our html and look at the 3759 02:28:14,960 --> 02:28:18,560 table we have applied no css so we can 3760 02:28:18,560 --> 02:28:20,560 see the columns with the times on the 3761 02:28:20,560 --> 02:28:23,600 left and the activities on the right but 3762 02:28:23,600 --> 02:28:25,680 it is a little hard to make out that 3763 02:28:25,680 --> 02:28:28,640 this is a table so i want to add just a 3764 02:28:28,640 --> 02:28:31,600 little bit of css to help our page out 3765 02:28:31,600 --> 02:28:34,160 i'm going to click on the css file that 3766 02:28:34,160 --> 02:28:36,800 we've linked to our project scroll down 3767 02:28:36,800 --> 02:28:38,960 to the bottom 3768 02:28:38,960 --> 02:28:41,200 and just paste in just a little bit of 3769 02:28:41,200 --> 02:28:43,439 css for now this will be available in 3770 02:28:43,439 --> 02:28:45,600 the files and once i save that you 3771 02:28:45,600 --> 02:28:47,600 quickly see how it applies to the table 3772 02:28:47,600 --> 02:28:50,399 this looks much more like a table 8am to 3773 02:28:50,399 --> 02:28:53,359 11am write code and we can see 3774 02:28:53,359 --> 02:28:54,399 clearly 3775 02:28:54,399 --> 02:28:57,439 each time block and each activity i'm 3776 02:28:57,439 --> 02:28:59,840 going to go back to the html file but i 3777 02:28:59,840 --> 02:29:01,840 also want to expand the browser to 3778 02:29:01,840 --> 02:29:03,520 highlight something that happens here in 3779 02:29:03,520 --> 02:29:05,359 the code i'm going to right click on the 3780 02:29:05,359 --> 02:29:08,319 table and click inspect this will open 3781 02:29:08,319 --> 02:29:09,920 dev tools and it should be showing the 3782 02:29:09,920 --> 02:29:12,960 elements now if we highlight the table 3783 02:29:12,960 --> 02:29:15,040 over here in the elements tab in dev 3784 02:29:15,040 --> 02:29:17,120 tools you can see it's highlighted on 3785 02:29:17,120 --> 02:29:18,880 the page notice all the orange to the 3786 02:29:18,880 --> 02:29:21,280 right that is margin that is not table 3787 02:29:21,280 --> 02:29:23,359 so the table doesn't expand to the width 3788 02:29:23,359 --> 02:29:25,439 of the page it only expands 3789 02:29:25,439 --> 02:29:27,920 based on the content inside the table 3790 02:29:27,920 --> 02:29:29,840 that is different from some other 3791 02:29:29,840 --> 02:29:31,680 elements like the paragraph element 3792 02:29:31,680 --> 02:29:33,840 notice how it expands for the full width 3793 02:29:33,840 --> 02:29:35,040 of the page 3794 02:29:35,040 --> 02:29:37,040 or the ordered list element that we have 3795 02:29:37,040 --> 02:29:39,040 here it expands for the full width of 3796 02:29:39,040 --> 02:29:41,280 the page the same with the aside element 3797 02:29:41,280 --> 02:29:43,280 so it's worth noting that the table is 3798 02:29:43,280 --> 02:29:45,359 different from a lot of other elements 3799 02:29:45,359 --> 02:29:47,200 that automatically take up the full 3800 02:29:47,200 --> 02:29:50,080 width of the page the table element only 3801 02:29:50,080 --> 02:29:53,040 expands to contain the content that is 3802 02:29:53,040 --> 02:29:55,040 within the table okay i'm going to close 3803 02:29:55,040 --> 02:29:57,840 devtools resize chrome once again so we 3804 02:29:57,840 --> 02:30:00,080 can see our code here on the left 3805 02:30:00,080 --> 02:30:03,120 and what we are missing from a table 3806 02:30:03,120 --> 02:30:05,680 are headers for our columns we clearly 3807 02:30:05,680 --> 02:30:07,920 have a time column and an activity 3808 02:30:07,920 --> 02:30:10,800 column so let's add that by adding a row 3809 02:30:10,800 --> 02:30:13,120 at the top of the table 3810 02:30:13,120 --> 02:30:15,520 we'll start with the t element again tr 3811 02:30:15,520 --> 02:30:18,479 element and then inside instead of td 3812 02:30:18,479 --> 02:30:21,439 for table data we have th elements for 3813 02:30:21,439 --> 02:30:23,280 table header so 3814 02:30:23,280 --> 02:30:25,200 we'll have time 3815 02:30:25,200 --> 02:30:28,640 and then we'll also have 3816 02:30:28,720 --> 02:30:31,680 activity and now if we save that 3817 02:30:31,680 --> 02:30:34,080 notice that the time and activity are 3818 02:30:34,080 --> 02:30:36,240 formatted just a little differently and 3819 02:30:36,240 --> 02:30:38,240 i did not do anything different for 3820 02:30:38,240 --> 02:30:41,200 these headings in the css 3821 02:30:41,200 --> 02:30:44,080 what we have is a centered 3822 02:30:44,080 --> 02:30:46,800 heading and it is in bold and that is 3823 02:30:46,800 --> 02:30:49,600 the default styling that is applied to 3824 02:30:49,600 --> 02:30:51,760 table headings now what if we had some 3825 02:30:51,760 --> 02:30:54,080 data that needed to take up two columns 3826 02:30:54,080 --> 02:30:56,720 in our table so in other words one cell 3827 02:30:56,720 --> 02:30:59,680 would span the width of both columns we 3828 02:30:59,680 --> 02:31:01,520 can do that so let's add a row at the 3829 02:31:01,520 --> 02:31:03,840 bottom 3830 02:31:05,280 --> 02:31:07,359 and inside the row we'll put one data 3831 02:31:07,359 --> 02:31:10,080 cell and i'm going to put free time 3832 02:31:10,080 --> 02:31:12,640 inside here for data but there is an 3833 02:31:12,640 --> 02:31:15,359 attribute called call span and we can 3834 02:31:15,359 --> 02:31:17,359 set this equal to 2 3835 02:31:17,359 --> 02:31:20,560 and this will take up the width of both 3836 02:31:20,560 --> 02:31:22,720 columns okay now i'm going to remove 3837 02:31:22,720 --> 02:31:25,120 this call span 3838 02:31:25,120 --> 02:31:27,359 and let's put a data cell before free 3839 02:31:27,359 --> 02:31:28,960 time here 3840 02:31:28,960 --> 02:31:31,439 and here we'll say inside of this data 3841 02:31:31,439 --> 02:31:32,479 cell 3842 02:31:32,479 --> 02:31:34,479 let's put all 3843 02:31:34,479 --> 02:31:35,680 other 3844 02:31:35,680 --> 02:31:36,880 times 3845 02:31:36,880 --> 02:31:39,120 but for the attribute on this cell let's 3846 02:31:39,120 --> 02:31:42,160 put a row span which also exists and 3847 02:31:42,160 --> 02:31:44,800 we'll have this take up two rows so now 3848 02:31:44,800 --> 02:31:47,760 let's put another row underneath 3849 02:31:47,760 --> 02:31:49,680 and in this row we'll only have one data 3850 02:31:49,680 --> 02:31:51,040 cell 3851 02:31:51,040 --> 02:31:52,720 and here we can put 3852 02:31:52,720 --> 02:31:54,080 sleep 3853 02:31:54,080 --> 02:31:56,880 now if we save you can see our all other 3854 02:31:56,880 --> 02:32:00,080 times is taking up two rows and now we 3855 02:32:00,080 --> 02:32:02,720 have free time and sleep on the right 3856 02:32:02,720 --> 02:32:05,439 now our previous lesson covered html 3857 02:32:05,439 --> 02:32:08,160 semantics which definitely helps 3858 02:32:08,160 --> 02:32:10,479 structure a page and tell the browser 3859 02:32:10,479 --> 02:32:12,960 what the page is about and it also helps 3860 02:32:12,960 --> 02:32:15,840 assistive technology like screen readers 3861 02:32:15,840 --> 02:32:18,000 navigate a page for those that do not 3862 02:32:18,000 --> 02:32:20,399 use a mouse for example to navigate the 3863 02:32:20,399 --> 02:32:23,520 page so let's scroll up and start adding 3864 02:32:23,520 --> 02:32:25,600 some semantics to our tables because 3865 02:32:25,600 --> 02:32:27,439 that is also possible 3866 02:32:27,439 --> 02:32:29,760 underneath the table the first element 3867 02:32:29,760 --> 02:32:31,359 we want to add 3868 02:32:31,359 --> 02:32:33,520 is a caption 3869 02:32:33,520 --> 02:32:35,359 so we add the caption and we can say 3870 02:32:35,359 --> 02:32:37,280 what the table is about and that would 3871 02:32:37,280 --> 02:32:39,040 help someone navigating with a screen 3872 02:32:39,040 --> 02:32:40,479 reader decide if they really want to 3873 02:32:40,479 --> 02:32:42,240 navigate the rest of the table or just 3874 02:32:42,240 --> 02:32:45,600 skip over it and clearly we can also do 3875 02:32:45,600 --> 02:32:48,399 that visually so let's just put in my 3876 02:32:48,399 --> 02:32:51,359 daily schedule like the same title we 3877 02:32:51,359 --> 02:32:54,880 have for the subsection above in the h3 3878 02:32:54,880 --> 02:32:56,880 and as soon as i save that you can see 3879 02:32:56,880 --> 02:32:59,520 now the caption spans both columns 3880 02:32:59,520 --> 02:33:01,920 already and is centered and we didn't 3881 02:33:01,920 --> 02:33:04,080 have to add a column span for that to 3882 02:33:04,080 --> 02:33:06,000 happen that automatically happens with 3883 02:33:06,000 --> 02:33:08,640 the caption after that we can clearly 3884 02:33:08,640 --> 02:33:11,920 define sections of the table much like 3885 02:33:11,920 --> 02:33:14,479 we do sections of the page so let's 3886 02:33:14,479 --> 02:33:17,040 start out with the header and this is 3887 02:33:17,040 --> 02:33:18,640 the t 3888 02:33:18,640 --> 02:33:20,960 head which stands for table head 3889 02:33:20,960 --> 02:33:23,200 now i'm going to go ahead and highlight 3890 02:33:23,200 --> 02:33:27,200 the closing tag press control x to cut 3891 02:33:27,200 --> 02:33:30,880 and add it underneath the end of the row 3892 02:33:30,880 --> 02:33:33,200 and we can save and here you see the 3893 02:33:33,200 --> 02:33:35,120 full table head clearly defined it 3894 02:33:35,120 --> 02:33:37,120 doesn't change the appearance at all but 3895 02:33:37,120 --> 02:33:39,760 it adds semantics to our table 3896 02:33:39,760 --> 02:33:42,319 likewise there is a t-body element for 3897 02:33:42,319 --> 02:33:44,560 the table body so i'm going to once 3898 02:33:44,560 --> 02:33:46,640 again highlight the closing tag press 3899 02:33:46,640 --> 02:33:48,640 ctrl x to cut 3900 02:33:48,640 --> 02:33:50,880 scroll all the way down to the end of 3901 02:33:50,880 --> 02:33:52,960 our table the last row but before the 3902 02:33:52,960 --> 02:33:54,720 closing tag of the table 3903 02:33:54,720 --> 02:33:57,280 and paste the t body tag 3904 02:33:57,280 --> 02:34:00,479 so now we've got a head and body section 3905 02:34:00,479 --> 02:34:04,319 for our table we can also add a t foot 3906 02:34:04,319 --> 02:34:07,040 section so now inside of the footer i'm 3907 02:34:07,040 --> 02:34:09,680 going to put another row 3908 02:34:09,680 --> 02:34:12,479 and inside the row i'll put a data cell 3909 02:34:12,479 --> 02:34:14,640 and i'm going to give this a column span 3910 02:34:14,640 --> 02:34:17,040 equal to two 3911 02:34:17,040 --> 02:34:18,880 well i didn't get the rope or the data 3912 02:34:18,880 --> 02:34:20,720 cell started there we go 3913 02:34:20,720 --> 02:34:22,880 now we go call span 3914 02:34:22,880 --> 02:34:24,960 equal to two 3915 02:34:24,960 --> 02:34:26,800 and inside of here i'm just going to put 3916 02:34:26,800 --> 02:34:29,120 a statement but you could put something 3917 02:34:29,120 --> 02:34:31,520 in the footer that say totals up all of 3918 02:34:31,520 --> 02:34:34,399 the columns if you had a ledger that was 3919 02:34:34,399 --> 02:34:37,760 tracking account numbers or expenses or 3920 02:34:37,760 --> 02:34:39,040 say you had 3921 02:34:39,040 --> 02:34:41,760 sports stats or something like that or 3922 02:34:41,760 --> 02:34:43,359 anything else that would need totaled up 3923 02:34:43,359 --> 02:34:45,120 that would be a good place to put it is 3924 02:34:45,120 --> 02:34:47,280 inside the footer i'm just going to put 3925 02:34:47,280 --> 02:34:49,359 a statement about our schedule i'm going 3926 02:34:49,359 --> 02:34:51,200 to scroll up before i add the statement 3927 02:34:51,200 --> 02:34:53,520 but here i'm just going to put 3928 02:34:53,520 --> 02:34:56,319 and that's what i do 3929 02:34:56,319 --> 02:34:58,479 every day comma 3930 02:34:58,479 --> 02:35:03,359 five days a week period just eat 3931 02:35:03,359 --> 02:35:04,560 sleep 3932 02:35:04,560 --> 02:35:06,800 code 3933 02:35:06,800 --> 02:35:09,120 and recharge 3934 02:35:09,120 --> 02:35:11,120 i'll save 3935 02:35:11,120 --> 02:35:13,200 and now we can see our footer is 3936 02:35:13,200 --> 02:35:15,359 spanning both columns and we've clearly 3937 02:35:15,359 --> 02:35:17,760 defined the semantics for our table now 3938 02:35:17,760 --> 02:35:20,319 with a header a body and a footer now 3939 02:35:20,319 --> 02:35:22,479 another question you might think of is 3940 02:35:22,479 --> 02:35:25,600 what if the row needs a header as well 3941 02:35:25,600 --> 02:35:28,240 it needs some definition so if we can 3942 02:35:28,240 --> 02:35:31,040 have a heading for our column what if we 3943 02:35:31,040 --> 02:35:34,240 need another kind of official title for 3944 02:35:34,240 --> 02:35:37,120 each row as well well we can do that as 3945 02:35:37,120 --> 02:35:39,920 well so let's scroll up here to the top 3946 02:35:39,920 --> 02:35:42,319 and in our header we'll need to put an 3947 02:35:42,319 --> 02:35:43,439 empty 3948 02:35:43,439 --> 02:35:45,840 square or an empty cell 3949 02:35:45,840 --> 02:35:47,439 and we can do that we'll just add 3950 02:35:47,439 --> 02:35:50,000 another th and inside of here we need to 3951 02:35:50,000 --> 02:35:54,000 put ampersand nbsp with a semicolon this 3952 02:35:54,000 --> 02:35:56,560 is an html entity if you remember when 3953 02:35:56,560 --> 02:35:59,120 we covered html entities in a past 3954 02:35:59,120 --> 02:36:01,520 lesson and that just puts a little small 3955 02:36:01,520 --> 02:36:04,319 space inside of the cell now that we've 3956 02:36:04,319 --> 02:36:06,800 added that we can add headings to each 3957 02:36:06,800 --> 02:36:08,720 of the other rows so 3958 02:36:08,720 --> 02:36:12,160 we'll have a th here for the first row 3959 02:36:12,160 --> 02:36:14,160 and i'm going to put 3960 02:36:14,160 --> 02:36:15,920 morning 3961 02:36:15,920 --> 02:36:18,240 and then in the next row we'll add 3962 02:36:18,240 --> 02:36:23,920 another th and i'm going to put break 3963 02:36:23,920 --> 02:36:27,040 and in the next row th and i'm going to 3964 02:36:27,040 --> 02:36:27,840 put 3965 02:36:27,840 --> 02:36:30,479 afternoon 3966 02:36:30,479 --> 02:36:31,760 next row 3967 02:36:31,760 --> 02:36:32,800 th 3968 02:36:32,800 --> 02:36:35,040 and this is evening 3969 02:36:35,040 --> 02:36:38,640 and in the final row 3970 02:36:38,800 --> 02:36:40,319 well i guess not the final row that 3971 02:36:40,319 --> 02:36:41,600 would be the footer but this would be 3972 02:36:41,600 --> 02:36:44,240 the final row with a row heading 3973 02:36:44,240 --> 02:36:46,800 and i'm going to put 3974 02:36:46,800 --> 02:36:49,760 knight so if we save this 3975 02:36:49,760 --> 02:36:51,760 we can really see how our table has 3976 02:36:51,760 --> 02:36:53,840 changed but notice we didn't change the 3977 02:36:53,840 --> 02:36:55,760 call span yet for the footer so we've 3978 02:36:55,760 --> 02:36:57,840 got an empty square here as well here's 3979 02:36:57,840 --> 02:36:59,600 the empty square we defined but we 3980 02:36:59,600 --> 02:37:01,920 didn't plan on this so we better change 3981 02:37:01,920 --> 02:37:04,560 our call span for the footer to three 3982 02:37:04,560 --> 02:37:07,040 because we now have three columns and if 3983 02:37:07,040 --> 02:37:10,160 we save that looks much more like it and 3984 02:37:10,160 --> 02:37:12,880 you can see when we added the row span 3985 02:37:12,880 --> 02:37:15,280 and we came down to this final row 3986 02:37:15,280 --> 02:37:18,880 and we only added a first and a third 3987 02:37:18,880 --> 02:37:20,000 column 3988 02:37:20,000 --> 02:37:22,319 we didn't have to specify that this was 3989 02:37:22,319 --> 02:37:24,560 the first and this was the third it 3990 02:37:24,560 --> 02:37:26,640 automatically knew that because the 3991 02:37:26,640 --> 02:37:29,520 second column in the row above is the 3992 02:37:29,520 --> 02:37:31,680 one that had the row span of two now our 3993 02:37:31,680 --> 02:37:33,439 page is looking pretty good over here as 3994 02:37:33,439 --> 02:37:36,240 far as the table goes but we need to add 3995 02:37:36,240 --> 02:37:38,800 just a little bit more for semantics and 3996 02:37:38,800 --> 02:37:40,880 we need to go back and start at the 3997 02:37:40,880 --> 02:37:43,680 header to do that so i'll scroll back up 3998 02:37:43,680 --> 02:37:46,560 and here we are in the t-head area of 3999 02:37:46,560 --> 02:37:48,640 the table and for each heading that we 4000 02:37:48,640 --> 02:37:51,280 have on the page each th except this one 4001 02:37:51,280 --> 02:37:52,800 that has a space in it we need to 4002 02:37:52,800 --> 02:37:54,560 provide a scope 4003 02:37:54,560 --> 02:37:56,479 and that says how it relates to the 4004 02:37:56,479 --> 02:37:58,479 table so this would be 4005 02:37:58,479 --> 02:38:00,720 scope equals to call which stands for 4006 02:38:00,720 --> 02:38:01,680 column 4007 02:38:01,680 --> 02:38:03,439 and i'm just going to copy that because 4008 02:38:03,439 --> 02:38:06,960 we need to add that to the next one 4009 02:38:06,960 --> 02:38:09,359 and so time and activity both apply to 4010 02:38:09,359 --> 02:38:11,520 the columns so as you might guess when 4011 02:38:11,520 --> 02:38:14,640 we get down to the next part in the body 4012 02:38:14,640 --> 02:38:16,960 where we get to the row headings 4013 02:38:16,960 --> 02:38:19,200 i can paste this in but i need to change 4014 02:38:19,200 --> 02:38:20,640 column 4015 02:38:20,640 --> 02:38:21,920 to row 4016 02:38:21,920 --> 02:38:24,160 and i'll copy this and we need to apply 4017 02:38:24,160 --> 02:38:27,120 this to each one of the row headings 4018 02:38:27,120 --> 02:38:29,680 so now at break 4019 02:38:29,680 --> 02:38:32,720 and then we had 4020 02:38:32,720 --> 02:38:35,439 afternoon 4021 02:38:35,760 --> 02:38:37,680 evening 4022 02:38:37,680 --> 02:38:40,399 and finally night and if we save that 4023 02:38:40,399 --> 02:38:42,560 once again the semantics don't change 4024 02:38:42,560 --> 02:38:45,680 the look on the page but we have really 4025 02:38:45,680 --> 02:38:48,080 helped assistive technology navigate our 4026 02:38:48,080 --> 02:38:50,160 table now this is the easier way to do 4027 02:38:50,160 --> 02:38:52,399 that with scope however that you may see 4028 02:38:52,399 --> 02:38:53,200 that 4029 02:38:53,200 --> 02:38:55,760 accomplished in another way and that is 4030 02:38:55,760 --> 02:38:58,000 providing an id 4031 02:38:58,000 --> 02:39:02,000 for each header so if we had an id 4032 02:39:02,000 --> 02:39:04,399 and set that equal to time 4033 02:39:04,399 --> 02:39:06,880 and then we had an id 4034 02:39:06,880 --> 02:39:09,520 let's say in this row or this row up 4035 02:39:09,520 --> 02:39:11,520 here with morning and we set it equal to 4036 02:39:11,520 --> 02:39:13,920 morning 4037 02:39:15,359 --> 02:39:19,120 then in the td we would have to give the 4038 02:39:19,120 --> 02:39:23,040 headers attribute and specify both so we 4039 02:39:23,040 --> 02:39:25,280 would say time 4040 02:39:25,280 --> 02:39:27,920 and morning i find it much easier to 4041 02:39:27,920 --> 02:39:30,800 just provide the scope instead of ids 4042 02:39:30,800 --> 02:39:32,479 and then having to add a headers 4043 02:39:32,479 --> 02:39:35,439 attribute to each data cell as well 4044 02:39:35,439 --> 02:39:37,439 so we'll just leave it at that i'll go 4045 02:39:37,439 --> 02:39:39,600 ahead and remove these examples that 4046 02:39:39,600 --> 02:39:42,319 gave the ids and we'll stick with scope 4047 02:39:42,319 --> 02:39:44,800 up above here so there we go i just 4048 02:39:44,800 --> 02:39:46,319 wanted to quickly discuss that that 4049 02:39:46,319 --> 02:39:48,240 there is another way to do it now that 4050 02:39:48,240 --> 02:39:50,319 we've completed adding the semantics to 4051 02:39:50,319 --> 02:39:52,240 our page and we're finished with our 4052 02:39:52,240 --> 02:39:54,560 table let's validate our code i'm going 4053 02:39:54,560 --> 02:39:56,520 to go to 4054 02:39:56,520 --> 02:39:58,399 validator.w3.org i'm going to drag the 4055 02:39:58,399 --> 02:40:00,479 page over just a little bit 4056 02:40:00,479 --> 02:40:01,920 click file 4057 02:40:01,920 --> 02:40:03,280 upload 4058 02:40:03,280 --> 02:40:04,960 and now when you click choose file make 4059 02:40:04,960 --> 02:40:06,640 sure you're grabbing the correct file 4060 02:40:06,640 --> 02:40:09,200 that you're in the correct folder i'm in 4061 02:40:09,200 --> 02:40:12,640 the 08 lesson here is the folder that i 4062 02:40:12,640 --> 02:40:15,279 want and i choose the index html and 4063 02:40:15,279 --> 02:40:17,279 click check 4064 02:40:17,279 --> 02:40:19,040 and document checking completed no 4065 02:40:19,040 --> 02:40:21,200 errors or warnings to show if you have 4066 02:40:21,200 --> 02:40:23,279 any errors it should show down here and 4067 02:40:23,279 --> 02:40:25,520 tell you which line they're on and give 4068 02:40:25,520 --> 02:40:27,520 you some information about correcting 4069 02:40:27,520 --> 02:40:29,520 those 4070 02:40:29,520 --> 02:40:31,840 so far the html we have created has 4071 02:40:31,840 --> 02:40:34,479 resulted in one-way communication but in 4072 02:40:34,479 --> 02:40:36,880 this lesson we're going to add a form to 4073 02:40:36,880 --> 02:40:39,120 our html page which will allow users to 4074 02:40:39,120 --> 02:40:41,760 send information back to us and that 4075 02:40:41,760 --> 02:40:44,319 makes our html interactive i've got 4076 02:40:44,319 --> 02:40:46,800 visual studio code open here on the left 4077 02:40:46,800 --> 02:40:49,040 with the starter code for the lesson and 4078 02:40:49,040 --> 02:40:50,399 on the right we're displaying that 4079 02:40:50,399 --> 02:40:52,479 starter code in the chrome browser and 4080 02:40:52,479 --> 02:40:54,640 i'm using the live server extension to 4081 02:40:54,640 --> 02:40:57,600 do that live server also immediately 4082 02:40:57,600 --> 02:40:59,600 updates the browser with any changes we 4083 02:40:59,600 --> 02:41:02,160 make in the code adding a form to a web 4084 02:41:02,160 --> 02:41:04,000 page allows us to gather information 4085 02:41:04,000 --> 02:41:06,319 from our users and more specifically it 4086 02:41:06,319 --> 02:41:09,040 allows our users to send us information 4087 02:41:09,040 --> 02:41:11,840 if they choose to this is exemplified 4088 02:41:11,840 --> 02:41:13,840 throughout the web with contact forms so 4089 02:41:13,840 --> 02:41:16,000 let's add one to our page notice i'm 4090 02:41:16,000 --> 02:41:18,479 near the top of the page around line 13 4091 02:41:18,479 --> 02:41:20,479 where the body element starts and if we 4092 02:41:20,479 --> 02:41:22,560 come down just a little ways we find our 4093 02:41:22,560 --> 02:41:25,600 nav element on line 17. now here i'm 4094 02:41:25,600 --> 02:41:28,080 going to highlight the last list item in 4095 02:41:28,080 --> 02:41:29,840 our unordered list that has planning and 4096 02:41:29,840 --> 02:41:32,240 vacation and i'm going to press shift 4097 02:41:32,240 --> 02:41:34,479 alt and the down arrow to just make a 4098 02:41:34,479 --> 02:41:36,319 copy of that below 4099 02:41:36,319 --> 02:41:39,120 here i'm going to add another anchor and 4100 02:41:39,120 --> 02:41:41,279 remember these are for links within the 4101 02:41:41,279 --> 02:41:43,520 same page i'm just going to change 4102 02:41:43,520 --> 02:41:46,399 vacation to contact in our new link 4103 02:41:46,399 --> 02:41:47,760 and i'll highlight the planning and 4104 02:41:47,760 --> 02:41:51,680 vacation and change that to contact me 4105 02:41:51,680 --> 02:41:53,359 so now we have made a link that should 4106 02:41:53,359 --> 02:41:55,600 show up here by our learning html and 4107 02:41:55,600 --> 02:41:57,200 planning a vacation so i'm going to 4108 02:41:57,200 --> 02:42:00,080 press ctrl s to save and there is our 4109 02:42:00,080 --> 02:42:02,240 new link and now we'll want to scroll in 4110 02:42:02,240 --> 02:42:04,720 visual studio code all the way to the 4111 02:42:04,720 --> 02:42:06,479 bottom and maybe i can just grab the bar 4112 02:42:06,479 --> 02:42:08,720 here and go a little faster because 4113 02:42:08,720 --> 02:42:11,680 after our last article that has the 4114 02:42:11,680 --> 02:42:13,520 places we do not want to visit on 4115 02:42:13,520 --> 02:42:15,520 vacation and we can see that in the 4116 02:42:15,520 --> 02:42:18,800 browser as well if i scroll that down 4117 02:42:18,800 --> 02:42:20,399 may take just a second to get there but 4118 02:42:20,399 --> 02:42:22,560 here we are places i want to avoid we 4119 02:42:22,560 --> 02:42:25,520 want to add our contact form underneath 4120 02:42:25,520 --> 02:42:28,399 this but above the footer as well so 4121 02:42:28,399 --> 02:42:31,439 underneath this last article but before 4122 02:42:31,439 --> 02:42:33,760 the main element closing tag so i'm on 4123 02:42:33,760 --> 02:42:37,040 line 170 right now going to add another 4124 02:42:37,040 --> 02:42:40,000 hr a horizontal rule divider and from 4125 02:42:40,000 --> 02:42:42,720 there we can start with our article 4126 02:42:42,720 --> 02:42:44,479 element i'm going to scroll up just a 4127 02:42:44,479 --> 02:42:46,080 little to get this closer to the center 4128 02:42:46,080 --> 02:42:48,000 of the page or a little higher and then 4129 02:42:48,000 --> 02:42:50,000 we're going to go ahead and add that id 4130 02:42:50,000 --> 02:42:51,920 to the article element and here we'll 4131 02:42:51,920 --> 02:42:53,680 need this to match what we put in the 4132 02:42:53,680 --> 02:42:55,920 anchor link above so it needs to say 4133 02:42:55,920 --> 02:42:58,560 contact from there let's go ahead and 4134 02:42:58,560 --> 02:43:01,760 add our header for the heading hierarchy 4135 02:43:01,760 --> 02:43:04,160 and this should be an h2 as it's a new 4136 02:43:04,160 --> 02:43:07,279 article area of our page so it matches 4137 02:43:07,279 --> 02:43:09,600 the other article areas and here i'll 4138 02:43:09,600 --> 02:43:12,319 put contact me for the title 4139 02:43:12,319 --> 02:43:14,240 now let's put a paragraph with a little 4140 02:43:14,240 --> 02:43:16,560 description underneath and so in the 4141 02:43:16,560 --> 02:43:19,600 paragraph i'll just put i'd really 4142 02:43:19,600 --> 02:43:22,479 like to hear from you 4143 02:43:22,479 --> 02:43:26,240 there we go and now we have a title and 4144 02:43:26,240 --> 02:43:28,560 we have a bit of a description 4145 02:43:28,560 --> 02:43:30,720 and now we're ready to add our form to 4146 02:43:30,720 --> 02:43:32,880 the article so let's start out by typing 4147 02:43:32,880 --> 02:43:35,359 form and pressing tab notice an action 4148 02:43:35,359 --> 02:43:37,600 attribute is automatically added to the 4149 02:43:37,600 --> 02:43:40,319 form tag and what we want to put here is 4150 02:43:40,319 --> 02:43:42,399 where we're sending the information 4151 02:43:42,399 --> 02:43:44,399 usually this would be to our own server 4152 02:43:44,399 --> 02:43:46,160 but for this tutorial and just to 4153 02:43:46,160 --> 02:43:49,120 demonstrate what a form does we're going 4154 02:43:49,120 --> 02:43:50,800 to send it to a website that will 4155 02:43:50,800 --> 02:43:51,840 display 4156 02:43:51,840 --> 02:43:54,080 the information that we have sent with 4157 02:43:54,080 --> 02:43:57,200 the form so let's type https 4158 02:43:57,200 --> 02:43:59,040 colon slash 4159 02:43:59,040 --> 02:44:02,319 http bin bin 4160 02:44:02,319 --> 02:44:05,760 dot org and then slash get now that last 4161 02:44:05,760 --> 02:44:08,080 part slash get refers to the method 4162 02:44:08,080 --> 02:44:09,760 we're going to use and that's the next 4163 02:44:09,760 --> 02:44:11,359 attribute that we need to add to our 4164 02:44:11,359 --> 02:44:12,240 form 4165 02:44:12,240 --> 02:44:14,560 so method equals get 4166 02:44:14,560 --> 02:44:15,920 likewise 4167 02:44:15,920 --> 02:44:18,240 method is often post as well there can 4168 02:44:18,240 --> 02:44:20,800 be other values and we'll see the 4169 02:44:20,800 --> 02:44:22,640 difference because we will try both of 4170 02:44:22,640 --> 02:44:24,560 those out before we're finished now the 4171 02:44:24,560 --> 02:44:27,520 contents of forms are mostly labels and 4172 02:44:27,520 --> 02:44:30,080 inputs and every input should have a 4173 02:44:30,080 --> 02:44:32,399 label so let's start with a label 4174 02:44:32,399 --> 02:44:35,120 element and notice it instantly has a 4175 02:44:35,120 --> 02:44:38,000 four attribute that four attribute value 4176 02:44:38,000 --> 02:44:40,800 should match the id value of the input 4177 02:44:40,800 --> 02:44:42,800 so here we're going to put first name 4178 02:44:42,800 --> 02:44:44,720 because that's what we expect 4179 02:44:44,720 --> 02:44:46,640 and then for the label this is the part 4180 02:44:46,640 --> 02:44:48,800 that will show on the page we also want 4181 02:44:48,800 --> 02:44:51,279 to put first name and then i'll put a 4182 02:44:51,279 --> 02:44:53,680 colon after that let's go ahead and 4183 02:44:53,680 --> 02:44:57,279 create an input and you can also type a 4184 02:44:57,279 --> 02:45:01,520 colon after the input and type t e x t 4185 02:45:01,520 --> 02:45:04,960 to get a text input and then press tab 4186 02:45:04,960 --> 02:45:07,040 and notice we automatically have the 4187 02:45:07,040 --> 02:45:10,000 type for the input filled out as text 4188 02:45:10,000 --> 02:45:12,080 and now we have a name attribute and an 4189 02:45:12,080 --> 02:45:13,680 id attribute 4190 02:45:13,680 --> 02:45:16,720 and these you really want to match so 4191 02:45:16,720 --> 02:45:19,439 i'm going to put first name and i forgot 4192 02:45:19,439 --> 02:45:21,279 to put camel case here for the label but 4193 02:45:21,279 --> 02:45:23,439 i like to use that on these so let's go 4194 02:45:23,439 --> 02:45:24,399 first 4195 02:45:24,399 --> 02:45:26,560 name and by camel case that means the 4196 02:45:26,560 --> 02:45:29,040 second word has a capital so first name 4197 02:45:29,040 --> 02:45:30,800 with a capital n 4198 02:45:30,800 --> 02:45:33,439 and then for the name value we'll also 4199 02:45:33,439 --> 02:45:35,920 put first name that matches and let's do 4200 02:45:35,920 --> 02:45:39,120 the same with the id now remember the id 4201 02:45:39,120 --> 02:45:41,120 is the one that absolutely needs to 4202 02:45:41,120 --> 02:45:44,240 match the value of the four in the label 4203 02:45:44,240 --> 02:45:46,479 this name attribute though 4204 02:45:46,479 --> 02:45:49,359 is how it is identified at the server 4205 02:45:49,359 --> 02:45:51,279 level so when we send this information 4206 02:45:51,279 --> 02:45:53,279 onto the server the information that is 4207 02:45:53,279 --> 02:45:55,279 in this input will be labeled with the 4208 02:45:55,279 --> 02:45:57,600 value that we put in the name attribute 4209 02:45:57,600 --> 02:45:59,760 so let's go ahead and save this much and 4210 02:45:59,760 --> 02:46:01,520 see what we get on our page we can 4211 02:46:01,520 --> 02:46:03,760 scroll down and look at our form it's 4212 02:46:03,760 --> 02:46:05,760 very basic right now but you can see the 4213 02:46:05,760 --> 02:46:07,680 title contact me 4214 02:46:07,680 --> 02:46:09,600 and the paragraph i'd really like to 4215 02:46:09,600 --> 02:46:12,080 hear from you and then we have our first 4216 02:46:12,080 --> 02:46:15,520 name label and our input where the user 4217 02:46:15,520 --> 02:46:18,160 can type information in this text input 4218 02:46:18,160 --> 02:46:19,920 but there are a few more attributes that 4219 02:46:19,920 --> 02:46:22,399 we can add so let's add one called a 4220 02:46:22,399 --> 02:46:25,279 placeholder now this lets us display 4221 02:46:25,279 --> 02:46:28,000 text but it's not the same as the value 4222 02:46:28,000 --> 02:46:29,840 which would actually be what the user 4223 02:46:29,840 --> 02:46:32,319 enters so this could just be an example 4224 02:46:32,319 --> 02:46:35,279 i'll type the name jane and save and now 4225 02:46:35,279 --> 02:46:38,399 we see jane in the text input but it 4226 02:46:38,399 --> 02:46:40,399 will not be sent with the form if we 4227 02:46:40,399 --> 02:46:42,880 click in that input and then start to 4228 02:46:42,880 --> 02:46:44,000 type 4229 02:46:44,000 --> 02:46:47,040 jane disappears and now we have a value 4230 02:46:47,040 --> 02:46:48,880 an actual value entered but as soon as i 4231 02:46:48,880 --> 02:46:50,960 delete the last letter jane will 4232 02:46:50,960 --> 02:46:53,600 reappear so placeholder is just 4233 02:46:53,600 --> 02:46:56,640 exactly that it is holding the place of 4234 02:46:56,640 --> 02:46:58,880 whatever value will be put in so often 4235 02:46:58,880 --> 02:47:01,439 times there is example data in there 4236 02:47:01,439 --> 02:47:03,840 just to show the user what is expected 4237 02:47:03,840 --> 02:47:06,479 we can also add another attribute called 4238 02:47:06,479 --> 02:47:08,160 autocomplete 4239 02:47:08,160 --> 02:47:11,439 and autocomplete doesn't expect a yes or 4240 02:47:11,439 --> 02:47:14,800 no or true or false like others often do 4241 02:47:14,800 --> 02:47:17,600 with attributes as far as that goes this 4242 02:47:17,600 --> 02:47:20,720 is expecting an on or off so we're going 4243 02:47:20,720 --> 02:47:23,359 to turn the autocomplete on 4244 02:47:23,359 --> 02:47:26,000 and that means it will remember other 4245 02:47:26,000 --> 02:47:27,920 inputs that have been entered into this 4246 02:47:27,920 --> 02:47:30,960 field and suggest those so if we were to 4247 02:47:30,960 --> 02:47:32,960 submit the form and then 4248 02:47:32,960 --> 02:47:36,000 fill it out again later it might suggest 4249 02:47:36,000 --> 02:47:38,160 what we previously put in so that's a 4250 02:47:38,160 --> 02:47:39,520 preference thing if you want to have 4251 02:47:39,520 --> 02:47:41,520 autocomplete on or off 4252 02:47:41,520 --> 02:47:44,560 then we can put required and this will 4253 02:47:44,560 --> 02:47:47,120 require this field to have information 4254 02:47:47,120 --> 02:47:48,880 from the user before the form can be 4255 02:47:48,880 --> 02:47:51,840 submitted now notice i said autocomplete 4256 02:47:51,840 --> 02:47:54,319 didn't use true or false or yes or no 4257 02:47:54,319 --> 02:47:56,560 required does but we don't really have 4258 02:47:56,560 --> 02:47:58,640 to set it equal to 4259 02:47:58,640 --> 02:48:01,359 true like this we can just say required 4260 02:48:01,359 --> 02:48:03,920 because if we put required there it 4261 02:48:03,920 --> 02:48:05,920 equals true and then if we don't have 4262 02:48:05,920 --> 02:48:08,479 required there it's obviously false and 4263 02:48:08,479 --> 02:48:10,640 the last attribute we'll give this input 4264 02:48:10,640 --> 02:48:14,240 is autofocus now only one element in the 4265 02:48:14,240 --> 02:48:16,720 form or on the page can actually have 4266 02:48:16,720 --> 02:48:18,880 auto focus because it can't focus on 4267 02:48:18,880 --> 02:48:20,479 more than one at once 4268 02:48:20,479 --> 02:48:22,800 this will put the focus in that input 4269 02:48:22,800 --> 02:48:26,160 when the page loads so i'm going to save 4270 02:48:26,160 --> 02:48:28,880 and then if we reload the page we should 4271 02:48:28,880 --> 02:48:29,760 see 4272 02:48:29,760 --> 02:48:32,399 the flashing cursor here there's focus 4273 02:48:32,399 --> 02:48:34,720 in there immediately when the page loads 4274 02:48:34,720 --> 02:48:37,359 so we can start typing instantly when 4275 02:48:37,359 --> 02:48:39,680 the page loads in that field now i'm 4276 02:48:39,680 --> 02:48:41,600 going to leave the autofocus here to 4277 02:48:41,600 --> 02:48:43,520 have it in the source code for you for 4278 02:48:43,520 --> 02:48:46,399 the lesson however with the contact us 4279 02:48:46,399 --> 02:48:48,800 page being at the bottom of the page it 4280 02:48:48,800 --> 02:48:50,720 may not be where you'd really want to 4281 02:48:50,720 --> 02:48:52,800 have auto focus if you were creating a 4282 02:48:52,800 --> 02:48:55,120 form okay and that completes our first 4283 02:48:55,120 --> 02:48:57,600 label and input combination for our form 4284 02:48:57,600 --> 02:48:59,680 now i'm going to highlight both of these 4285 02:48:59,680 --> 02:49:02,000 and press shift alt and the down arrow 4286 02:49:02,000 --> 02:49:04,560 so i can copy this down and i'm going to 4287 02:49:04,560 --> 02:49:07,439 change first name i'll press ctrl d to 4288 02:49:07,439 --> 02:49:09,520 highlight every instance of first name 4289 02:49:09,520 --> 02:49:11,359 which we have 3 4290 02:49:11,359 --> 02:49:13,600 and then arrow to the front of it and 4291 02:49:13,600 --> 02:49:15,840 then go three letters in and just switch 4292 02:49:15,840 --> 02:49:17,040 it to 4293 02:49:17,040 --> 02:49:18,800 last name so we could change all of 4294 02:49:18,800 --> 02:49:21,120 those at once again that's ctrl d 4295 02:49:21,120 --> 02:49:23,120 and it will let you select more than one 4296 02:49:23,120 --> 02:49:25,600 at a time for each time you press ctrl d 4297 02:49:25,600 --> 02:49:27,760 okay so now we have last name we need to 4298 02:49:27,760 --> 02:49:30,000 change here that didn't change this 4299 02:49:30,000 --> 02:49:31,680 instance of it because we had a space 4300 02:49:31,680 --> 02:49:33,359 between it so it was not the same as the 4301 02:49:33,359 --> 02:49:34,240 others 4302 02:49:34,240 --> 02:49:36,319 and we don't want a placeholder jane for 4303 02:49:36,319 --> 02:49:39,840 last name so we'll just put 4304 02:49:39,840 --> 02:49:42,800 and then auto complete on i guess we did 4305 02:49:42,800 --> 02:49:44,080 it for the other one that's okay but 4306 02:49:44,080 --> 02:49:48,000 remember only one element or one input 4307 02:49:48,000 --> 02:49:50,560 can have auto focus on a page so we need 4308 02:49:50,560 --> 02:49:52,800 to remove that now let's go ahead and 4309 02:49:52,800 --> 02:49:55,200 save and you can see 4310 02:49:55,200 --> 02:49:58,399 our form has both inputs and labels it 4311 02:49:58,399 --> 02:50:00,000 doesn't look too great though does it 4312 02:50:00,000 --> 02:50:02,160 they're just all running along one line 4313 02:50:02,160 --> 02:50:03,920 and then wrapping to the next when it 4314 02:50:03,920 --> 02:50:06,080 runs out of room and with that problem 4315 02:50:06,080 --> 02:50:09,439 it may be better to wrap our label and 4316 02:50:09,439 --> 02:50:12,560 input in a block element that creates 4317 02:50:12,560 --> 02:50:15,920 that line break so let's use a paragraph 4318 02:50:15,920 --> 02:50:18,640 that once again better than using a div 4319 02:50:18,640 --> 02:50:20,479 a paragraph has just a little more 4320 02:50:20,479 --> 02:50:23,040 meaning than an empty div although 4321 02:50:23,040 --> 02:50:25,600 almost the same in this instance and you 4322 02:50:25,600 --> 02:50:27,920 will see some use divs here instead of 4323 02:50:27,920 --> 02:50:30,399 paragraphs so we've got a paragraph 4324 02:50:30,399 --> 02:50:31,200 there 4325 02:50:31,200 --> 02:50:33,760 now let's wrap the label and input for 4326 02:50:33,760 --> 02:50:37,840 the last name in another paragraph 4327 02:50:38,319 --> 02:50:41,040 and save and now let's look at our form 4328 02:50:41,040 --> 02:50:42,960 it has a little more space here this 4329 02:50:42,960 --> 02:50:45,120 looks a little bit better than before 4330 02:50:45,120 --> 02:50:47,200 okay let's keep adding to our form i'm 4331 02:50:47,200 --> 02:50:48,800 going to scroll up again we'll get the 4332 02:50:48,800 --> 02:50:51,040 last name towards the top of the page 4333 02:50:51,040 --> 02:50:53,200 i'll highlight the paragraph and 4334 02:50:53,200 --> 02:50:56,000 everything inside of it and shift alt 4335 02:50:56,000 --> 02:50:58,240 and the down arrow once again and now 4336 02:50:58,240 --> 02:51:01,520 we'll change last name to password so 4337 02:51:01,520 --> 02:51:04,399 ctrl d to select every instance of last 4338 02:51:04,399 --> 02:51:06,560 name again and i'm going to type 4339 02:51:06,560 --> 02:51:10,160 password so now we've got a four 4340 02:51:10,160 --> 02:51:12,720 attribute in the label and then the name 4341 02:51:12,720 --> 02:51:14,000 and the id 4342 02:51:14,000 --> 02:51:15,439 our password 4343 02:51:15,439 --> 02:51:19,200 so let's change our last name here 4344 02:51:19,200 --> 02:51:22,640 to a password value for label and type 4345 02:51:22,640 --> 02:51:24,960 text also needs to be changed to 4346 02:51:24,960 --> 02:51:27,359 password so this is a different type of 4347 02:51:27,359 --> 02:51:29,600 input than we used for first name and 4348 02:51:29,600 --> 02:51:30,800 last name 4349 02:51:30,800 --> 02:51:33,520 for placeholder i'm going to put your 4350 02:51:33,520 --> 02:51:34,880 secret 4351 02:51:34,880 --> 02:51:37,439 and autocomplete is not supported on a 4352 02:51:37,439 --> 02:51:39,760 password input so we can remove that but 4353 02:51:39,760 --> 02:51:41,920 we do want to go ahead and require a 4354 02:51:41,920 --> 02:51:44,319 password so now let's save 4355 02:51:44,319 --> 02:51:46,800 and we see our new input down here that 4356 02:51:46,800 --> 02:51:49,680 says password and that's your secret for 4357 02:51:49,680 --> 02:51:51,680 a placeholder but now when i start to 4358 02:51:51,680 --> 02:51:53,439 type into this input 4359 02:51:53,439 --> 02:51:56,319 notice it has little dots instead of the 4360 02:51:56,319 --> 02:51:58,319 text and actually let me see if i can 4361 02:51:58,319 --> 02:52:00,880 just enlarge this a little bit so we can 4362 02:52:00,880 --> 02:52:03,680 see these better there we go so we see 4363 02:52:03,680 --> 02:52:06,880 little dots here inside of our input 4364 02:52:06,880 --> 02:52:09,120 and that is what a password field does 4365 02:52:09,120 --> 02:52:11,359 so it doesn't let the user see what is 4366 02:52:11,359 --> 02:52:13,600 being typed in okay let's scroll up 4367 02:52:13,600 --> 02:52:16,160 again and i will highlight the last 4368 02:52:16,160 --> 02:52:18,319 paragraph with the label and input shift 4369 02:52:18,319 --> 02:52:20,720 alt and the down arrow to copy 4370 02:52:20,720 --> 02:52:22,160 and now we're going to change this one 4371 02:52:22,160 --> 02:52:24,880 to something different let's say this is 4372 02:52:24,880 --> 02:52:28,000 a phone number so i'll once again select 4373 02:52:28,000 --> 02:52:29,680 well i just wanted the three but it's 4374 02:52:29,680 --> 02:52:31,680 going to change five now because we had 4375 02:52:31,680 --> 02:52:34,000 password in there so many times 4376 02:52:34,000 --> 02:52:35,840 so we can change the label to have a 4377 02:52:35,840 --> 02:52:38,319 capital p this is not a type phone 4378 02:52:38,319 --> 02:52:40,960 though that doesn't exist however type 4379 02:52:40,960 --> 02:52:44,080 tell does which is short for telephone 4380 02:52:44,080 --> 02:52:46,080 so we'll leave the four attribute on the 4381 02:52:46,080 --> 02:52:48,720 label the name attribute and the id 4382 02:52:48,720 --> 02:52:51,600 attribute values all to phone all lower 4383 02:52:51,600 --> 02:52:53,920 case for placeholder let's give an 4384 02:52:53,920 --> 02:52:55,600 example here and i'm going to put 4385 02:52:55,600 --> 02:52:58,600 555-555-5555 4386 02:53:00,160 --> 02:53:02,160 and if we wanted to leave it required we 4387 02:53:02,160 --> 02:53:04,479 could but we can add another attribute 4388 02:53:04,479 --> 02:53:05,680 here too 4389 02:53:05,680 --> 02:53:08,399 and i'm going to press enter just to 4390 02:53:08,399 --> 02:53:10,399 come down a line for this it is the 4391 02:53:10,399 --> 02:53:12,880 pattern attribute now a pattern 4392 02:53:12,880 --> 02:53:14,000 attribute 4393 02:53:14,000 --> 02:53:17,120 supports regular expression patterns and 4394 02:53:17,120 --> 02:53:18,960 that's almost like learning another 4395 02:53:18,960 --> 02:53:20,560 programming language if you're not 4396 02:53:20,560 --> 02:53:23,040 familiar i'll at least show you this one 4397 02:53:23,040 --> 02:53:25,439 that will give a pattern for a phone 4398 02:53:25,439 --> 02:53:26,880 number like we have shown in the 4399 02:53:26,880 --> 02:53:28,240 placeholder so 4400 02:53:28,240 --> 02:53:29,520 we're saying 4401 02:53:29,520 --> 02:53:32,319 zero to nine so this must only be 4402 02:53:32,319 --> 02:53:34,720 numerical digits and then we'll use a 4403 02:53:34,720 --> 02:53:37,200 curly brace and put the number three so 4404 02:53:37,200 --> 02:53:40,160 it should be three numerical digits then 4405 02:53:40,160 --> 02:53:42,560 we'll put the dash and now i'm going to 4406 02:53:42,560 --> 02:53:44,720 put the same pattern again because we 4407 02:53:44,720 --> 02:53:45,600 had 4408 02:53:45,600 --> 02:53:48,479 three more and another dash 4409 02:53:48,479 --> 02:53:50,560 and then finally it's going to be the 4410 02:53:50,560 --> 02:53:52,800 same pattern again because we want all 4411 02:53:52,800 --> 02:53:55,359 numbers and only numbers but this last 4412 02:53:55,359 --> 02:53:56,880 one should be 4. 4413 02:53:56,880 --> 02:53:59,439 and so that is a regular expression 4414 02:53:59,439 --> 02:54:01,439 pattern that would match what you see 4415 02:54:01,439 --> 02:54:04,319 here for the example now why else would 4416 02:54:04,319 --> 02:54:06,880 we put the type tell instead of type 4417 02:54:06,880 --> 02:54:10,319 text or type number well type number has 4418 02:54:10,319 --> 02:54:11,680 a little different display and it 4419 02:54:11,680 --> 02:54:13,359 actually provides arrows that would have 4420 02:54:13,359 --> 02:54:15,520 you click up and down we don't want that 4421 02:54:15,520 --> 02:54:19,200 but type tell also on mobile devices 4422 02:54:19,200 --> 02:54:21,600 should bring up a numeric keypad on the 4423 02:54:21,600 --> 02:54:24,960 screen instead of an alphanumeric 4424 02:54:24,960 --> 02:54:26,880 essentially with letters it should just 4425 02:54:26,880 --> 02:54:28,720 bring up what you would say dial for a 4426 02:54:28,720 --> 02:54:30,240 phone number and now that i'm thinking 4427 02:54:30,240 --> 02:54:31,920 about that the hyphen might not be 4428 02:54:31,920 --> 02:54:33,840 available on that numeric pad so let's 4429 02:54:33,840 --> 02:54:35,680 just make it simpler and go with all 4430 02:54:35,680 --> 02:54:36,960 numbers here 4431 02:54:36,960 --> 02:54:38,800 and remove those hyphens from our 4432 02:54:38,800 --> 02:54:41,200 pattern too so it can still match so 4433 02:54:41,200 --> 02:54:43,439 let's save this and now i'll go ahead 4434 02:54:43,439 --> 02:54:45,760 and copy this down but we'll look at a 4435 02:54:45,760 --> 02:54:48,560 example of a number input so we can 4436 02:54:48,560 --> 02:54:50,160 definitely see the difference right now 4437 02:54:50,160 --> 02:54:52,880 we see the phone input and it's input 4438 02:54:52,880 --> 02:54:54,240 type tell 4439 02:54:54,240 --> 02:54:56,399 and really we don't see anything any 4440 02:54:56,399 --> 02:54:59,200 different here besides that because 4441 02:54:59,200 --> 02:55:02,080 it still allows you to type a hyphen or 4442 02:55:02,080 --> 02:55:04,160 an underscore or anything else you want 4443 02:55:04,160 --> 02:55:06,800 in this input but we're just expecting 4444 02:55:06,800 --> 02:55:08,720 numbers and it will have to match this 4445 02:55:08,720 --> 02:55:10,640 pattern to allow the form to be 4446 02:55:10,640 --> 02:55:13,760 submitted so the pattern does enforce 4447 02:55:13,760 --> 02:55:15,920 what should be entered into that input 4448 02:55:15,920 --> 02:55:17,520 and now let's go ahead and highlight 4449 02:55:17,520 --> 02:55:20,319 phone i'll press ctrl d again and i'm 4450 02:55:20,319 --> 02:55:22,319 going to change this value 4451 02:55:22,319 --> 02:55:24,160 to decade 4452 02:55:24,160 --> 02:55:26,240 and we've changed the four attribute the 4453 02:55:26,240 --> 02:55:28,479 name attribute and the id attribute but 4454 02:55:28,479 --> 02:55:30,479 the label here that we want the user to 4455 02:55:30,479 --> 02:55:32,560 see is going to be 4456 02:55:32,560 --> 02:55:33,600 favorite 4457 02:55:33,600 --> 02:55:35,600 decade 4458 02:55:35,600 --> 02:55:38,880 now let's change the input type 4459 02:55:38,880 --> 02:55:41,920 to number let's go ahead and just remove 4460 02:55:41,920 --> 02:55:43,600 all of these attributes placeholder 4461 02:55:43,600 --> 02:55:45,520 pattern and required 4462 02:55:45,520 --> 02:55:48,880 and now let's add a minimum so we'll set 4463 02:55:48,880 --> 02:55:51,920 the min to 1950 this is where the range 4464 02:55:51,920 --> 02:55:53,359 will start 4465 02:55:53,359 --> 02:55:55,279 let's set the max 4466 02:55:55,279 --> 02:55:57,040 to 2020 4467 02:55:57,040 --> 02:55:58,880 and then there is an attribute called 4468 02:55:58,880 --> 02:56:01,279 step and that means 4469 02:56:01,279 --> 02:56:04,240 the interval in between essentially how 4470 02:56:04,240 --> 02:56:06,720 many years in this case will we be 4471 02:56:06,720 --> 02:56:08,880 switching between values and so we'll 4472 02:56:08,880 --> 02:56:11,439 just move decade by decade which is 10 4473 02:56:11,439 --> 02:56:12,399 years 4474 02:56:12,399 --> 02:56:14,800 and then the starting value so what we 4475 02:56:14,800 --> 02:56:16,560 want to display and we'll start with 4476 02:56:16,560 --> 02:56:18,080 1980. 4477 02:56:18,080 --> 02:56:20,720 so let's save this and now we see our 4478 02:56:20,720 --> 02:56:23,279 favorite decade input here at the bottom 4479 02:56:23,279 --> 02:56:25,920 and when i mouse over notice a couple of 4480 02:56:25,920 --> 02:56:28,160 arrows appear let me enlarge this one 4481 02:56:28,160 --> 02:56:30,640 more time 4482 02:56:30,640 --> 02:56:32,720 oh i enlarged the code instead here we 4483 02:56:32,720 --> 02:56:34,800 go let's enlarge the page one more time 4484 02:56:34,800 --> 02:56:36,960 scroll up and look at this form 4485 02:56:36,960 --> 02:56:39,279 i'll shrink the code there we go 4486 02:56:39,279 --> 02:56:42,560 and so when i mouse over we see 1980 4487 02:56:42,560 --> 02:56:44,399 displayed but we get these arrows so we 4488 02:56:44,399 --> 02:56:46,960 can arrow down to 1970 all the way to 4489 02:56:46,960 --> 02:56:49,520 1950 then i can't go any further 4490 02:56:49,520 --> 02:56:52,560 likewise i can go up to 2020 and can't 4491 02:56:52,560 --> 02:56:55,040 go any higher so our step interval is 4492 02:56:55,040 --> 02:56:57,279 working and our min and max are also 4493 02:56:57,279 --> 02:56:59,680 working and it's displaying numbers and 4494 02:56:59,680 --> 02:57:01,279 now we're going to look at a very 4495 02:57:01,279 --> 02:57:03,200 different kind of input so i'll just 4496 02:57:03,200 --> 02:57:05,600 start over and i won't copy everything 4497 02:57:05,600 --> 02:57:06,560 down 4498 02:57:06,560 --> 02:57:08,479 but i will start with a paragraph 4499 02:57:08,479 --> 02:57:10,240 element again inside the paragraph 4500 02:57:10,240 --> 02:57:12,319 element we will have a label 4501 02:57:12,319 --> 02:57:14,319 and it has a four value i'll put for 4502 02:57:14,319 --> 02:57:16,800 coffee because we'll ask what the user's 4503 02:57:16,800 --> 02:57:18,640 favorite coffee is 4504 02:57:18,640 --> 02:57:22,000 so we'll say favorite 4505 02:57:22,000 --> 02:57:24,240 coffee with a colon 4506 02:57:24,240 --> 02:57:26,160 and now underneath that instead of an 4507 02:57:26,160 --> 02:57:28,000 input element we're going to add what is 4508 02:57:28,000 --> 02:57:30,160 called a select element 4509 02:57:30,160 --> 02:57:33,279 now notice it still has a name and id so 4510 02:57:33,279 --> 02:57:35,760 we'll name or we'll assign the values 4511 02:57:35,760 --> 02:57:38,000 coffee to both of these as well 4512 02:57:38,000 --> 02:57:40,000 the id here still needs to match the 4513 02:57:40,000 --> 02:57:42,080 four for the label and will still have 4514 02:57:42,080 --> 02:57:43,439 the same name 4515 02:57:43,439 --> 02:57:45,840 for the input as it's received at the 4516 02:57:45,840 --> 02:57:48,399 server as well now notice we do have a 4517 02:57:48,399 --> 02:57:50,800 closing select element 4518 02:57:50,800 --> 02:57:52,800 and so with that closing select element 4519 02:57:52,800 --> 02:57:54,560 notice that's already different than the 4520 02:57:54,560 --> 02:57:58,399 input that does not have a closing tag 4521 02:57:58,399 --> 02:57:59,840 for the element 4522 02:57:59,840 --> 02:58:02,399 but inside of select we need to put 4523 02:58:02,399 --> 02:58:05,359 options so let's give our first option 4524 02:58:05,359 --> 02:58:08,560 element here and it has a value and 4525 02:58:08,560 --> 02:58:11,120 we'll set this to regular 4526 02:58:11,120 --> 02:58:13,920 coffee but now that's not what the user 4527 02:58:13,920 --> 02:58:15,760 sees the user is going to see what we 4528 02:58:15,760 --> 02:58:17,520 put between 4529 02:58:17,520 --> 02:58:20,319 the opening option and closing option 4530 02:58:20,319 --> 02:58:23,200 tags so here i'm just going to put 4531 02:58:23,200 --> 02:58:25,040 regular coffee 4532 02:58:25,040 --> 02:58:28,479 with caps instead of all lowercase 4533 02:58:28,479 --> 02:58:31,439 and now for the next option 4534 02:58:31,439 --> 02:58:32,960 let's put 4535 02:58:32,960 --> 02:58:35,439 iced coffee 4536 02:58:35,439 --> 02:58:37,279 and do the same thing as far as what the 4537 02:58:37,279 --> 02:58:40,000 user sees 4538 02:58:41,840 --> 02:58:43,760 there we go i need to scroll up just a 4539 02:58:43,760 --> 02:58:44,960 little more 4540 02:58:44,960 --> 02:58:48,080 and let's look at our next option 4541 02:58:48,080 --> 02:58:50,720 let's say this is a 4542 02:58:50,720 --> 02:58:51,840 latte 4543 02:58:51,840 --> 02:58:54,960 i hope i spelled that right 4544 02:58:54,960 --> 02:58:58,640 and let's give another option 4545 02:58:58,720 --> 02:59:00,760 let's call this 4546 02:59:00,760 --> 02:59:04,479 capuccino cappuccino 4547 02:59:04,479 --> 02:59:07,479 c-a-p-p-u-c-c-i-n-o 4548 02:59:07,600 --> 02:59:09,680 there we go that's a little 4549 02:59:09,680 --> 02:59:11,680 one i don't think about every day whoa i 4550 02:59:11,680 --> 02:59:13,520 scrolled because i clicked just a little 4551 02:59:13,520 --> 02:59:15,520 too far to the right sorry about that 4552 02:59:15,520 --> 02:59:19,680 scrolling back down to our cappuccino 4553 02:59:19,840 --> 02:59:23,520 there it is i scrolled way up by mistake 4554 02:59:23,520 --> 02:59:26,000 get to the end of that line press enter 4555 02:59:26,000 --> 02:59:28,960 add one more option here 4556 02:59:28,960 --> 02:59:33,920 maybe two option let's put a cortado 4557 02:59:36,640 --> 02:59:38,960 and what else could we put oh yes what i 4558 02:59:38,960 --> 02:59:41,200 like to drink which is 4559 02:59:41,200 --> 02:59:44,240 an americano 4560 02:59:46,560 --> 02:59:48,720 so we've got several coffee drinks now 4561 02:59:48,720 --> 02:59:50,080 in our list 4562 02:59:50,080 --> 02:59:52,800 and maybe we should put other others 4563 02:59:52,800 --> 02:59:55,279 always good there because 4564 02:59:55,279 --> 02:59:56,960 there could be something we didn't think 4565 02:59:56,960 --> 02:59:59,200 of so let's just put an other selection 4566 02:59:59,200 --> 03:00:00,319 too 4567 03:00:00,319 --> 03:00:02,080 and save 4568 03:00:02,080 --> 03:00:05,279 and now if we look at our form over here 4569 03:00:05,279 --> 03:00:07,279 we can see the favorite coffee is here 4570 03:00:07,279 --> 03:00:08,960 with the select menu and we have to 4571 03:00:08,960 --> 03:00:10,399 click on the arrow 4572 03:00:10,399 --> 03:00:12,399 and then all of our options show and we 4573 03:00:12,399 --> 03:00:14,640 can choose like i would choose americano 4574 03:00:14,640 --> 03:00:16,880 we could choose other any one of these 4575 03:00:16,880 --> 03:00:19,760 options and the top one is what is 4576 03:00:19,760 --> 03:00:22,240 showing but we could decide to show a 4577 03:00:22,240 --> 03:00:25,520 different one if we set it as selected 4578 03:00:25,520 --> 03:00:28,240 so in the options let's say we want to 4579 03:00:28,240 --> 03:00:30,399 display latte 4580 03:00:30,399 --> 03:00:31,920 by default 4581 03:00:31,920 --> 03:00:34,399 we would put selected here in the option 4582 03:00:34,399 --> 03:00:36,319 and if we save 4583 03:00:36,319 --> 03:00:39,439 now it displays latte by default so you 4584 03:00:39,439 --> 03:00:40,720 can choose 4585 03:00:40,720 --> 03:00:43,040 which one displays instead of just the 4586 03:00:43,040 --> 03:00:45,040 top one our code's looking a little 4587 03:00:45,040 --> 03:00:46,960 messy here as things started to wrap 4588 03:00:46,960 --> 03:00:48,720 lines so let me just expand visual 4589 03:00:48,720 --> 03:00:50,399 studio code for a little bit and you can 4590 03:00:50,399 --> 03:00:52,319 see how this looks much more organized 4591 03:00:52,319 --> 03:00:54,160 when the lines are not wrapping now 4592 03:00:54,160 --> 03:00:56,000 there's another element we can put in 4593 03:00:56,000 --> 03:00:58,479 here to help organize our selections so 4594 03:00:58,479 --> 03:01:00,640 let's do that and it's called an option 4595 03:01:00,640 --> 03:01:03,600 group and that is an opt 4596 03:01:03,600 --> 03:01:04,640 group 4597 03:01:04,640 --> 03:01:06,720 so once i tab over it gives us the 4598 03:01:06,720 --> 03:01:08,960 closing tag too i'm going to highlight 4599 03:01:08,960 --> 03:01:11,279 and control x to cut 4600 03:01:11,279 --> 03:01:13,359 and out of the coffees that we're going 4601 03:01:13,359 --> 03:01:15,840 to have because this first group will be 4602 03:01:15,840 --> 03:01:17,680 coffees it's just the first two options 4603 03:01:17,680 --> 03:01:19,680 so let's close this here it will 4604 03:01:19,680 --> 03:01:22,880 reformat as soon as i save but we also 4605 03:01:22,880 --> 03:01:25,279 need to put a label attribute which is 4606 03:01:25,279 --> 03:01:27,520 different than a label element 4607 03:01:27,520 --> 03:01:29,600 so this label attribute on the option 4608 03:01:29,600 --> 03:01:32,080 group let's put 4609 03:01:32,080 --> 03:01:35,120 coffees with a capital c because you 4610 03:01:35,120 --> 03:01:38,160 will find out the user will see this 4611 03:01:38,160 --> 03:01:39,120 value 4612 03:01:39,120 --> 03:01:41,200 so now let's save this 4613 03:01:41,200 --> 03:01:42,720 and we're not going to look back at the 4614 03:01:42,720 --> 03:01:44,319 web page yet because we need to put 4615 03:01:44,319 --> 03:01:47,200 another opt group here for the other 4616 03:01:47,200 --> 03:01:50,080 coffees so now that we have that 4617 03:01:50,080 --> 03:01:52,399 i'll select the closing tag 4618 03:01:52,399 --> 03:01:54,560 and i'm going to put it after americano 4619 03:01:54,560 --> 03:01:56,560 other doesn't belong to a group and 4620 03:01:56,560 --> 03:01:58,080 that's okay too 4621 03:01:58,080 --> 03:02:00,080 but let's give another label here for 4622 03:02:00,080 --> 03:02:02,560 this group and this will be 4623 03:02:02,560 --> 03:02:04,160 espresso 4624 03:02:04,160 --> 03:02:05,439 drinks 4625 03:02:05,439 --> 03:02:08,960 and save now i'll resize visual studio 4626 03:02:08,960 --> 03:02:10,080 code 4627 03:02:10,080 --> 03:02:13,439 and we can look we still have our latte 4628 03:02:13,439 --> 03:02:15,760 selected as the default choice but now 4629 03:02:15,760 --> 03:02:18,080 if we expand this you can see coffees is 4630 03:02:18,080 --> 03:02:20,240 in bold we can't choose coffees i can't 4631 03:02:20,240 --> 03:02:22,000 choose espresso drinks but i can choose 4632 03:02:22,000 --> 03:02:24,399 regular coffee iced coffee 4633 03:02:24,399 --> 03:02:27,359 latte cappuccino cortado americano or 4634 03:02:27,359 --> 03:02:28,560 other 4635 03:02:28,560 --> 03:02:31,359 but our list is better organized because 4636 03:02:31,359 --> 03:02:33,439 we put in those option groups we can 4637 03:02:33,439 --> 03:02:35,279 make a couple of other changes too so 4638 03:02:35,279 --> 03:02:37,439 let's go back and just look at the code 4639 03:02:37,439 --> 03:02:39,359 again and these other changes are 4640 03:02:39,359 --> 03:02:41,439 actually attributes that will add back 4641 03:02:41,439 --> 03:02:45,200 to this parent select element so one is 4642 03:02:45,200 --> 03:02:47,680 multiple and that means we will be able 4643 03:02:47,680 --> 03:02:50,399 to select more than one choice so we 4644 03:02:50,399 --> 03:02:53,680 could select iced coffee and americana's 4645 03:02:53,680 --> 03:02:57,040 and then we want to put a size value 4646 03:02:57,040 --> 03:02:58,399 and this size 4647 03:02:58,399 --> 03:03:01,520 says how many from the list will display 4648 03:03:01,520 --> 03:03:04,880 on the page at once so if we save that 4649 03:03:04,880 --> 03:03:07,200 you'll see what i mean by size now 4650 03:03:07,200 --> 03:03:08,160 notice 4651 03:03:08,160 --> 03:03:10,720 we have five values automatically 4652 03:03:10,720 --> 03:03:13,200 displaying on the page and notice latte 4653 03:03:13,200 --> 03:03:15,520 is already selected because we told it 4654 03:03:15,520 --> 03:03:17,680 to select latte but we could also hold 4655 03:03:17,680 --> 03:03:20,000 down the control button and click 4656 03:03:20,000 --> 03:03:22,640 regular coffee and now we have two 4657 03:03:22,640 --> 03:03:25,279 selected at once and i just noticed my 4658 03:03:25,279 --> 03:03:27,359 typo in the label where i only have one 4659 03:03:27,359 --> 03:03:30,000 e in coffee so i better fix that 4660 03:03:30,000 --> 03:03:31,840 put the other e in at the end of the 4661 03:03:31,840 --> 03:03:34,399 word and save okay i'm going to expand 4662 03:03:34,399 --> 03:03:36,800 visual studio code once again now this 4663 03:03:36,800 --> 03:03:39,120 looks nice on our page and it allows us 4664 03:03:39,120 --> 03:03:41,120 to select more than one coffee and 4665 03:03:41,120 --> 03:03:43,120 that's great but i want to show another 4666 03:03:43,120 --> 03:03:45,439 input that we could use for this same 4667 03:03:45,439 --> 03:03:47,680 type of data so right now starting on 4668 03:03:47,680 --> 03:03:50,000 line 199 i'm going to highlight 4669 03:03:50,000 --> 03:03:53,439 everything down to 214 now from the edit 4670 03:03:53,439 --> 03:03:55,200 menu i believe 4671 03:03:55,200 --> 03:03:58,080 there is yes toggle a blocked comment 4672 03:03:58,080 --> 03:04:00,640 and i do this with shift alt and the 4673 03:04:00,640 --> 03:04:02,240 letter a so 4674 03:04:02,240 --> 03:04:04,479 i'm going to select all this once again 4675 03:04:04,479 --> 03:04:07,279 this paragraph and press shift alt in 4676 03:04:07,279 --> 03:04:09,760 the letter a and when i do that notice 4677 03:04:09,760 --> 03:04:13,200 it comments everything out so i've kept 4678 03:04:13,200 --> 03:04:15,200 the code if we want to go back to that 4679 03:04:15,200 --> 03:04:17,520 but this is an html comment that we have 4680 03:04:17,520 --> 03:04:20,640 previously gone over in a past lesson 4681 03:04:20,640 --> 03:04:22,479 and it just comments the code out for 4682 03:04:22,479 --> 03:04:26,160 now so i'm going to paste in another way 4683 03:04:26,160 --> 03:04:27,520 that we could 4684 03:04:27,520 --> 03:04:29,520 use this same information and present it 4685 03:04:29,520 --> 03:04:32,479 to the user so here's the paste 4686 03:04:32,479 --> 03:04:34,399 and let me go ahead and return there so 4687 03:04:34,399 --> 03:04:35,760 we have the paragraph on a separate line 4688 03:04:35,760 --> 03:04:37,520 but notice we have a label it's for 4689 03:04:37,520 --> 03:04:40,000 coffee it says favorite coffee now we 4690 03:04:40,000 --> 03:04:42,319 don't have a select we have an input 4691 03:04:42,319 --> 03:04:44,479 type and it's a text type 4692 03:04:44,479 --> 03:04:46,880 and then it has a list attribute and it 4693 03:04:46,880 --> 03:04:48,479 says the list 4694 03:04:48,479 --> 03:04:50,560 is the coffee dash list 4695 03:04:50,560 --> 03:04:53,040 then notice we have a data list element 4696 03:04:53,040 --> 03:04:54,560 and that id 4697 03:04:54,560 --> 03:04:56,640 matches the list attribute of the input 4698 03:04:56,640 --> 03:04:58,880 coffee dash list then i've got some 4699 03:04:58,880 --> 03:05:00,800 values here that are much like the 4700 03:05:00,800 --> 03:05:04,000 values that we saw in our select menu so 4701 03:05:04,000 --> 03:05:05,840 this is just another example now let's 4702 03:05:05,840 --> 03:05:07,920 save this and go back and look at our 4703 03:05:07,920 --> 03:05:08,960 page 4704 03:05:08,960 --> 03:05:10,720 and see what we've got it looks like a 4705 03:05:10,720 --> 03:05:13,359 text input now when i mouse over 4706 03:05:13,359 --> 03:05:14,880 notice the arrow 4707 03:05:14,880 --> 03:05:16,640 and if i click the arrow 4708 03:05:16,640 --> 03:05:18,399 there's our choices that we're getting 4709 03:05:18,399 --> 03:05:20,800 from the data list but what is nice 4710 03:05:20,800 --> 03:05:22,080 about this 4711 03:05:22,080 --> 03:05:24,479 if i just click in there they pop up and 4712 03:05:24,479 --> 03:05:26,479 i can start typing 4713 03:05:26,479 --> 03:05:28,319 and then it just narrows it down it 4714 03:05:28,319 --> 03:05:30,080 filters the list to what i started 4715 03:05:30,080 --> 03:05:32,160 typing so that's a different type of 4716 03:05:32,160 --> 03:05:34,160 input that can handle 4717 03:05:34,160 --> 03:05:37,040 very similar data presentation so okay 4718 03:05:37,040 --> 03:05:39,279 what i'm going to do now is highlight 4719 03:05:39,279 --> 03:05:41,520 that data list leave it in the code for 4720 03:05:41,520 --> 03:05:43,840 you but comment it out again 4721 03:05:43,840 --> 03:05:46,399 i pressed shift alt and the letter a to 4722 03:05:46,399 --> 03:05:47,520 do that 4723 03:05:47,520 --> 03:05:50,000 and i can reverse this comment by doing 4724 03:05:50,000 --> 03:05:52,880 the same thing so again line 199 all the 4725 03:05:52,880 --> 03:05:55,359 way down to 214 4726 03:05:55,359 --> 03:05:58,000 shift alt in the letter a and now it is 4727 03:05:58,000 --> 03:06:00,640 uncommented and so we've got our 4728 03:06:00,640 --> 03:06:01,840 original 4729 03:06:01,840 --> 03:06:04,080 list back with the select and i'll save 4730 03:06:04,080 --> 03:06:06,240 that and you can see that now on our 4731 03:06:06,240 --> 03:06:08,160 page over here on the right okay i'm 4732 03:06:08,160 --> 03:06:10,319 going to expand visual studio code again 4733 03:06:10,319 --> 03:06:12,640 and now so far we have got fairly good 4734 03:06:12,640 --> 03:06:15,120 semantics for our forum because we are 4735 03:06:15,120 --> 03:06:18,080 applying a label with the proper four 4736 03:06:18,080 --> 03:06:20,560 attribute for every type of input that 4737 03:06:20,560 --> 03:06:23,439 we have and that's good but when a form 4738 03:06:23,439 --> 03:06:25,920 gets large sometimes it's good to 4739 03:06:25,920 --> 03:06:28,560 organize it into different sections 4740 03:06:28,560 --> 03:06:30,960 sections that say what each part of the 4741 03:06:30,960 --> 03:06:34,000 form is about so underneath our form 4742 03:06:34,000 --> 03:06:36,479 element the opening tag here i'm going 4743 03:06:36,479 --> 03:06:38,240 to type a new tag 4744 03:06:38,240 --> 03:06:40,000 called field set 4745 03:06:40,000 --> 03:06:42,080 and now i'm going to go ahead and copy 4746 03:06:42,080 --> 03:06:44,479 that closing tag for the field set and 4747 03:06:44,479 --> 03:06:46,880 come all the way down to 4748 03:06:46,880 --> 03:06:49,439 just above our closing of the form as 4749 03:06:49,439 --> 03:06:51,680 well because this will be a section 4750 03:06:51,680 --> 03:06:53,359 where we've asked about the different 4751 03:06:53,359 --> 03:06:55,120 information such as the name and your 4752 03:06:55,120 --> 03:06:57,920 favorite coffee and so on and now 4753 03:06:57,920 --> 03:07:01,279 inside of this field set we can specify 4754 03:07:01,279 --> 03:07:03,680 one more element and this is called 4755 03:07:03,680 --> 03:07:06,240 legend it's a lot like a caption and 4756 03:07:06,240 --> 03:07:08,319 this is just saying what we're 4757 03:07:08,319 --> 03:07:10,720 requesting in this section of the form 4758 03:07:10,720 --> 03:07:13,279 and i'll put personal info here and then 4759 03:07:13,279 --> 03:07:15,680 we can save now let's go back and look 4760 03:07:15,680 --> 03:07:17,120 at our form again 4761 03:07:17,120 --> 03:07:19,439 and you can see it's surrounded this 4762 03:07:19,439 --> 03:07:20,880 section of the form because we're going 4763 03:07:20,880 --> 03:07:22,560 to add more to it yet so we just 4764 03:07:22,560 --> 03:07:24,479 sectioned off part of our form 4765 03:07:24,479 --> 03:07:25,680 essentially 4766 03:07:25,680 --> 03:07:28,479 it's got a square around it and personal 4767 03:07:28,479 --> 03:07:32,319 info the legend is part of that frame of 4768 03:07:32,319 --> 03:07:34,560 this section of the form and clearly 4769 03:07:34,560 --> 03:07:36,720 this does give some more semantic 4770 03:07:36,720 --> 03:07:39,279 meaning actually conveys meaning in our 4771 03:07:39,279 --> 03:07:41,439 structure as we define 4772 03:07:41,439 --> 03:07:44,000 part of the form and what it's about 4773 03:07:44,000 --> 03:07:46,319 okay let's continue to add to our form 4774 03:07:46,319 --> 03:07:48,000 now because there's some other types of 4775 03:07:48,000 --> 03:07:50,399 inputs we want to cover so let's scroll 4776 03:07:50,399 --> 03:07:53,520 all the way down by our field set and 4777 03:07:53,520 --> 03:07:56,080 now after the field set we'll put in a 4778 03:07:56,080 --> 03:07:57,359 break 4779 03:07:57,359 --> 03:08:00,000 and then we can add a new field set so 4780 03:08:00,000 --> 03:08:02,960 inside this field set we can add another 4781 03:08:02,960 --> 03:08:05,520 legend element and we're going to say 4782 03:08:05,520 --> 03:08:07,920 what is your 4783 03:08:07,920 --> 03:08:10,479 favorite food so this section of the 4784 03:08:10,479 --> 03:08:12,560 form is all about choosing a favorite 4785 03:08:12,560 --> 03:08:13,680 food 4786 03:08:13,680 --> 03:08:16,080 we'll start with a paragraph 4787 03:08:16,080 --> 03:08:18,399 inside this paragraph let's have an 4788 03:08:18,399 --> 03:08:21,040 input before the label this time 4789 03:08:21,040 --> 03:08:23,920 and this is going to be type radio radio 4790 03:08:23,920 --> 03:08:25,680 inputs are a little different 4791 03:08:25,680 --> 03:08:28,240 but let's give it a name attribute and 4792 03:08:28,240 --> 03:08:30,160 this will be for food 4793 03:08:30,160 --> 03:08:32,560 and now the id attribute is going to be 4794 03:08:32,560 --> 03:08:34,319 different than the name this time so 4795 03:08:34,319 --> 03:08:36,240 we're going to say tacos this is going 4796 03:08:36,240 --> 03:08:38,880 to actually be more like what the value 4797 03:08:38,880 --> 03:08:41,200 of the input is and we'll assign the 4798 03:08:41,200 --> 03:08:43,680 value attribute and here we'll say tacos 4799 03:08:43,680 --> 03:08:44,720 as well 4800 03:08:44,720 --> 03:08:46,399 so now that we've done that let's go 4801 03:08:46,399 --> 03:08:50,080 ahead and put the label underneath 4802 03:08:50,080 --> 03:08:52,080 and there we can have the four which it 4803 03:08:52,080 --> 03:08:55,680 should still match the id which is tacos 4804 03:08:55,680 --> 03:08:57,200 and then what do we want to show in the 4805 03:08:57,200 --> 03:08:59,760 label well of course tacos with a 4806 03:08:59,760 --> 03:09:01,200 capital t 4807 03:09:01,200 --> 03:09:02,560 okay now that we've done that we've 4808 03:09:02,560 --> 03:09:04,880 created one radio button so we need to 4809 03:09:04,880 --> 03:09:07,279 do a couple more so we have other food 4810 03:09:07,279 --> 03:09:09,840 choices i know tacos is the proper 4811 03:09:09,840 --> 03:09:11,600 choice but we should have a couple of 4812 03:09:11,600 --> 03:09:13,840 other choices here so i'm going to just 4813 03:09:13,840 --> 03:09:16,240 do shift alt in the down arrow twice 4814 03:09:16,240 --> 03:09:18,080 we've copied those down 4815 03:09:18,080 --> 03:09:20,080 we're going to leave the name attribute 4816 03:09:20,080 --> 03:09:23,200 food on all of these and that's because 4817 03:09:23,200 --> 03:09:25,520 you should only be able to select one of 4818 03:09:25,520 --> 03:09:27,760 these so when we select one the other 4819 03:09:27,760 --> 03:09:29,200 choice should 4820 03:09:29,200 --> 03:09:31,279 not be selected and that's what we 4821 03:09:31,279 --> 03:09:33,840 achieve by giving them all the same name 4822 03:09:33,840 --> 03:09:36,640 for the input but as far as tacos for 4823 03:09:36,640 --> 03:09:37,920 the id 4824 03:09:37,920 --> 03:09:40,000 and the value we can change that to 4825 03:09:40,000 --> 03:09:41,920 pizza 4826 03:09:41,920 --> 03:09:44,399 and we of course should change pizza 4827 03:09:44,399 --> 03:09:46,160 here oh and i should have changed the 4828 03:09:46,160 --> 03:09:48,319 four here to pizza as well so there 4829 03:09:48,319 --> 03:09:51,279 should be three now this last one let's 4830 03:09:51,279 --> 03:09:53,920 go ahead and select all three tacos 4831 03:09:53,920 --> 03:09:56,160 change it to other 4832 03:09:56,160 --> 03:09:59,520 and then here we'll say other as well 4833 03:09:59,520 --> 03:10:03,279 now i should note that if we had an id 4834 03:10:03,279 --> 03:10:05,520 of other we didn't with our option up 4835 03:10:05,520 --> 03:10:07,279 here that was separate 4836 03:10:07,279 --> 03:10:09,840 that had just the value of other as far 4837 03:10:09,840 --> 03:10:11,760 as the option and the name and the id 4838 03:10:11,760 --> 03:10:14,160 was coffee so we're good but you don't 4839 03:10:14,160 --> 03:10:16,399 want to double up you want to make sure 4840 03:10:16,399 --> 03:10:19,359 you have individual or unique ids for 4841 03:10:19,359 --> 03:10:21,680 each input in your form okay now that 4842 03:10:21,680 --> 03:10:23,920 we've added our new field set with the 4843 03:10:23,920 --> 03:10:25,760 choices for our favorite foods let's 4844 03:10:25,760 --> 03:10:28,399 take a look at that back on our page so 4845 03:10:28,399 --> 03:10:30,479 if we scroll up we've got what is your 4846 03:10:30,479 --> 03:10:32,640 favorite food and since they're all in 4847 03:10:32,640 --> 03:10:34,560 paragraphs which are their own block 4848 03:10:34,560 --> 03:10:37,680 elements they're each on their own line 4849 03:10:37,680 --> 03:10:40,560 inside of our field set so we can choose 4850 03:10:40,560 --> 03:10:43,120 tacos but then because they all have the 4851 03:10:43,120 --> 03:10:46,800 same name food if i choose pizza tacos 4852 03:10:46,800 --> 03:10:48,560 is no longer selected and it's only 4853 03:10:48,560 --> 03:10:50,960 pizza so you want to make sure 4854 03:10:50,960 --> 03:10:53,279 out of the radio buttons they all have 4855 03:10:53,279 --> 03:10:56,000 the same value for the name attribute 4856 03:10:56,000 --> 03:10:58,080 okay let's scroll down a little more and 4857 03:10:58,080 --> 03:11:00,479 let's add another field set and we'll 4858 03:11:00,479 --> 03:11:04,000 look at another type of input 4859 03:11:04,000 --> 03:11:05,920 inside this field set we'll have a 4860 03:11:05,920 --> 03:11:07,840 legend as well and here we're going to 4861 03:11:07,840 --> 03:11:09,439 say do you 4862 03:11:09,439 --> 03:11:13,279 have pets with a question mark 4863 03:11:13,279 --> 03:11:15,359 and now for our inputs 4864 03:11:15,359 --> 03:11:18,160 they're very similar to radio buttons 4865 03:11:18,160 --> 03:11:20,319 but not quite the same so i'll start out 4866 03:11:20,319 --> 03:11:22,160 with a paragraph 4867 03:11:22,160 --> 03:11:23,200 input 4868 03:11:23,200 --> 03:11:27,040 and the type is not text it is check box 4869 03:11:27,040 --> 03:11:29,600 and then once again there will be a name 4870 03:11:29,600 --> 03:11:32,319 and we'll set this equal to pets 4871 03:11:32,319 --> 03:11:35,840 and the id is going to be equal to dog 4872 03:11:35,840 --> 03:11:37,920 and then the value 4873 03:11:37,920 --> 03:11:39,920 is equal to dog so you can see the 4874 03:11:39,920 --> 03:11:42,479 pattern is much like when we were adding 4875 03:11:42,479 --> 03:11:44,239 radio buttons let me expand visual 4876 03:11:44,239 --> 03:11:45,680 studio code so this will be a little 4877 03:11:45,680 --> 03:11:46,720 easier 4878 03:11:46,720 --> 03:11:49,439 and now we'll go ahead and add a label 4879 03:11:49,439 --> 03:11:51,840 after that 4880 03:11:52,080 --> 03:11:55,040 and the label value will be for dog 4881 03:11:55,040 --> 03:11:57,200 and what we will display on the page 4882 03:11:57,200 --> 03:11:58,880 will be dog as well 4883 03:11:58,880 --> 03:12:01,520 so very similar i'll highlight this 4884 03:12:01,520 --> 03:12:03,600 we'll copy this down 4885 03:12:03,600 --> 03:12:06,960 three times so now we'll continue to 4886 03:12:06,960 --> 03:12:09,200 have the value pets for each one of 4887 03:12:09,200 --> 03:12:10,560 these inputs 4888 03:12:10,560 --> 03:12:14,000 but the next pet will switch from dog 4889 03:12:14,000 --> 03:12:15,359 to 4890 03:12:15,359 --> 03:12:16,880 cat 4891 03:12:16,880 --> 03:12:18,720 and we'll put cat here on display as 4892 03:12:18,720 --> 03:12:19,840 well 4893 03:12:19,840 --> 03:12:24,080 and then maybe we want a fish 4894 03:12:25,680 --> 03:12:28,640 we'll switch this to fish 4895 03:12:28,640 --> 03:12:30,160 and then finally 4896 03:12:30,160 --> 03:12:32,640 we could think about doing an other as 4897 03:12:32,640 --> 03:12:34,399 well but remember 4898 03:12:34,399 --> 03:12:36,720 we can't have an id that says other here 4899 03:12:36,720 --> 03:12:38,880 too we would be doubling up on that so 4900 03:12:38,880 --> 03:12:43,040 that could be a problem let's say 4901 03:12:44,000 --> 03:12:46,880 and select all three and say other 4902 03:12:46,880 --> 03:12:48,000 pet 4903 03:12:48,000 --> 03:12:50,640 and from there 4904 03:12:50,640 --> 03:12:52,800 we could say other because we just need 4905 03:12:52,800 --> 03:12:56,319 this to be different the id specifically 4906 03:12:56,319 --> 03:12:59,200 needs to be different than any other id 4907 03:12:59,200 --> 03:13:01,279 on the page or in the form now let's 4908 03:13:01,279 --> 03:13:02,960 save this and look at the page and there 4909 03:13:02,960 --> 03:13:04,560 will be a difference between the radio 4910 03:13:04,560 --> 03:13:06,800 buttons because when we ask do you have 4911 03:13:06,800 --> 03:13:09,279 pets and we have a check box maybe we 4912 03:13:09,279 --> 03:13:10,479 have a dog 4913 03:13:10,479 --> 03:13:12,640 and a fish and we can select more than 4914 03:13:12,640 --> 03:13:14,880 one at once a radio button won't let us 4915 03:13:14,880 --> 03:13:18,160 do that but a check box will so maybe we 4916 03:13:18,160 --> 03:13:21,520 have a dog and a frog so we choose other 4917 03:13:21,520 --> 03:13:24,080 you can select as many of these or as 4918 03:13:24,080 --> 03:13:26,479 few of these as you want to 4919 03:13:26,479 --> 03:13:28,640 okay let's expand visual studio code 4920 03:13:28,640 --> 03:13:31,359 again and we're down to our last input 4921 03:13:31,359 --> 03:13:32,720 type so 4922 03:13:32,720 --> 03:13:34,800 we've covered quite a few today already 4923 03:13:34,800 --> 03:13:37,439 let's add one more field set and inside 4924 03:13:37,439 --> 03:13:39,840 of here another legend as well and let's 4925 03:13:39,840 --> 03:13:40,720 put 4926 03:13:40,720 --> 03:13:42,479 send me 4927 03:13:42,479 --> 03:13:43,760 a note 4928 03:13:43,760 --> 03:13:46,000 so inside of this field set we're only 4929 03:13:46,000 --> 03:13:47,680 going to have one input but it's 4930 03:13:47,680 --> 03:13:50,000 definitely different than the others 4931 03:13:50,000 --> 03:13:52,720 this one is going to have a label 4932 03:13:52,720 --> 03:13:54,840 and in the four area we'll just put 4933 03:13:54,840 --> 03:13:58,640 message and here we'll put 4934 03:13:58,640 --> 03:14:00,720 your message 4935 03:14:00,720 --> 03:14:02,960 and now underneath the label let's go 4936 03:14:02,960 --> 03:14:05,200 ahead and add a line break just to give 4937 03:14:05,200 --> 03:14:07,680 it a little space and then we'll add our 4938 03:14:07,680 --> 03:14:10,880 input which is a text area 4939 03:14:10,880 --> 03:14:13,120 this should have a name and an id and 4940 03:14:13,120 --> 03:14:14,960 you can also see it's automatically 4941 03:14:14,960 --> 03:14:17,200 given columns and rows 4942 03:14:17,200 --> 03:14:21,200 so for the name value we'll put message 4943 03:14:21,200 --> 03:14:23,600 likewise that should be the same for the 4944 03:14:23,600 --> 03:14:26,720 id since it needs to match r4 4945 03:14:26,720 --> 03:14:28,880 and for the columns and the rows let's 4946 03:14:28,880 --> 03:14:30,399 just leave it to the defaults here that 4947 03:14:30,399 --> 03:14:32,720 visual studio code gave us it's 30 4948 03:14:32,720 --> 03:14:36,160 columns that would be how wide it is and 4949 03:14:36,160 --> 03:14:39,840 rows 10 rows would be how deep it is so 4950 03:14:39,840 --> 03:14:42,239 now inside the text area here we could 4951 03:14:42,239 --> 03:14:44,880 put a value already this would be the 4952 03:14:44,880 --> 03:14:47,359 value or where the user would type but i 4953 03:14:47,359 --> 03:14:48,800 don't really want to do that i want to 4954 03:14:48,800 --> 03:14:50,800 leave it blank but we can add some other 4955 03:14:50,800 --> 03:14:53,600 attributes so for those attributes or 4956 03:14:53,600 --> 03:14:56,160 attribute i should say let's add a 4957 03:14:56,160 --> 03:14:57,520 placeholder 4958 03:14:57,520 --> 03:14:59,520 and inside of this placeholder we can go 4959 03:14:59,520 --> 03:15:02,399 ahead and put type your 4960 03:15:02,399 --> 03:15:03,439 message 4961 03:15:03,439 --> 03:15:04,399 here 4962 03:15:04,399 --> 03:15:05,920 and then we'll just leave this blank but 4963 03:15:05,920 --> 03:15:07,840 if you were to put it here it would be 4964 03:15:07,840 --> 03:15:10,399 like a text input setting the value 4965 03:15:10,399 --> 03:15:12,239 attribute but you don't really do that 4966 03:15:12,239 --> 03:15:14,080 for a text area you would just go ahead 4967 03:15:14,080 --> 03:15:15,120 and type 4968 03:15:15,120 --> 03:15:16,720 whatever you wanted to 4969 03:15:16,720 --> 03:15:18,960 right there and it would be the value in 4970 03:15:18,960 --> 03:15:22,239 the text area so let's save this and now 4971 03:15:22,239 --> 03:15:24,479 let's look back at our form again if we 4972 03:15:24,479 --> 03:15:27,040 scroll down we can see an area where 4973 03:15:27,040 --> 03:15:29,600 we're ready to type a message hey this 4974 03:15:29,600 --> 03:15:31,840 is 4975 03:15:31,920 --> 03:15:34,160 my message 4976 03:15:34,160 --> 03:15:35,920 there we go so 4977 03:15:35,920 --> 03:15:38,000 that you commonly see on a contact us 4978 03:15:38,000 --> 03:15:41,359 form you might have a area for the email 4979 03:15:41,359 --> 03:15:44,640 for a different message and so on but 4980 03:15:44,640 --> 03:15:46,160 this would be where you would typically 4981 03:15:46,160 --> 03:15:48,560 type a paragraph and i just mentioned 4982 03:15:48,560 --> 03:15:50,800 email that is another type of input 4983 03:15:50,800 --> 03:15:53,359 actually besides text and password so 4984 03:15:53,359 --> 03:15:56,080 you could say it would be a type email 4985 03:15:56,080 --> 03:15:58,479 it looks like a text input but it looks 4986 03:15:58,479 --> 03:16:00,399 for the at symbol to make sure it's 4987 03:16:00,399 --> 03:16:03,520 inside of the input as well so i did not 4988 03:16:03,520 --> 03:16:06,000 cover all inputs today but we covered 4989 03:16:06,000 --> 03:16:08,960 many of them and now we have a full form 4990 03:16:08,960 --> 03:16:10,640 but we're definitely missing something 4991 03:16:10,640 --> 03:16:13,520 yet we have no way to submit our form 4992 03:16:13,520 --> 03:16:15,840 after we fill it out so we need to add 4993 03:16:15,840 --> 03:16:18,479 submit button or buttons at the end 4994 03:16:18,479 --> 03:16:20,640 let's start out with one so after that 4995 03:16:20,640 --> 03:16:22,640 final field set we'll put in another 4996 03:16:22,640 --> 03:16:24,720 line break and then let's put in a 4997 03:16:24,720 --> 03:16:27,359 button element now a button element 4998 03:16:27,359 --> 03:16:29,439 should have a type 4999 03:16:29,439 --> 03:16:32,479 we'll set that equal to submit 5000 03:16:32,479 --> 03:16:35,359 note you might also see a form 5001 03:16:35,359 --> 03:16:38,000 that has a type 5002 03:16:38,000 --> 03:16:40,160 and here we should put submit there we 5003 03:16:40,160 --> 03:16:43,600 go so you might see an input with a type 5004 03:16:43,600 --> 03:16:46,319 submit and that can also create a button 5005 03:16:46,319 --> 03:16:48,880 the main difference here is that it only 5006 03:16:48,880 --> 03:16:50,880 takes a text value and that's what will 5007 03:16:50,880 --> 03:16:52,399 show up on the button 5008 03:16:52,399 --> 03:16:54,640 inside of a button element you could 5009 03:16:54,640 --> 03:16:56,080 actually put 5010 03:16:56,080 --> 03:16:58,720 more things than just a text value 5011 03:16:58,720 --> 03:17:00,399 inside of the button element so that 5012 03:17:00,399 --> 03:17:02,239 that is a big difference i like to use 5013 03:17:02,239 --> 03:17:04,880 the button elements overall because once 5014 03:17:04,880 --> 03:17:07,040 again it's a little more semantic here 5015 03:17:07,040 --> 03:17:09,279 we're saying it's a button and then we 5016 03:17:09,279 --> 03:17:12,160 can just set the type to a submit button 5017 03:17:12,160 --> 03:17:14,720 so here inside of the button i'm going 5018 03:17:14,720 --> 03:17:17,520 to type submit and that's what will show 5019 03:17:17,520 --> 03:17:19,920 up on the button so let's go ahead and 5020 03:17:19,920 --> 03:17:21,040 save 5021 03:17:21,040 --> 03:17:23,520 and now if i scroll down 5022 03:17:23,520 --> 03:17:25,439 we can see our submit button here that 5023 03:17:25,439 --> 03:17:27,680 is ready there's another type of button 5024 03:17:27,680 --> 03:17:30,479 though too and let's add it to our form 5025 03:17:30,479 --> 03:17:32,880 and let's go back and put a type 5026 03:17:32,880 --> 03:17:34,640 set this equal to 5027 03:17:34,640 --> 03:17:37,680 reset so if we wanted to reset our form 5028 03:17:37,680 --> 03:17:39,840 and clear out all of the values it's 5029 03:17:39,840 --> 03:17:42,880 fairly handy to have a reset button 5030 03:17:42,880 --> 03:17:44,800 every time i save it's going back up but 5031 03:17:44,800 --> 03:17:48,239 there we go submit and reset 5032 03:17:48,239 --> 03:17:51,680 and submit when you submit a page it 5033 03:17:51,680 --> 03:17:53,359 checks the validation immediately so 5034 03:17:53,359 --> 03:17:55,120 notice when i clicked 5035 03:17:55,120 --> 03:17:58,000 that submit button it said i needed to 5036 03:17:58,000 --> 03:17:59,439 fill this value out because it's 5037 03:17:59,439 --> 03:18:01,600 required and we didn't put a value in 5038 03:18:01,600 --> 03:18:04,720 there so i'll do that again 5039 03:18:04,720 --> 03:18:06,479 it instantly takes us up here and says 5040 03:18:06,479 --> 03:18:09,120 please fill out this field so we've got 5041 03:18:09,120 --> 03:18:11,600 more than one required let me put 5042 03:18:11,600 --> 03:18:13,520 dave in the first name 5043 03:18:13,520 --> 03:18:16,080 go back and click submit again 5044 03:18:16,080 --> 03:18:18,000 notice it takes me the last name and 5045 03:18:18,000 --> 03:18:18,800 says 5046 03:18:18,800 --> 03:18:20,399 please fill out this field so it's going 5047 03:18:20,399 --> 03:18:23,600 to do that for every required field 5048 03:18:23,600 --> 03:18:25,600 until they're all filled out so we could 5049 03:18:25,600 --> 03:18:28,080 put in anything in the password field 5050 03:18:28,080 --> 03:18:29,920 and i don't think we required anything 5051 03:18:29,920 --> 03:18:31,680 else let's take a look though maybe we 5052 03:18:31,680 --> 03:18:34,319 did no phone number is required so one 5053 03:18:34,319 --> 03:18:35,680 two three 5054 03:18:35,680 --> 03:18:39,200 four five six seven eight nine and let's 5055 03:18:39,200 --> 03:18:41,120 leave it at that and it says please 5056 03:18:41,120 --> 03:18:43,040 match the requested format it knows we 5057 03:18:43,040 --> 03:18:44,800 haven't matched yet so i need one more 5058 03:18:44,800 --> 03:18:45,840 number 5059 03:18:45,840 --> 03:18:48,640 that should be good now if i submit 5060 03:18:48,640 --> 03:18:50,720 it's submitted now let's go ahead and 5061 03:18:50,720 --> 03:18:52,880 look at this what are we getting 5062 03:18:52,880 --> 03:18:53,760 from 5063 03:18:53,760 --> 03:18:57,200 http bin and boy that is bright but i'm 5064 03:18:57,200 --> 03:18:59,760 going to make this larger we see it's 5065 03:18:59,760 --> 03:19:01,439 it's labeled as args which means 5066 03:19:01,439 --> 03:19:03,600 arguments what were sent with the form 5067 03:19:03,600 --> 03:19:05,520 we didn't have everything filled out yet 5068 03:19:05,520 --> 03:19:07,600 but it did send our default value for 5069 03:19:07,600 --> 03:19:10,000 coffee and decade as well 5070 03:19:10,000 --> 03:19:11,920 we didn't have a message but it did at 5071 03:19:11,920 --> 03:19:14,239 least show that it was an empty message 5072 03:19:14,239 --> 03:19:16,080 and it shows what else we filled out 5073 03:19:16,080 --> 03:19:17,840 including the password notice that 5074 03:19:17,840 --> 03:19:20,160 doesn't mean it's encrypted it just 5075 03:19:20,160 --> 03:19:22,319 didn't show it to us as we entered it so 5076 03:19:22,319 --> 03:19:23,680 we have to consider that if we're 5077 03:19:23,680 --> 03:19:26,319 sending any sensitive information to 5078 03:19:26,319 --> 03:19:27,680 but overall 5079 03:19:27,680 --> 03:19:29,600 that is what we got so we could fill out 5080 03:19:29,600 --> 03:19:31,120 the rest of the form and see how all 5081 03:19:31,120 --> 03:19:33,200 that looks let's resize the browser 5082 03:19:33,200 --> 03:19:34,160 again 5083 03:19:34,160 --> 03:19:35,840 boy that is bright when we look at that 5084 03:19:35,840 --> 03:19:39,200 information but notice when we went back 5085 03:19:39,200 --> 03:19:40,960 the information is in all of these other 5086 03:19:40,960 --> 03:19:42,640 fields but it's not in the password 5087 03:19:42,640 --> 03:19:44,640 field we would have to re-enter that 5088 03:19:44,640 --> 03:19:47,200 every time and that's just part of being 5089 03:19:47,200 --> 03:19:49,439 with the password field so for favorite 5090 03:19:49,439 --> 03:19:51,600 coffee let's choose a couple here i'm 5091 03:19:51,600 --> 03:19:53,439 biased i want to choose americano 5092 03:19:53,439 --> 03:19:55,359 because that's my favorite 5093 03:19:55,359 --> 03:19:58,160 tacos is the correct answer here do i 5094 03:19:58,160 --> 03:20:01,040 have pets let's go with dog and other 5095 03:20:01,040 --> 03:20:02,239 because 5096 03:20:02,239 --> 03:20:04,800 well i've got two dogs really and then 5097 03:20:04,800 --> 03:20:07,680 we've got your message so i'll just put 5098 03:20:07,680 --> 03:20:10,399 hey this is 5099 03:20:10,399 --> 03:20:11,520 a 5100 03:20:11,520 --> 03:20:12,800 message 5101 03:20:12,800 --> 03:20:14,880 there we go let's submit again it's 5102 03:20:14,880 --> 03:20:17,359 going to be bright i know but okay nice 5103 03:20:17,359 --> 03:20:19,520 it fits on here the rest of this down 5104 03:20:19,520 --> 03:20:21,760 below is headers and just information 5105 03:20:21,760 --> 03:20:23,520 about how it was submitted with the 5106 03:20:23,520 --> 03:20:26,160 browser so that's server information but 5107 03:20:26,160 --> 03:20:28,800 this is what we're looking at notice now 5108 03:20:28,800 --> 03:20:31,359 coffee gave us both values we got the 5109 03:20:31,359 --> 03:20:33,600 latte and the americano 5110 03:20:33,600 --> 03:20:35,279 we got decade 5111 03:20:35,279 --> 03:20:38,080 first name oh and the server sorted this 5112 03:20:38,080 --> 03:20:40,880 in order of fields so food comes after 5113 03:20:40,880 --> 03:20:42,720 first name before last name there's 5114 03:20:42,720 --> 03:20:43,840 tacos 5115 03:20:43,840 --> 03:20:46,880 last name and a message and so on so we 5116 03:20:46,880 --> 03:20:48,800 got everything we expected to right 5117 03:20:48,800 --> 03:20:51,520 there let's add one more button to our 5118 03:20:51,520 --> 03:20:52,479 form 5119 03:20:52,479 --> 03:20:54,479 and this one will allow us to do 5120 03:20:54,479 --> 03:20:56,880 something that we haven't done before 5121 03:20:56,880 --> 03:21:00,000 and that is override what we are setting 5122 03:21:00,000 --> 03:21:02,640 in the actual original form action and 5123 03:21:02,640 --> 03:21:06,000 method so this will also be type submit 5124 03:21:06,000 --> 03:21:08,000 and you can have more than one submit 5125 03:21:08,000 --> 03:21:09,520 button perform 5126 03:21:09,520 --> 03:21:11,359 and now this instead of just having an 5127 03:21:11,359 --> 03:21:13,760 action attribute we'll have a form 5128 03:21:13,760 --> 03:21:17,040 action attribute and here we can provide 5129 03:21:17,040 --> 03:21:19,520 a different address to send the 5130 03:21:19,520 --> 03:21:22,880 information to when we press this button 5131 03:21:22,880 --> 03:21:25,200 so i'm going to use a very similar 5132 03:21:25,200 --> 03:21:27,200 address it will be to the same website 5133 03:21:27,200 --> 03:21:30,479 https colon slash slash 5134 03:21:30,479 --> 03:21:32,319 let's go ahead and expand visual studio 5135 03:21:32,319 --> 03:21:34,239 code so we have some more room here 5136 03:21:34,239 --> 03:21:37,680 there we go http 5137 03:21:37,680 --> 03:21:40,560 org slash host so we're going to use the 5138 03:21:40,560 --> 03:21:43,200 post method instead of the get method 5139 03:21:43,200 --> 03:21:44,319 and now 5140 03:21:44,319 --> 03:21:46,560 for the next attribute instead of just 5141 03:21:46,560 --> 03:21:49,120 method this is form 5142 03:21:49,120 --> 03:21:52,880 method and we'll set this equal to post 5143 03:21:52,880 --> 03:21:55,600 and so on the button itself instead of 5144 03:21:55,600 --> 03:21:58,239 submit i'm going to put post 5145 03:21:58,239 --> 03:22:00,880 and we can save and now this will allow 5146 03:22:00,880 --> 03:22:03,680 us to submit the same information 5147 03:22:03,680 --> 03:22:06,720 with a post instead of a submit now 5148 03:22:06,720 --> 03:22:08,319 notice all the information is cleared 5149 03:22:08,319 --> 03:22:10,080 out because we successfully submitted 5150 03:22:10,080 --> 03:22:12,160 before so i need to enter in 5151 03:22:12,160 --> 03:22:15,760 at least the required information again 5152 03:22:15,760 --> 03:22:17,520 and i believe that was the first four 5153 03:22:17,520 --> 03:22:19,359 fields 5154 03:22:19,359 --> 03:22:23,279 79 put a 1 there we should be good and 5155 03:22:23,279 --> 03:22:25,920 now let's go ahead and just press post 5156 03:22:25,920 --> 03:22:28,080 and see what we get 5157 03:22:28,080 --> 03:22:30,960 so we sent it post now to the same 5158 03:22:30,960 --> 03:22:34,239 website and you can see from the form 5159 03:22:34,239 --> 03:22:37,120 not just args as they were processing 5160 03:22:37,120 --> 03:22:40,560 with the get request however this is of 5161 03:22:40,560 --> 03:22:42,720 course just for this server it could be 5162 03:22:42,720 --> 03:22:44,479 processed differently on a different 5163 03:22:44,479 --> 03:22:46,560 server but we have our labels and we 5164 03:22:46,560 --> 03:22:48,640 have the information from the form 5165 03:22:48,640 --> 03:22:50,560 what's important to note 5166 03:22:50,560 --> 03:22:52,560 is that it says the origin where it was 5167 03:22:52,560 --> 03:22:55,279 sent from and different things here and 5168 03:22:55,279 --> 03:22:57,920 it says the url at the very bottom where 5169 03:22:57,920 --> 03:22:59,920 it was sent to and that is what we 5170 03:22:59,920 --> 03:23:01,200 specified 5171 03:23:01,200 --> 03:23:03,520 so now let's look at the same thing if 5172 03:23:03,520 --> 03:23:05,600 we are to send this information and i 5173 03:23:05,600 --> 03:23:07,760 need to put information back inside of 5174 03:23:07,760 --> 03:23:10,239 the password i guess it didn't clear out 5175 03:23:10,239 --> 03:23:11,920 because it was submitted before i 5176 03:23:11,920 --> 03:23:14,000 incorrectly said that it cleared out 5177 03:23:14,000 --> 03:23:16,399 because we made a change and saved the 5178 03:23:16,399 --> 03:23:18,960 html again so it reloaded here with live 5179 03:23:18,960 --> 03:23:19,920 server 5180 03:23:19,920 --> 03:23:21,840 but if we scroll to the bottom now and 5181 03:23:21,840 --> 03:23:23,760 just submit and this is remember is a 5182 03:23:23,760 --> 03:23:27,200 get request not a post request 5183 03:23:27,200 --> 03:23:30,560 now of course this http bin shows this 5184 03:23:30,560 --> 03:23:33,120 as args up here instead of under the 5185 03:23:33,120 --> 03:23:35,680 form heading but once again we get all 5186 03:23:35,680 --> 03:23:37,359 of our information but what i want to 5187 03:23:37,359 --> 03:23:39,680 show you is when i scroll to the bottom 5188 03:23:39,680 --> 03:23:42,080 look at the url 5189 03:23:42,080 --> 03:23:45,040 now all of our information is shown 5190 03:23:45,040 --> 03:23:47,120 inside the url and that's what happens 5191 03:23:47,120 --> 03:23:49,040 with a get request so you never want to 5192 03:23:49,040 --> 03:23:51,359 send sensitive information with a get 5193 03:23:51,359 --> 03:23:53,520 request because if we looked up here at 5194 03:23:53,520 --> 03:23:55,680 this url we would see all of the 5195 03:23:55,680 --> 03:23:58,239 information inside of it matter of fact 5196 03:23:58,239 --> 03:24:00,800 i'll expand this it will be bright again 5197 03:24:00,800 --> 03:24:03,200 but there is all of our information in 5198 03:24:03,200 --> 03:24:05,600 the url and that's what happens when you 5199 03:24:05,600 --> 03:24:07,760 send a get request 5200 03:24:07,760 --> 03:24:10,960 okay headed back to our form resize so 5201 03:24:10,960 --> 03:24:13,200 now you have added a full 5202 03:24:13,200 --> 03:24:14,560 contact 5203 03:24:14,560 --> 03:24:18,160 form to your html page and this is maybe 5204 03:24:18,160 --> 03:24:20,800 a larger form than you would often add 5205 03:24:20,800 --> 03:24:23,279 but overall we've covered quite a few 5206 03:24:23,279 --> 03:24:25,439 inputs but remember to follow the mdn 5207 03:24:25,439 --> 03:24:27,120 links in the description because there 5208 03:24:27,120 --> 03:24:29,520 are even more inputs that i didn't have 5209 03:24:29,520 --> 03:24:31,920 time to cover okay we've reached the end 5210 03:24:31,920 --> 03:24:34,560 and it's time to validate our page let 5211 03:24:34,560 --> 03:24:37,439 me expand chrome here and we've got 5212 03:24:37,439 --> 03:24:40,080 validate by file upload we're going to 5213 03:24:40,080 --> 03:24:42,080 choose a file 5214 03:24:42,080 --> 03:24:45,200 and i'm going to be in my lesson 9 and 5215 03:24:45,200 --> 03:24:47,000 choose the index you choose the 5216 03:24:47,000 --> 03:24:49,680 index.html you've been working on 5217 03:24:49,680 --> 03:24:51,760 and then we'll click check just to see 5218 03:24:51,760 --> 03:24:53,520 if we have any errors or if everything 5219 03:24:53,520 --> 03:24:55,520 validates so we've got document checking 5220 03:24:55,520 --> 03:24:58,479 completed no errors or warnings to show 5221 03:24:58,479 --> 03:25:00,239 that's what we want if you do have 5222 03:25:00,239 --> 03:25:03,439 errors it will highlight those 5223 03:25:03,439 --> 03:25:05,600 welcome to your html project for 5224 03:25:05,600 --> 03:25:07,600 beginners you'll be using everything 5225 03:25:07,600 --> 03:25:09,840 you've learned about html5 to build a 5226 03:25:09,840 --> 03:25:12,239 website for the little taco shop let's 5227 03:25:12,239 --> 03:25:14,720 begin the html project let's get started 5228 03:25:14,720 --> 03:25:16,960 by looking at the little taco shop 5229 03:25:16,960 --> 03:25:19,760 website so we've got a basic website 5230 03:25:19,760 --> 03:25:22,800 here that we created with html it has a 5231 03:25:22,800 --> 03:25:25,439 nav menu at the top and an image here in 5232 03:25:25,439 --> 03:25:27,359 the header and then we've got a 5233 03:25:27,359 --> 03:25:30,160 description that says about lts which is 5234 03:25:30,160 --> 03:25:32,319 an abbreviation for little taco shop and 5235 03:25:32,319 --> 03:25:34,160 we can see that linked in the nav so 5236 03:25:34,160 --> 03:25:36,560 instantly we know that is an anchor link 5237 03:25:36,560 --> 03:25:38,399 and when we click it it takes us 5238 03:25:38,399 --> 03:25:40,479 directly to that part of the page 5239 03:25:40,479 --> 03:25:43,760 has some information about lts and it 5240 03:25:43,760 --> 03:25:45,840 even has some emphasis on text here 5241 03:25:45,840 --> 03:25:48,319 where it says love of tacos we can see 5242 03:25:48,319 --> 03:25:51,040 some taco emojis and there is a link in 5243 03:25:51,040 --> 03:25:54,080 the directions to emojipedia where you 5244 03:25:54,080 --> 03:25:56,560 can get emojis and just paste them in 5245 03:25:56,560 --> 03:25:59,600 with your text emojis do work in html 5246 03:25:59,600 --> 03:26:01,920 there's a taco trivia section and you'll 5247 03:26:01,920 --> 03:26:03,600 have to go back in the lessons and 5248 03:26:03,600 --> 03:26:05,040 remember how 5249 03:26:05,040 --> 03:26:07,600 we showed something in the html and then 5250 03:26:07,600 --> 03:26:09,920 we're able to click the arrow and it 5251 03:26:09,920 --> 03:26:12,160 shows more information this is all done 5252 03:26:12,160 --> 03:26:14,479 with html not css 5253 03:26:14,479 --> 03:26:17,439 very minimal css is applied and 5254 03:26:17,439 --> 03:26:18,560 available 5255 03:26:18,560 --> 03:26:22,000 in the style.css file inside the css 5256 03:26:22,000 --> 03:26:22,960 folder 5257 03:26:22,960 --> 03:26:24,800 if we scroll back up we can see there's 5258 03:26:24,800 --> 03:26:27,040 also a link to our menu and if we click 5259 03:26:27,040 --> 03:26:29,279 that it takes us to the part of the page 5260 03:26:29,279 --> 03:26:31,760 that has the menu and here the menu is a 5261 03:26:31,760 --> 03:26:33,520 table so you'll have to go back over 5262 03:26:33,520 --> 03:26:36,160 your knowledge of html tables and how to 5263 03:26:36,160 --> 03:26:39,359 create this table once again minimal css 5264 03:26:39,359 --> 03:26:42,080 is already available and it will apply 5265 03:26:42,080 --> 03:26:44,160 to the table as you create it of course 5266 03:26:44,160 --> 03:26:46,880 there's also a back to the top link and 5267 03:26:46,880 --> 03:26:48,720 we've got some copyright information 5268 03:26:48,720 --> 03:26:51,120 with an html entity for the copyright 5269 03:26:51,120 --> 03:26:52,960 sign at the bottom 5270 03:26:52,960 --> 03:26:54,720 we click back to the top we're back at 5271 03:26:54,720 --> 03:26:57,040 the top and we need to look at the store 5272 03:26:57,040 --> 03:26:58,399 hours page 5273 03:26:58,399 --> 03:27:00,720 and once we click that it navigates to 5274 03:27:00,720 --> 03:27:03,000 another html page so we've got 5275 03:27:03,000 --> 03:27:05,840 index.html and now the second page is 5276 03:27:05,840 --> 03:27:07,520 hours.html 5277 03:27:07,520 --> 03:27:10,239 it also has a navigation menu at the top 5278 03:27:10,239 --> 03:27:12,160 as you can see it's an unordered list 5279 03:27:12,160 --> 03:27:13,359 and you'll need to remember how to 5280 03:27:13,359 --> 03:27:14,640 create that 5281 03:27:14,640 --> 03:27:16,960 and now notice this is different now we 5282 03:27:16,960 --> 03:27:18,800 have a link to the home instead of the 5283 03:27:18,800 --> 03:27:21,439 hours page so it's not just the same 5284 03:27:21,439 --> 03:27:24,000 navigation it adapts to what page of 5285 03:27:24,000 --> 03:27:25,600 course and you'll have to create that 5286 03:27:25,600 --> 03:27:28,479 for each page we've got another image 5287 03:27:28,479 --> 03:27:31,120 and once again the image has a caption 5288 03:27:31,120 --> 03:27:33,840 and then we've got the hours this looks 5289 03:27:33,840 --> 03:27:35,760 like a list but you'll need to remember 5290 03:27:35,760 --> 03:27:38,479 what type of list creates a list that 5291 03:27:38,479 --> 03:27:40,960 looks like this where it says we're open 5292 03:27:40,960 --> 03:27:43,120 seven days a week which is a description 5293 03:27:43,120 --> 03:27:45,200 such as a paragraph but then 5294 03:27:45,200 --> 03:27:47,279 this part starting with sunday and going 5295 03:27:47,279 --> 03:27:48,560 through the hours 5296 03:27:48,560 --> 03:27:51,200 is all a list we've got back to the top 5297 03:27:51,200 --> 03:27:53,279 again and we've got the same information 5298 03:27:53,279 --> 03:27:55,040 in the footer so let's click back to the 5299 03:27:55,040 --> 03:27:57,520 top and we have our menu now let's go to 5300 03:27:57,520 --> 03:27:59,680 the contact us page 5301 03:27:59,680 --> 03:28:02,479 and on the contact us page you can see 5302 03:28:02,479 --> 03:28:04,000 there's a link now back to the store 5303 03:28:04,000 --> 03:28:07,040 hours and also links to home and the 5304 03:28:07,040 --> 03:28:08,800 different parts of the home page now 5305 03:28:08,800 --> 03:28:10,560 that's something to consider too that 5306 03:28:10,560 --> 03:28:12,479 we're not just linking to another page 5307 03:28:12,479 --> 03:28:14,960 but we're linking to a section 5308 03:28:14,960 --> 03:28:16,880 of that home page 5309 03:28:16,880 --> 03:28:20,080 then there is the image little taco shop 5310 03:28:20,080 --> 03:28:22,960 tacos for the caption and we've got the 5311 03:28:22,960 --> 03:28:25,120 contact form and you can go back over 5312 03:28:25,120 --> 03:28:26,880 the forms tutorial to learn how to 5313 03:28:26,880 --> 03:28:29,439 create this form and you can submit this 5314 03:28:29,439 --> 03:28:31,520 form just like we did in the forms 5315 03:28:31,520 --> 03:28:33,920 tutorial we aren't creating the back end 5316 03:28:33,920 --> 03:28:36,000 that will process the form but you can 5317 03:28:36,000 --> 03:28:38,000 set it up to submit to the site we used 5318 03:28:38,000 --> 03:28:39,520 in the forms tutorial that will just 5319 03:28:39,520 --> 03:28:41,680 show the information submitted and then 5320 03:28:41,680 --> 03:28:44,720 there is an r location section and if 5321 03:28:44,720 --> 03:28:48,160 you remember the html element to use 5322 03:28:48,160 --> 03:28:50,880 for an address this is what you want to 5323 03:28:50,880 --> 03:28:53,279 put inside of that and look the link to 5324 03:28:53,279 --> 03:28:54,800 the phone number and if you're on a 5325 03:28:54,800 --> 03:28:57,840 mobile device this of course is a false 5326 03:28:57,840 --> 03:29:00,720 or fake number but this should actually 5327 03:29:00,720 --> 03:29:02,560 work as a phone number if you create the 5328 03:29:02,560 --> 03:29:04,800 correct link and we've got back to the 5329 03:29:04,800 --> 03:29:06,800 top again and that pretty much covers 5330 03:29:06,800 --> 03:29:09,279 the site but just to reference let's go 5331 03:29:09,279 --> 03:29:11,840 ahead and click the about lts which will 5332 03:29:11,840 --> 03:29:14,160 not only take us to the home page but to 5333 03:29:14,160 --> 03:29:17,359 the specific part of the page so you 5334 03:29:17,359 --> 03:29:19,439 also want to be able to link to that 5335 03:29:19,439 --> 03:29:22,160 specific part from another page not just 5336 03:29:22,160 --> 03:29:24,000 on the page itself such as when we 5337 03:29:24,000 --> 03:29:26,080 clicked about when we were on the home 5338 03:29:26,080 --> 03:29:28,080 page and it took us directly there so 5339 03:29:28,080 --> 03:29:31,200 you can also do that from other pages 5340 03:29:31,200 --> 03:29:33,520 now as we look at the starter files for 5341 03:29:33,520 --> 03:29:35,479 this project not only is there a 5342 03:29:35,479 --> 03:29:38,479 readme.md file that has the directions 5343 03:29:38,479 --> 03:29:40,640 and these directions are in a markdown 5344 03:29:40,640 --> 03:29:43,760 file that's what dot md is and this is 5345 03:29:43,760 --> 03:29:46,160 making it very easy to read on github 5346 03:29:46,160 --> 03:29:48,560 where you look at the resources and so 5347 03:29:48,560 --> 03:29:50,399 you can also just read them in here like 5348 03:29:50,399 --> 03:29:52,880 this but the other beginner files are 5349 03:29:52,880 --> 03:29:54,640 already here so you've already got a fav 5350 03:29:54,640 --> 03:29:56,800 icon that you would link to in the head 5351 03:29:56,800 --> 03:29:58,160 of each page 5352 03:29:58,160 --> 03:30:00,800 you've already got some css inside of 5353 03:30:00,800 --> 03:30:02,880 the css folder and you can link to this 5354 03:30:02,880 --> 03:30:04,800 style.css 5355 03:30:04,800 --> 03:30:07,520 in the head of every page as well you've 5356 03:30:07,520 --> 03:30:10,239 got all three images one for each page 5357 03:30:10,239 --> 03:30:11,120 here 5358 03:30:11,120 --> 03:30:14,239 and you've got some examples and these 5359 03:30:14,239 --> 03:30:15,920 examples are important because you'll 5360 03:30:15,920 --> 03:30:17,520 want to go back and reference that you 5361 03:30:17,520 --> 03:30:19,279 don't necessarily have to always go back 5362 03:30:19,279 --> 03:30:21,439 and pause the video you can just click 5363 03:30:21,439 --> 03:30:24,720 on the image and i have made full screen 5364 03:30:24,720 --> 03:30:25,840 captures 5365 03:30:25,840 --> 03:30:27,920 of the entire page so you don't have to 5366 03:30:27,920 --> 03:30:30,080 scroll you could zoom in a little if you 5367 03:30:30,080 --> 03:30:32,560 want to but you have these to reference 5368 03:30:32,560 --> 03:30:34,880 so here's the contact page when it shows 5369 03:30:34,880 --> 03:30:36,160 up there we go 5370 03:30:36,160 --> 03:30:38,640 and there's an hours capture as well so 5371 03:30:38,640 --> 03:30:40,640 you've got one for home one for hours 5372 03:30:40,640 --> 03:30:42,720 and one for contact and you can 5373 03:30:42,720 --> 03:30:44,960 reference these visually to help you 5374 03:30:44,960 --> 03:30:46,880 create these pages it looks like it just 5375 03:30:46,880 --> 03:30:48,960 takes a little bit to show up inside of 5376 03:30:48,960 --> 03:30:50,560 visual studio code of course you could 5377 03:30:50,560 --> 03:30:53,279 open these image files with some other 5378 03:30:53,279 --> 03:30:55,040 software if you want to as well or 5379 03:30:55,040 --> 03:30:56,960 directly in the browser and just keep 5380 03:30:56,960 --> 03:30:59,840 different tabs open to view each image 5381 03:30:59,840 --> 03:31:02,239 file if you want to that would also work 5382 03:31:02,239 --> 03:31:04,319 so there you go you've got to create 5383 03:31:04,319 --> 03:31:07,439 three html pages here in the root 5384 03:31:07,439 --> 03:31:10,000 of your tutorial folder and then 5385 03:31:10,000 --> 03:31:11,920 reference these other files and you've 5386 03:31:11,920 --> 03:31:14,319 got the examples to look at and you've 5387 03:31:14,319 --> 03:31:17,279 got the fave icon file already as well 5388 03:31:17,279 --> 03:31:18,960 so if we go back to the directions let 5389 03:31:18,960 --> 03:31:21,439 me see if i left anything out you've got 5390 03:31:21,439 --> 03:31:24,720 your files all named index hours and 5391 03:31:24,720 --> 03:31:27,359 contact we talked about that minimal css 5392 03:31:27,359 --> 03:31:29,840 available inside of the styles 5393 03:31:29,840 --> 03:31:33,920 file styles.css all images are provided 5394 03:31:33,920 --> 03:31:36,640 and if you need taco emojis here's a 5395 03:31:36,640 --> 03:31:39,040 link to that as well and the fave icon 5396 03:31:39,040 --> 03:31:41,359 is included so that's everything good 5397 03:31:41,359 --> 03:31:43,359 luck with the challenge and then of 5398 03:31:43,359 --> 03:31:45,439 course after this you want to pause the 5399 03:31:45,439 --> 03:31:47,600 video and complete it to the best of 5400 03:31:47,600 --> 03:31:50,640 your ability and then all walk through 5401 03:31:50,640 --> 03:31:53,760 and create these pages with you for the 5402 03:31:53,760 --> 03:31:56,399 solution afterwards so don't do that now 5403 03:31:56,399 --> 03:31:59,120 pause the video and actually attempt it 5404 03:31:59,120 --> 03:32:01,600 on your own that's the best way to get 5405 03:32:01,600 --> 03:32:03,920 better at something try this out for 5406 03:32:03,920 --> 03:32:06,560 yourself before you allow me to walk you 5407 03:32:06,560 --> 03:32:09,800 through it 5408 03:32:10,000 --> 03:32:12,000 okay let's get started building our 5409 03:32:12,000 --> 03:32:15,040 project i'll close this readme.md 5410 03:32:15,040 --> 03:32:17,040 and i'll close any image file that we 5411 03:32:17,040 --> 03:32:18,720 had open before matter of fact i'll 5412 03:32:18,720 --> 03:32:21,040 collapse the examples and we're just 5413 03:32:21,040 --> 03:32:23,439 going to create the three html files 5414 03:32:23,439 --> 03:32:25,160 that we need first so we need 5415 03:32:25,160 --> 03:32:27,040 index.html 5416 03:32:27,040 --> 03:32:29,600 and then we also need 5417 03:32:29,600 --> 03:32:32,560 contact dot html 5418 03:32:32,560 --> 03:32:34,840 and if i remember right we need 5419 03:32:34,840 --> 03:32:37,760 hours dot html 5420 03:32:37,760 --> 03:32:40,800 okay with our three empty files created 5421 03:32:40,800 --> 03:32:42,800 let's go ahead and start on the first 5422 03:32:42,800 --> 03:32:45,920 one which is index.html we know every 5423 03:32:45,920 --> 03:32:48,399 document starts with doctype and if i 5424 03:32:48,399 --> 03:32:51,279 press tab it adds the html from there we 5425 03:32:51,279 --> 03:32:54,960 know we need the html i need lowercase 5426 03:32:54,960 --> 03:32:57,520 or i prefer lowercase and then we need 5427 03:32:57,520 --> 03:33:00,319 the attribute lang and that equals 5428 03:33:00,319 --> 03:33:01,439 english 5429 03:33:01,439 --> 03:33:03,279 is what i'll put of course you could put 5430 03:33:03,279 --> 03:33:05,040 something different there if you want to 5431 03:33:05,040 --> 03:33:08,319 we instantly get the closing html tag if 5432 03:33:08,319 --> 03:33:10,880 you don't of course add that as well 5433 03:33:10,880 --> 03:33:13,520 from there let's create the head section 5434 03:33:13,520 --> 03:33:14,319 so 5435 03:33:14,319 --> 03:33:16,319 here's the head element i've got the 5436 03:33:16,319 --> 03:33:18,239 closing head element and this will 5437 03:33:18,239 --> 03:33:19,760 contain several 5438 03:33:19,760 --> 03:33:21,840 meta elements the first one has the 5439 03:33:21,840 --> 03:33:24,000 character set attribute and we specify 5440 03:33:24,000 --> 03:33:26,640 utf-8 5441 03:33:26,640 --> 03:33:28,880 after that 5442 03:33:28,880 --> 03:33:30,560 i have another meta 5443 03:33:30,560 --> 03:33:33,279 and this is going to be name equals 5444 03:33:33,279 --> 03:33:35,600 author and of course this should be your 5445 03:33:35,600 --> 03:33:38,560 name i'll put my name here so 5446 03:33:38,560 --> 03:33:41,200 dave gray 5447 03:33:41,200 --> 03:33:42,800 after that 5448 03:33:42,800 --> 03:33:46,319 meta name equals description and this is 5449 03:33:46,319 --> 03:33:48,479 where we describe the page so once again 5450 03:33:48,479 --> 03:33:50,880 we have a content attribute and i'm 5451 03:33:50,880 --> 03:33:52,080 going to put 5452 03:33:52,080 --> 03:33:56,080 the official website for the and i need 5453 03:33:56,080 --> 03:33:59,680 to press alt z to wrap the code here 5454 03:33:59,680 --> 03:34:00,399 little 5455 03:34:00,399 --> 03:34:02,319 oops i didn't get a space 5456 03:34:02,319 --> 03:34:04,239 little 5457 03:34:04,239 --> 03:34:05,600 taco shop 5458 03:34:05,600 --> 03:34:08,000 and i should really put a capital t 5459 03:34:08,000 --> 03:34:10,640 there as well because it's the official 5460 03:34:10,640 --> 03:34:13,279 name okay so we've got the little taco 5461 03:34:13,279 --> 03:34:15,680 shop and of course that's what our title 5462 03:34:15,680 --> 03:34:17,760 will be for the page as well so we want 5463 03:34:17,760 --> 03:34:19,920 the little 5464 03:34:19,920 --> 03:34:22,399 need to spell this correctly the little 5465 03:34:22,399 --> 03:34:25,439 taco shop in the title as well 5466 03:34:25,439 --> 03:34:29,120 after the title let's add a link 5467 03:34:29,120 --> 03:34:31,200 and here we're going to say 5468 03:34:31,200 --> 03:34:34,399 rel which is related 5469 03:34:34,399 --> 03:34:36,080 it's an icon 5470 03:34:36,080 --> 03:34:38,239 and the href 5471 03:34:38,239 --> 03:34:41,520 and now let's put in that fave icon that 5472 03:34:41,520 --> 03:34:43,120 we have 5473 03:34:43,120 --> 03:34:45,760 and after that we'll say this is type 5474 03:34:45,760 --> 03:34:47,120 equals 5475 03:34:47,120 --> 03:34:50,479 image slash x dash 5476 03:34:50,479 --> 03:34:51,520 icon 5477 03:34:51,520 --> 03:34:54,800 and now let's add one more link tag 5478 03:34:54,800 --> 03:34:56,880 and how it's related to the page is it's 5479 03:34:56,880 --> 03:34:58,880 a style sheet 5480 03:34:58,880 --> 03:35:01,840 and now the href will point to that css 5481 03:35:01,840 --> 03:35:04,160 style sheet so we need 5482 03:35:04,160 --> 03:35:06,399 there it is css 5483 03:35:06,399 --> 03:35:10,080 and then we want style.css 5484 03:35:10,080 --> 03:35:12,720 and after that we can close our link tag 5485 03:35:12,720 --> 03:35:14,319 and we're finished with the head so i'm 5486 03:35:14,319 --> 03:35:16,960 going to press ctrl s to save now i 5487 03:35:16,960 --> 03:35:19,760 could copy this much and paste it into 5488 03:35:19,760 --> 03:35:21,680 the other two pages and just make a few 5489 03:35:21,680 --> 03:35:24,239 changes but i'm going to do just a few 5490 03:35:24,239 --> 03:35:26,960 more things before i do that so just 5491 03:35:26,960 --> 03:35:29,600 underneath the head we'll start our body 5492 03:35:29,600 --> 03:35:31,760 element 5493 03:35:31,760 --> 03:35:33,920 and then in the body element we'll start 5494 03:35:33,920 --> 03:35:36,399 with a header element 5495 03:35:36,399 --> 03:35:38,080 inside the header element we're going to 5496 03:35:38,080 --> 03:35:40,640 have an h1 and we'll say 5497 03:35:40,640 --> 03:35:42,960 welcome to 5498 03:35:42,960 --> 03:35:44,800 the little 5499 03:35:44,800 --> 03:35:46,560 still not typing that right there we go 5500 03:35:46,560 --> 03:35:48,000 the little 5501 03:35:48,000 --> 03:35:51,120 taco shop and that is our h1 heading for 5502 03:35:51,120 --> 03:35:53,359 the page remember every page should only 5503 03:35:53,359 --> 03:35:55,680 have one h1 header i'll scroll up now 5504 03:35:55,680 --> 03:35:57,200 for some more room 5505 03:35:57,200 --> 03:35:59,680 and now we'll start our nav element this 5506 03:35:59,680 --> 03:36:02,640 is where our navigation menu will be 5507 03:36:02,640 --> 03:36:05,120 we get that closing element inside the 5508 03:36:05,120 --> 03:36:06,720 nav element we're going to have an 5509 03:36:06,720 --> 03:36:08,160 unordered list 5510 03:36:08,160 --> 03:36:11,439 and then each list item will have a 5511 03:36:11,439 --> 03:36:13,920 different link so here we'll start out 5512 03:36:13,920 --> 03:36:15,359 with 5513 03:36:15,359 --> 03:36:17,439 let me put a line in between there we go 5514 03:36:17,439 --> 03:36:19,680 let's start out with our anchor tag 5515 03:36:19,680 --> 03:36:22,800 and the href is going to equal 5516 03:36:22,800 --> 03:36:25,520 hashtag about so this is going to link 5517 03:36:25,520 --> 03:36:28,319 to an about section on this page 5518 03:36:28,319 --> 03:36:31,200 so i'll say about right there and then 5519 03:36:31,200 --> 03:36:33,840 after that let's go ahead and put an 5520 03:36:33,840 --> 03:36:35,920 abbreviation element 5521 03:36:35,920 --> 03:36:38,800 inside of our link and here we can give 5522 03:36:38,800 --> 03:36:41,040 a title to this abbreviation and this 5523 03:36:41,040 --> 03:36:42,000 will be 5524 03:36:42,000 --> 03:36:44,080 the little i spelled it right that time 5525 03:36:44,080 --> 03:36:46,560 taco shop 5526 03:36:46,560 --> 03:36:48,720 and then we'll close that out and since 5527 03:36:48,720 --> 03:36:51,520 we're abbreviating we'll put lts so our 5528 03:36:51,520 --> 03:36:54,080 link says about lts 5529 03:36:54,080 --> 03:36:57,040 and now we can just copy this link item 5530 03:36:57,040 --> 03:37:00,319 down so highlight the full li and then i 5531 03:37:00,319 --> 03:37:03,120 press ctrl alt and the down arrow 5532 03:37:03,120 --> 03:37:04,960 it should be the same for you on windows 5533 03:37:04,960 --> 03:37:07,439 it may be a little different on a mac or 5534 03:37:07,439 --> 03:37:08,479 linux 5535 03:37:08,479 --> 03:37:11,200 now the next link is much easier here so 5536 03:37:11,200 --> 03:37:14,479 we'll just say about in his hashtag menu 5537 03:37:14,479 --> 03:37:16,720 i want all lower case again 5538 03:37:16,720 --> 03:37:20,319 so no abbreviation for the menu 5539 03:37:20,319 --> 03:37:22,080 so it's just 5540 03:37:22,080 --> 03:37:25,359 about menu or i'll put our menu i think 5541 03:37:25,359 --> 03:37:27,600 that's what's actually on the page 5542 03:37:27,600 --> 03:37:29,600 and then from there we can copy this 5543 03:37:29,600 --> 03:37:31,600 down once again a little easier for the 5544 03:37:31,600 --> 03:37:32,880 next link 5545 03:37:32,880 --> 03:37:34,800 and let's copy it one more time there we 5546 03:37:34,800 --> 03:37:37,680 go three our menus let's change this 5547 03:37:37,680 --> 03:37:40,479 second menu that's the hashtag menu to 5548 03:37:40,479 --> 03:37:41,319 our 5549 03:37:41,319 --> 03:37:43,680 hours.html so we're linking directly to 5550 03:37:43,680 --> 03:37:45,680 another page now 5551 03:37:45,680 --> 03:37:47,600 and then we can put 5552 03:37:47,600 --> 03:37:49,359 store hours 5553 03:37:49,359 --> 03:37:52,319 and then for this last one we'll remove 5554 03:37:52,319 --> 03:37:54,880 the hashtag menu and we'll put our 5555 03:37:54,880 --> 03:37:57,359 contact.html 5556 03:37:57,359 --> 03:37:59,680 and then we'll put contact us here 5557 03:37:59,680 --> 03:38:02,399 instead of our menu 5558 03:38:02,399 --> 03:38:03,840 now i'm going to scroll just a little 5559 03:38:03,840 --> 03:38:06,160 bit more and while we're still in the 5560 03:38:06,160 --> 03:38:08,560 header out of the nav 5561 03:38:08,560 --> 03:38:11,359 but in the header i'm going to add a 5562 03:38:11,359 --> 03:38:13,520 figure 5563 03:38:13,520 --> 03:38:15,760 and then inside this figure we'll add 5564 03:38:15,760 --> 03:38:17,600 our image so 5565 03:38:17,600 --> 03:38:19,600 here's our image element and we'll give 5566 03:38:19,600 --> 03:38:22,080 it a source equal to and then we want to 5567 03:38:22,080 --> 03:38:24,560 specify our image folder and then let's 5568 03:38:24,560 --> 03:38:27,760 pick our tacos and drink image and once 5569 03:38:27,760 --> 03:38:30,880 we have that image we can add some alt 5570 03:38:30,880 --> 03:38:33,520 text for that that actually says what it 5571 03:38:33,520 --> 03:38:36,880 is so we'll put tacos and a drink 5572 03:38:36,880 --> 03:38:39,760 remember alt text makes our images more 5573 03:38:39,760 --> 03:38:42,479 accessible and then we have a title 5574 03:38:42,479 --> 03:38:43,760 and we'll say 5575 03:38:43,760 --> 03:38:45,120 we love 5576 03:38:45,120 --> 03:38:47,600 tacos the title does not have to be the 5577 03:38:47,600 --> 03:38:49,680 same as the alt text and then let's 5578 03:38:49,680 --> 03:38:52,080 provide the width and i notice i saved 5579 03:38:52,080 --> 03:38:53,680 the width and the height in the image 5580 03:38:53,680 --> 03:38:55,520 name so the width is 5581 03:38:55,520 --> 03:38:56,800 400 5582 03:38:56,800 --> 03:38:58,960 and then the height 5583 03:38:58,960 --> 03:39:00,120 equals 5584 03:39:00,120 --> 03:39:03,680 267 and we can close out our image tag 5585 03:39:03,680 --> 03:39:05,359 but we're not quite finished with our 5586 03:39:05,359 --> 03:39:08,319 figure yet let's go ahead and add a fig 5587 03:39:08,319 --> 03:39:10,880 caption element and inside this we'll 5588 03:39:10,880 --> 03:39:14,479 give a description once again tacos and 5589 03:39:14,479 --> 03:39:18,160 a drink as our caption for the image 5590 03:39:18,160 --> 03:39:20,160 okay now we've completed the header so 5591 03:39:20,160 --> 03:39:22,080 let's once again scroll up for some more 5592 03:39:22,080 --> 03:39:25,120 room and then in between the header and 5593 03:39:25,120 --> 03:39:28,239 the main element let's put a horizontal 5594 03:39:28,239 --> 03:39:29,120 rule 5595 03:39:29,120 --> 03:39:31,520 and after that let's put a main element 5596 03:39:31,520 --> 03:39:33,920 where the body of our page will be and 5597 03:39:33,920 --> 03:39:35,600 it's right now let's leave a comment 5598 03:39:35,600 --> 03:39:37,040 saying 5599 03:39:37,040 --> 03:39:40,080 our content will go here and then after 5600 03:39:40,080 --> 03:39:43,439 that we'll have another hr 5601 03:39:43,439 --> 03:39:46,000 and then we'll have a footer element and 5602 03:39:46,000 --> 03:39:47,520 now we need to put something in the 5603 03:39:47,520 --> 03:39:49,520 footer as well if you remember from the 5604 03:39:49,520 --> 03:39:52,319 example each footer had a paragraph that 5605 03:39:52,319 --> 03:39:54,960 said copyright 5606 03:39:54,960 --> 03:39:57,279 and now we need to use an html entity 5607 03:39:57,279 --> 03:39:59,120 for the copyright symbol and that is 5608 03:39:59,120 --> 03:40:02,479 ampersand copy with a semicolon and then 5609 03:40:02,479 --> 03:40:04,399 we'll just say the 5610 03:40:04,399 --> 03:40:05,760 little 5611 03:40:05,760 --> 03:40:07,199 taco shop 5612 03:40:07,199 --> 03:40:09,520 and now we can save this and now we're 5613 03:40:09,520 --> 03:40:12,000 really ready to copy all of this code 5614 03:40:12,000 --> 03:40:14,000 and put it into the other pages as well 5615 03:40:14,000 --> 03:40:15,279 and we'll just need to make a few 5616 03:40:15,279 --> 03:40:18,319 changes and then when we add actual 5617 03:40:18,319 --> 03:40:20,800 content to each of the pages that's 5618 03:40:20,800 --> 03:40:22,880 where it will really differ so i'm going 5619 03:40:22,880 --> 03:40:26,160 to press ctrl a to highlight everything 5620 03:40:26,160 --> 03:40:29,439 and then control c to copy everything 5621 03:40:29,439 --> 03:40:32,880 go to the contact page and press control 5622 03:40:32,880 --> 03:40:35,120 v to paste that in 5623 03:40:35,120 --> 03:40:37,279 control s to save 5624 03:40:37,279 --> 03:40:39,279 go to the hours page and do the same 5625 03:40:39,279 --> 03:40:41,840 control v to paste it all in 5626 03:40:41,840 --> 03:40:44,640 and control s to save okay while we're 5627 03:40:44,640 --> 03:40:46,880 on the hours page let's make the changes 5628 03:40:46,880 --> 03:40:49,680 here first i need to press alt z again 5629 03:40:49,680 --> 03:40:51,439 in each one of these files to get the 5630 03:40:51,439 --> 03:40:54,000 code to wrap in each one so now we can 5631 03:40:54,000 --> 03:40:56,560 make our changes everything is the same 5632 03:40:56,560 --> 03:40:58,960 as far as the author and the content but 5633 03:40:58,960 --> 03:41:01,439 when we get to description we'll have a 5634 03:41:01,439 --> 03:41:03,920 different description this will be store 5635 03:41:03,920 --> 03:41:08,239 hours for the little taco shop 5636 03:41:08,640 --> 03:41:10,000 and now that we've changed our 5637 03:41:10,000 --> 03:41:12,960 description we can also change our title 5638 03:41:12,960 --> 03:41:14,640 instead of the little taco shop here 5639 03:41:14,640 --> 03:41:17,279 let's put lts 5640 03:41:17,279 --> 03:41:19,439 hours since it's not the home page we'll 5641 03:41:19,439 --> 03:41:21,520 just go ahead and abbreviate 5642 03:41:21,520 --> 03:41:24,239 as we can assume the owner employees and 5643 03:41:24,239 --> 03:41:26,720 even the townspeople in the little town 5644 03:41:26,720 --> 03:41:29,120 for the little taco shop refer to the 5645 03:41:29,120 --> 03:41:32,479 little taco shop as lts now let's scroll 5646 03:41:32,479 --> 03:41:34,720 down into the body where we have our 5647 03:41:34,720 --> 03:41:36,399 header and a little bit needs to change 5648 03:41:36,399 --> 03:41:38,319 here too so it's not welcome to the 5649 03:41:38,319 --> 03:41:40,640 little taco shop here we'll put the 5650 03:41:40,640 --> 03:41:42,479 little taco shop 5651 03:41:42,479 --> 03:41:43,520 and then 5652 03:41:43,520 --> 03:41:46,560 hours after that and now our nav is 5653 03:41:46,560 --> 03:41:49,040 going to change somewhat too so it's not 5654 03:41:49,040 --> 03:41:52,960 just a link to about lts we need to go 5655 03:41:52,960 --> 03:41:55,439 to another page and if you remember we 5656 03:41:55,439 --> 03:41:58,640 can just go to the slash to go to the 5657 03:41:58,640 --> 03:42:02,080 home page so here we need slash about to 5658 03:42:02,080 --> 03:42:05,199 go to the about section of the little 5659 03:42:05,199 --> 03:42:07,279 taco shop on the home page so we'll do 5660 03:42:07,279 --> 03:42:09,359 the same for the menu 5661 03:42:09,359 --> 03:42:10,720 and now 5662 03:42:10,720 --> 03:42:12,800 where we have hours we can just 5663 03:42:12,800 --> 03:42:15,120 eliminate this because we're going to 5664 03:42:15,120 --> 03:42:17,439 put in a home link instead so i'm going 5665 03:42:17,439 --> 03:42:20,800 to press ctrl x to cut it out 5666 03:42:20,800 --> 03:42:22,880 then just backspace out that extra line 5667 03:42:22,880 --> 03:42:26,000 here scroll to the very top 5668 03:42:26,000 --> 03:42:29,760 and paste in the one that i just cut out 5669 03:42:29,760 --> 03:42:32,720 and now we're going to link to just that 5670 03:42:32,720 --> 03:42:35,199 slash that i was talking about and that 5671 03:42:35,199 --> 03:42:37,199 will link to the home page so let's 5672 03:42:37,199 --> 03:42:39,359 change the store hours 5673 03:42:39,359 --> 03:42:40,640 to home 5674 03:42:40,640 --> 03:42:42,960 and i'll save that much now let's scroll 5675 03:42:42,960 --> 03:42:44,880 down a little bit further and we need to 5676 03:42:44,880 --> 03:42:47,600 change out our image as well so 5677 03:42:47,600 --> 03:42:49,279 now we're not going to use the tacos in 5678 03:42:49,279 --> 03:42:50,880 a drink image we wouldn't want that on 5679 03:42:50,880 --> 03:42:54,080 more than one page so now i want image 5680 03:42:54,080 --> 03:42:57,600 slash and we'll choose tacos tray now 5681 03:42:57,600 --> 03:43:00,880 notice it's also 400 by 267 so we don't 5682 03:43:00,880 --> 03:43:03,359 need to change that but let's change 5683 03:43:03,359 --> 03:43:06,399 what it says here for the alt text and 5684 03:43:06,399 --> 03:43:08,080 we'll say a 5685 03:43:08,080 --> 03:43:09,760 tray of 5686 03:43:09,760 --> 03:43:11,199 tasty 5687 03:43:11,199 --> 03:43:14,720 tacos and then we can add a tray of 5688 03:43:14,720 --> 03:43:17,439 tasty tacos for the fig caption as well 5689 03:43:17,439 --> 03:43:20,080 i should have just highlighted that copy 5690 03:43:20,080 --> 03:43:23,199 and paste again ctrl c 5691 03:43:23,199 --> 03:43:26,479 over the fig caption and control v 5692 03:43:26,479 --> 03:43:28,960 and we could leave we love tacos for the 5693 03:43:28,960 --> 03:43:30,560 title here as well 5694 03:43:30,560 --> 03:43:33,439 but let's put we love 5695 03:43:33,439 --> 03:43:36,640 trays of tacos that's some nice 5696 03:43:36,640 --> 03:43:38,399 title text as well and remember the 5697 03:43:38,399 --> 03:43:40,560 title shows when you put your mouse over 5698 03:43:40,560 --> 03:43:43,040 the image and if we scroll down we don't 5699 03:43:43,040 --> 03:43:44,640 really need to change anything because 5700 03:43:44,640 --> 03:43:47,040 the footer stays the same between all 5701 03:43:47,040 --> 03:43:49,520 the pages so we're finished with the 5702 03:43:49,520 --> 03:43:52,399 immediate changes to the hours html now 5703 03:43:52,399 --> 03:43:54,399 let's go make those same types of 5704 03:43:54,399 --> 03:43:56,960 changes to the contact.html i need to 5705 03:43:56,960 --> 03:43:59,359 scroll back up to the top first and 5706 03:43:59,359 --> 03:44:01,600 press alt z to get the code to wrap now 5707 03:44:01,600 --> 03:44:03,600 we need to change the description again 5708 03:44:03,600 --> 03:44:06,800 so let's change this to 5709 03:44:06,800 --> 03:44:08,160 contact 5710 03:44:08,160 --> 03:44:11,279 information for the little taco shop 5711 03:44:11,279 --> 03:44:13,680 and let's change the title for the page 5712 03:44:13,680 --> 03:44:14,640 as well 5713 03:44:14,640 --> 03:44:16,560 and here we'll put 5714 03:44:16,560 --> 03:44:19,359 contact us 5715 03:44:19,359 --> 03:44:21,840 and then let's put a dash and put lts 5716 03:44:21,840 --> 03:44:24,319 just because we want the lts in the 5717 03:44:24,319 --> 03:44:26,560 title for everything that's not the home 5718 03:44:26,560 --> 03:44:27,520 page 5719 03:44:27,520 --> 03:44:29,680 and we leave everything else the same so 5720 03:44:29,680 --> 03:44:31,840 now we can scroll up and this is the 5721 03:44:31,840 --> 03:44:34,640 contact us page so let's highlight this 5722 03:44:34,640 --> 03:44:35,840 h1 5723 03:44:35,840 --> 03:44:39,040 and change this part to contact us 5724 03:44:39,040 --> 03:44:41,600 and now for the about once again we 5725 03:44:41,600 --> 03:44:44,560 could actually go over to the hours 5726 03:44:44,560 --> 03:44:47,040 and now let's copy this nav and we'll 5727 03:44:47,040 --> 03:44:50,160 just have to change a little bit less 5728 03:44:50,160 --> 03:44:52,560 that way so copy the nav 5729 03:44:52,560 --> 03:44:54,800 and now we'll highlight the nav that we 5730 03:44:54,800 --> 03:44:57,600 have in here 5731 03:44:57,680 --> 03:45:00,560 and paste in the new one from the hours 5732 03:45:00,560 --> 03:45:03,120 page so now we have the same home link 5733 03:45:03,120 --> 03:45:05,840 we have the same about link we have the 5734 03:45:05,840 --> 03:45:06,640 same 5735 03:45:06,640 --> 03:45:08,720 menu link and we only need to change 5736 03:45:08,720 --> 03:45:11,439 contact to hours so 5737 03:45:11,439 --> 03:45:13,840 this will link to hours and then we just 5738 03:45:13,840 --> 03:45:16,319 change this contact us 5739 03:45:16,319 --> 03:45:18,640 to store hours 5740 03:45:18,640 --> 03:45:21,040 and let's save that much okay scrolling 5741 03:45:21,040 --> 03:45:23,199 down to the figure we need to change out 5742 03:45:23,199 --> 03:45:24,960 our image again 5743 03:45:24,960 --> 03:45:27,040 this one's just a little different so 5744 03:45:27,040 --> 03:45:29,600 now we've already had tacos and a drink 5745 03:45:29,600 --> 03:45:31,680 and the tacos trade this is tacos close 5746 03:45:31,680 --> 03:45:34,560 up notice the size is a little different 5747 03:45:34,560 --> 03:45:37,520 400 by 260. so 5748 03:45:37,520 --> 03:45:40,560 we've got 400 here but we need to change 5749 03:45:40,560 --> 03:45:44,399 this to 260 instead of 267. 5750 03:45:44,399 --> 03:45:46,640 okay now our alt of course will be a 5751 03:45:46,640 --> 03:45:48,399 little different as well this will be 5752 03:45:48,399 --> 03:45:50,239 little 5753 03:45:50,239 --> 03:45:53,040 taco shop 5754 03:45:53,040 --> 03:45:56,479 tacos and now for the title let's put 5755 03:45:56,479 --> 03:46:00,000 tacos ready to eat 5756 03:46:02,800 --> 03:46:04,880 and then we can put little taco shop 5757 03:46:04,880 --> 03:46:06,640 tacos here too so i'll once again 5758 03:46:06,640 --> 03:46:08,800 highlight that alt text 5759 03:46:08,800 --> 03:46:11,359 and put the same text in here for the 5760 03:46:11,359 --> 03:46:13,600 caption that we're showing on the page 5761 03:46:13,600 --> 03:46:15,279 and if we scroll down we can see our 5762 03:46:15,279 --> 03:46:17,199 footer remains the same here too so 5763 03:46:17,199 --> 03:46:19,120 let's save the page and we're ready to 5764 03:46:19,120 --> 03:46:21,439 begin working on content for each of the 5765 03:46:21,439 --> 03:46:23,680 pages okay i'm going back to the 5766 03:46:23,680 --> 03:46:25,520 index.html 5767 03:46:25,520 --> 03:46:27,520 and i'm going to click go live or i 5768 03:46:27,520 --> 03:46:28,960 could right click 5769 03:46:28,960 --> 03:46:30,560 and choose 5770 03:46:30,560 --> 03:46:32,479 open with live server because we're 5771 03:46:32,479 --> 03:46:34,479 using the live server extension to view 5772 03:46:34,479 --> 03:46:36,560 our web page and we can go ahead and 5773 03:46:36,560 --> 03:46:38,000 start looking at our page it doesn't 5774 03:46:38,000 --> 03:46:39,920 have a lot on it but it has enough to 5775 03:46:39,920 --> 03:46:41,840 get started here we've got our header 5776 03:46:41,840 --> 03:46:44,239 section and we've got the menu with the 5777 03:46:44,239 --> 03:46:46,160 different links so now i'm going back to 5778 03:46:46,160 --> 03:46:48,239 the code i'm going to resize visual 5779 03:46:48,239 --> 03:46:51,600 studio code and press control b to hide 5780 03:46:51,600 --> 03:46:53,439 the file tree so i have more room to see 5781 03:46:53,439 --> 03:46:56,319 the code and we're ready to add content 5782 03:46:56,319 --> 03:46:59,040 to the page inside of the main element 5783 03:46:59,040 --> 03:47:01,520 i'll delete that and we'll start with 5784 03:47:01,520 --> 03:47:03,199 an article element i'm going to give 5785 03:47:03,199 --> 03:47:06,960 this an id equal to about so our about 5786 03:47:06,960 --> 03:47:09,840 anchor tag works our link works now i'll 5787 03:47:09,840 --> 03:47:11,600 put an h2 5788 03:47:11,600 --> 03:47:14,640 and inside the h2 i'm going to put about 5789 03:47:14,640 --> 03:47:16,239 and then we need that 5790 03:47:16,239 --> 03:47:19,680 abbreviation with the title value again 5791 03:47:19,680 --> 03:47:20,720 of 5792 03:47:20,720 --> 03:47:23,279 the little 5793 03:47:23,840 --> 03:47:26,720 taco shop 5794 03:47:27,359 --> 03:47:28,800 and now we'll put 5795 03:47:28,800 --> 03:47:30,800 l 5796 03:47:30,800 --> 03:47:32,720 ts there we go 5797 03:47:32,720 --> 03:47:34,960 and that completes the header so now 5798 03:47:34,960 --> 03:47:37,120 let's put some content we'll have a 5799 03:47:37,120 --> 03:47:38,640 paragraph here 5800 03:47:38,640 --> 03:47:41,359 and i'm going to take that same 5801 03:47:41,359 --> 03:47:44,000 abbreviation and start the paragraph 5802 03:47:44,000 --> 03:47:47,760 with that so lts 5803 03:47:47,760 --> 03:47:50,960 was founded in and now remember we can 5804 03:47:50,960 --> 03:47:53,680 use a time element to give some meaning 5805 03:47:53,680 --> 03:47:55,760 to the dates and times we put on our 5806 03:47:55,760 --> 03:47:58,880 page so i'm going to put a time element 5807 03:47:58,880 --> 03:47:59,680 here 5808 03:47:59,680 --> 03:48:01,520 with a date time 5809 03:48:01,520 --> 03:48:04,800 equal to 2022 5810 03:48:04,800 --> 03:48:07,279 so the little taco shop is a fairly new 5811 03:48:07,279 --> 03:48:10,000 location 5812 03:48:10,479 --> 03:48:12,399 get a period at the end of that sentence 5813 03:48:12,399 --> 03:48:16,319 and we can put our shop was built 5814 03:48:16,319 --> 03:48:17,199 on 5815 03:48:17,199 --> 03:48:19,920 or was built from there we go 5816 03:48:19,920 --> 03:48:20,960 a 5817 03:48:20,960 --> 03:48:22,000 love 5818 03:48:22,000 --> 03:48:24,640 of tacos and now we'll put a period 5819 03:48:24,640 --> 03:48:26,800 there we'll say we hope 5820 03:48:26,800 --> 03:48:31,199 our shop adds a unique 5821 03:48:31,199 --> 03:48:33,840 and interesting 5822 03:48:33,840 --> 03:48:37,359 place to our little town 5823 03:48:37,359 --> 03:48:39,199 now let's add just a little more flavor 5824 03:48:39,199 --> 03:48:41,520 to this paragraph so we can put a strong 5825 03:48:41,520 --> 03:48:42,720 element 5826 03:48:42,720 --> 03:48:45,680 and then we'll put love of tacos inside 5827 03:48:45,680 --> 03:48:49,120 that so it has some emphasis 5828 03:48:49,120 --> 03:48:51,920 and now we also want to add some taco 5829 03:48:51,920 --> 03:48:55,199 emojis right after that so let's go to a 5830 03:48:55,199 --> 03:48:56,960 new window and i'm going to type in 5831 03:48:56,960 --> 03:48:59,279 emojipedia.org 5832 03:48:59,279 --> 03:49:01,520 and there you can search for emojis i'm 5833 03:49:01,520 --> 03:49:03,439 searching for taco 5834 03:49:03,439 --> 03:49:06,080 once i find taco i'm going to click that 5835 03:49:06,080 --> 03:49:09,680 and it allows me to copy that emoji so 5836 03:49:09,680 --> 03:49:13,279 after i say a love of tacos i'll put a 5837 03:49:13,279 --> 03:49:15,520 space and control v 5838 03:49:15,520 --> 03:49:18,880 control v control v just pasted in three 5839 03:49:18,880 --> 03:49:20,720 tacos so i'm going to close out 5840 03:49:20,720 --> 03:49:23,439 emojipedia we no longer need that but 5841 03:49:23,439 --> 03:49:25,439 let's save this and see what we get on 5842 03:49:25,439 --> 03:49:26,640 our page 5843 03:49:26,640 --> 03:49:28,479 so now if we look at this we've got 5844 03:49:28,479 --> 03:49:31,359 about lts and there's the abbreviation 5845 03:49:31,359 --> 03:49:33,040 and when we mouse over we get little 5846 03:49:33,040 --> 03:49:34,399 taco shop 5847 03:49:34,399 --> 03:49:36,560 and now we've got our paragraph for the 5848 03:49:36,560 --> 03:49:38,399 about information now i'm going to 5849 03:49:38,399 --> 03:49:40,640 scroll up just a little more but right 5850 03:49:40,640 --> 03:49:42,399 after the paragraph i'm going to use 5851 03:49:42,399 --> 03:49:45,760 another semantic element called aside if 5852 03:49:45,760 --> 03:49:48,239 you remember that one and for the aside 5853 03:49:48,239 --> 03:49:50,479 i'm going to put an h3 header so we're 5854 03:49:50,479 --> 03:49:52,960 following that header hierarchy 5855 03:49:52,960 --> 03:49:54,319 put taco 5856 03:49:54,319 --> 03:49:57,760 trivia so for taco trivia we're going to 5857 03:49:57,760 --> 03:50:00,319 have a question that only shows the 5858 03:50:00,319 --> 03:50:02,239 answer when you click on it and for that 5859 03:50:02,239 --> 03:50:04,479 we need to start out with a 5860 03:50:04,479 --> 03:50:06,399 details element 5861 03:50:06,399 --> 03:50:08,319 and then inside the details element 5862 03:50:08,319 --> 03:50:10,880 we're going to use a summary element so 5863 03:50:10,880 --> 03:50:12,800 inside the summer is where we ask the 5864 03:50:12,800 --> 03:50:14,560 question and we can say 5865 03:50:14,560 --> 03:50:16,960 when did tacos 5866 03:50:16,960 --> 03:50:21,760 first appear in the united states 5867 03:50:21,760 --> 03:50:24,000 and now the nice thing is this question 5868 03:50:24,000 --> 03:50:26,160 will show but you'll have to click an 5869 03:50:26,160 --> 03:50:28,319 arrow to see the answer that is 5870 03:50:28,319 --> 03:50:30,880 contained within and that's within just 5871 03:50:30,880 --> 03:50:33,199 the rest of the details here and it's a 5872 03:50:33,199 --> 03:50:35,359 paragraph now i'm going to copy and 5873 03:50:35,359 --> 03:50:37,600 paste this paragraph in and put it right 5874 03:50:37,600 --> 03:50:40,160 here now notice i added another time 5875 03:50:40,160 --> 03:50:43,359 element here with 1905 and we can save 5876 03:50:43,359 --> 03:50:45,600 that much and we can see our taco trivia 5877 03:50:45,600 --> 03:50:47,520 down here at the bottom 5878 03:50:47,520 --> 03:50:49,680 and when we click we see the rest of 5879 03:50:49,680 --> 03:50:51,520 this but there's just a little more i 5880 03:50:51,520 --> 03:50:53,920 would like to add and it actually has 5881 03:50:53,920 --> 03:50:55,920 one element in there that was not 5882 03:50:55,920 --> 03:50:58,560 covered in prior lessons but remember 5883 03:50:58,560 --> 03:51:01,199 there is a wealth of information and 5884 03:51:01,199 --> 03:51:03,600 many different elements that still 5885 03:51:03,600 --> 03:51:05,680 remain uncovered i guess they're not 5886 03:51:05,680 --> 03:51:08,239 used as often but you can look them up 5887 03:51:08,239 --> 03:51:10,239 on the mozilla developer network so i'm 5888 03:51:10,239 --> 03:51:12,880 going to put in a citation and there is 5889 03:51:12,880 --> 03:51:16,160 an element in there called site so right 5890 03:51:16,160 --> 03:51:17,600 after this 5891 03:51:17,600 --> 03:51:20,160 i'll paste in the citation and here you 5892 03:51:20,160 --> 03:51:22,319 can see i put the source let me expand 5893 03:51:22,319 --> 03:51:23,840 visual studio code that's getting a 5894 03:51:23,840 --> 03:51:25,840 little cramped you can see i put the 5895 03:51:25,840 --> 03:51:26,800 source 5896 03:51:26,800 --> 03:51:31,040 and then i put a site element c-i-t-e 5897 03:51:31,040 --> 03:51:33,279 and inside that site element i put the 5898 03:51:33,279 --> 03:51:35,120 link to the source 5899 03:51:35,120 --> 03:51:36,560 so that is right there and that's 5900 03:51:36,560 --> 03:51:39,120 smithsonian magazine so now if i save 5901 03:51:39,120 --> 03:51:41,920 i'll resize once again to come back and 5902 03:51:41,920 --> 03:51:44,880 look at our taco trivia and when i show 5903 03:51:44,880 --> 03:51:48,960 the information you can see the citation 5904 03:51:48,960 --> 03:51:52,479 is put in italics by default with that 5905 03:51:52,479 --> 03:51:55,439 site element okay let's resize visual 5906 03:51:55,439 --> 03:51:57,520 studio code again to get a little more 5907 03:51:57,520 --> 03:52:00,399 room and scroll up as well after that 5908 03:52:00,399 --> 03:52:03,040 aside we have really completed our first 5909 03:52:03,040 --> 03:52:05,359 article so let's put a horizontal rule 5910 03:52:05,359 --> 03:52:07,840 in here which also indicates a topic 5911 03:52:07,840 --> 03:52:10,080 change at least somewhat 5912 03:52:10,080 --> 03:52:12,880 in the main area and put another article 5913 03:52:12,880 --> 03:52:15,199 now this article i didn't add the id but 5914 03:52:15,199 --> 03:52:18,239 it needs the id because the id equals 5915 03:52:18,239 --> 03:52:20,160 menu and this is where we will put the 5916 03:52:20,160 --> 03:52:22,399 little taco shot menu we'll start with 5917 03:52:22,399 --> 03:52:24,640 an h2 again to follow the header 5918 03:52:24,640 --> 03:52:26,560 hierarchy for our page 5919 03:52:26,560 --> 03:52:28,319 and we'll put 5920 03:52:28,319 --> 03:52:30,880 our menu for that and then we'll start 5921 03:52:30,880 --> 03:52:33,760 our table element 5922 03:52:33,760 --> 03:52:35,520 inside the table element the first thing 5923 03:52:35,520 --> 03:52:37,760 we're going to add just immediately if i 5924 03:52:37,760 --> 03:52:41,120 could start is a caption there we go and 5925 03:52:41,120 --> 03:52:44,720 we'll just put our tacos for the caption 5926 03:52:44,720 --> 03:52:48,080 after that we need a t head 5927 03:52:48,080 --> 03:52:50,720 inside the t head will be a table row 5928 03:52:50,720 --> 03:52:53,600 and the table row is going to have our 5929 03:52:53,600 --> 03:52:55,520 columns and these are our heading 5930 03:52:55,520 --> 03:52:57,520 columns so the first one 5931 03:52:57,520 --> 03:52:59,359 is tacos 5932 03:52:59,359 --> 03:53:02,479 after tacos we're going to have 5933 03:53:02,479 --> 03:53:04,319 a second th 5934 03:53:04,319 --> 03:53:06,640 and this th is going to have well let me 5935 03:53:06,640 --> 03:53:08,560 go ahead and type th again there we go 5936 03:53:08,560 --> 03:53:11,120 this th is going to have a scope and 5937 03:53:11,120 --> 03:53:13,600 let's set this scope equal to column 5938 03:53:13,600 --> 03:53:15,600 because it's for the column 5939 03:53:15,600 --> 03:53:18,000 and then we need our abbreviation 5940 03:53:18,000 --> 03:53:21,680 element once again so let's type abbr 5941 03:53:21,680 --> 03:53:25,279 and then we'll put the title equal to 5942 03:53:25,279 --> 03:53:27,040 quantity 5943 03:53:27,040 --> 03:53:28,800 and now we can put in the abbreviation 5944 03:53:28,800 --> 03:53:30,720 for quantity that we want to use which 5945 03:53:30,720 --> 03:53:33,120 is commonly qty 5946 03:53:33,120 --> 03:53:36,479 and then we'll add another th 5947 03:53:36,479 --> 03:53:38,960 and it will also have a scope 5948 03:53:38,960 --> 03:53:41,680 let's set this equal to column as well 5949 03:53:41,680 --> 03:53:43,279 and this will be 5950 03:53:43,279 --> 03:53:45,680 the price column okay going to scroll up 5951 03:53:45,680 --> 03:53:47,600 as you might have realized when we 5952 03:53:47,600 --> 03:53:49,600 learned about tables tables take up a 5953 03:53:49,600 --> 03:53:51,760 lot more space as you create them in 5954 03:53:51,760 --> 03:53:52,960 your code 5955 03:53:52,960 --> 03:53:55,359 so we've completed the head and we need 5956 03:53:55,359 --> 03:53:57,359 more room for 5957 03:53:57,359 --> 03:54:00,399 the body of the table let's add a new 5958 03:54:00,399 --> 03:54:01,439 row 5959 03:54:01,439 --> 03:54:03,840 and inside this row we're going to add 5960 03:54:03,840 --> 03:54:06,000 another heading but this will have a 5961 03:54:06,000 --> 03:54:07,840 different scope so now that we're back 5962 03:54:07,840 --> 03:54:09,520 there we'll go scope 5963 03:54:09,520 --> 03:54:11,760 equals row 5964 03:54:11,760 --> 03:54:13,359 and now that we're ready to put in the 5965 03:54:13,359 --> 03:54:16,479 value let's call this crunchy but i did 5966 03:54:16,479 --> 03:54:18,880 forget an attribute this also needs a 5967 03:54:18,880 --> 03:54:22,399 row span so this will have a row span 5968 03:54:22,399 --> 03:54:24,239 equal to three 5969 03:54:24,239 --> 03:54:27,359 okay after we've created the scope and 5970 03:54:27,359 --> 03:54:29,600 the row span with crunchy we can't 5971 03:54:29,600 --> 03:54:32,080 forget the values of the other columns 5972 03:54:32,080 --> 03:54:36,479 so now we need one for the quantity and 5973 03:54:36,479 --> 03:54:39,279 for the next one which was price we need 5974 03:54:39,279 --> 03:54:42,560 a dollar fifty so there's our first row 5975 03:54:42,560 --> 03:54:44,720 and now we can create more rows but what 5976 03:54:44,720 --> 03:54:46,399 i really want to do is just take these 5977 03:54:46,399 --> 03:54:48,000 last three 5978 03:54:48,000 --> 03:54:51,040 and do shift alt and the down arrow and 5979 03:54:51,040 --> 03:54:55,040 then add an opening tr here i wanted to 5980 03:54:55,040 --> 03:54:56,960 add a closing tr as well but we don't 5981 03:54:56,960 --> 03:54:59,040 need that because 5982 03:54:59,040 --> 03:55:02,960 this crunchy is taking up three rows so 5983 03:55:02,960 --> 03:55:05,279 we don't want to add that row down here 5984 03:55:05,279 --> 03:55:07,359 we just need the other two rows so let's 5985 03:55:07,359 --> 03:55:09,760 turn this one into two dollars or two 5986 03:55:09,760 --> 03:55:11,600 quantity of two 5987 03:55:11,600 --> 03:55:14,319 and two dollars and fifty cents now i'll 5988 03:55:14,319 --> 03:55:16,160 just highlight this row 5989 03:55:16,160 --> 03:55:18,479 and take it down one more time and we'll 5990 03:55:18,479 --> 03:55:21,279 have a quantity of three 5991 03:55:21,279 --> 03:55:22,720 and we'll put 5992 03:55:22,720 --> 03:55:24,640 three dollars 5993 03:55:24,640 --> 03:55:28,080 and 25 cents so now we've got the feel 5994 03:55:28,080 --> 03:55:30,319 of this where we've got the first one 5995 03:55:30,319 --> 03:55:32,160 with the title and it's taking up three 5996 03:55:32,160 --> 03:55:33,920 rows and then we've got the quantity and 5997 03:55:33,920 --> 03:55:36,399 the price so what i want to do for the 5998 03:55:36,399 --> 03:55:39,120 next one is to just highlight 5999 03:55:39,120 --> 03:55:40,560 all of these 6000 03:55:40,560 --> 03:55:42,880 and press shift alt and the down arrow 6001 03:55:42,880 --> 03:55:45,359 and once again just make changes so this 6002 03:55:45,359 --> 03:55:48,560 is going to be soft instead of crunchy 6003 03:55:48,560 --> 03:55:50,560 and now we still got a quantity of one 6004 03:55:50,560 --> 03:55:52,640 but is the price the same and no it's 6005 03:55:52,640 --> 03:55:54,399 not soft tacos are a little more 6006 03:55:54,399 --> 03:55:56,560 expensive so two dollars 6007 03:55:56,560 --> 03:56:00,479 and then for two soft tacos it's 350 and 6008 03:56:00,479 --> 03:56:03,600 for three soft tacos it is 6009 03:56:03,600 --> 03:56:06,399 450. now let's scroll up some more we've 6010 03:56:06,399 --> 03:56:08,319 finished with the body but we need to 6011 03:56:08,319 --> 03:56:10,000 add the footer to the table and that's 6012 03:56:10,000 --> 03:56:13,040 the t foot element and now inside the t 6013 03:56:13,040 --> 03:56:15,760 foot we're going to have a table row 6014 03:56:15,760 --> 03:56:18,399 and then we'll have a data cell table 6015 03:56:18,399 --> 03:56:21,199 data and it's going to have a call span 6016 03:56:21,199 --> 03:56:23,040 attribute so it's going to span all of 6017 03:56:23,040 --> 03:56:25,840 the columns so that's three 6018 03:56:25,840 --> 03:56:28,399 and then inside of the table data we'll 6019 03:56:28,399 --> 03:56:29,840 put chips 6020 03:56:29,840 --> 03:56:31,920 and then and amp 6021 03:56:31,920 --> 03:56:34,080 is for the ampersand that is another 6022 03:56:34,080 --> 03:56:36,000 html entity 6023 03:56:36,000 --> 03:56:38,800 and then we put salsa two dollars and 6024 03:56:38,800 --> 03:56:40,800 now we've completed our table but 6025 03:56:40,800 --> 03:56:42,560 underneath the table in this last 6026 03:56:42,560 --> 03:56:45,680 article let's go ahead and put 6027 03:56:45,680 --> 03:56:48,080 a line break and after the break let's 6028 03:56:48,080 --> 03:56:50,399 put a paragraph and let's go ahead and 6029 03:56:50,399 --> 03:56:51,760 add our 6030 03:56:51,760 --> 03:56:54,720 back to top link so now we'll have an a 6031 03:56:54,720 --> 03:56:56,319 with an href 6032 03:56:56,319 --> 03:56:59,040 we'll set this equal to the hashtag 6033 03:56:59,040 --> 03:57:01,439 which should just reload the page take 6034 03:57:01,439 --> 03:57:04,479 us back to the top 6035 03:57:04,479 --> 03:57:07,520 and we can save so now let's resize 6036 03:57:07,520 --> 03:57:09,520 visual studio code and see if we have 6037 03:57:09,520 --> 03:57:12,319 all of our content yes we've got the 6038 03:57:12,319 --> 03:57:14,399 crunchy that took three rows and the 6039 03:57:14,399 --> 03:57:16,319 soft that took three rows there's the 6040 03:57:16,319 --> 03:57:17,680 table footer 6041 03:57:17,680 --> 03:57:20,239 everything looks like we planned it and 6042 03:57:20,239 --> 03:57:22,640 our back to top link is here it takes us 6043 03:57:22,640 --> 03:57:24,560 back to the top as well 6044 03:57:24,560 --> 03:57:26,319 our taco trivia 6045 03:57:26,319 --> 03:57:28,800 everything is good about the home page 6046 03:57:28,800 --> 03:57:31,199 so now let's work on the store hours 6047 03:57:31,199 --> 03:57:34,239 page it is a fairly short page and there 6048 03:57:34,239 --> 03:57:36,080 you can see it displayed to the right 6049 03:57:36,080 --> 03:57:37,600 and we'll pull up the code here on the 6050 03:57:37,600 --> 03:57:40,080 left okay let's scroll down and we've 6051 03:57:40,080 --> 03:57:42,080 just got a little bit of content to add 6052 03:57:42,080 --> 03:57:45,040 in the main area here of the body inside 6053 03:57:45,040 --> 03:57:46,560 the main element 6054 03:57:46,560 --> 03:57:49,600 so we'll start out with a paragraph 6055 03:57:49,600 --> 03:57:52,160 and inside this paragraph we'll just say 6056 03:57:52,160 --> 03:57:55,439 we are open seven days 6057 03:57:55,439 --> 03:57:58,000 a week with an exclamation mark after 6058 03:57:58,000 --> 03:58:01,040 that we need to add a data list so it 6059 03:58:01,040 --> 03:58:03,840 starts out with a dl element 6060 03:58:03,840 --> 03:58:07,760 inside the dl element we'll have a dt 6061 03:58:07,760 --> 03:58:10,800 and this is where we'll put our sunday 6062 03:58:10,800 --> 03:58:14,640 dash thursday so sunday through thursday 6063 03:58:14,640 --> 03:58:17,199 and then underneath that we'll have a dd 6064 03:58:17,199 --> 03:58:19,040 element and that's where we'll put our 6065 03:58:19,040 --> 03:58:20,319 11 am 6066 03:58:20,319 --> 03:58:22,720 dash 9 pm 6067 03:58:22,720 --> 03:58:24,800 so now we can just copy this down 6068 03:58:24,800 --> 03:58:26,880 because there's only one more that was 6069 03:58:26,880 --> 03:58:28,800 like it and we can just change the days 6070 03:58:28,800 --> 03:58:32,080 out so now this will be 6071 03:58:32,080 --> 03:58:34,000 friday 6072 03:58:34,000 --> 03:58:35,760 saturday and then the hours are 6073 03:58:35,760 --> 03:58:38,800 different as well it's 11 a.m to 6074 03:58:38,800 --> 03:58:40,399 11 p.m 6075 03:58:40,399 --> 03:58:42,239 and we can save that 6076 03:58:42,239 --> 03:58:45,520 now we also need to add a back to the 6077 03:58:45,520 --> 03:58:48,880 top link as well so here's our paragraph 6078 03:58:48,880 --> 03:58:50,560 and then we can say 6079 03:58:50,560 --> 03:58:53,279 a with href once again equal to the 6080 03:58:53,279 --> 03:58:54,960 hashtag 6081 03:58:54,960 --> 03:58:57,120 and back to top 6082 03:58:57,120 --> 03:58:59,040 and save once again 6083 03:58:59,040 --> 03:59:00,880 and now we can see all of this here on 6084 03:59:00,880 --> 03:59:04,000 the right our back to top really isn't 6085 03:59:04,000 --> 03:59:05,920 needed because it's so short but we're 6086 03:59:05,920 --> 03:59:07,680 just consistent between each page and 6087 03:59:07,680 --> 03:59:10,720 that's fine so now let's go over to the 6088 03:59:10,720 --> 03:59:13,680 menu page or not the menu i'm sorry we 6089 03:59:13,680 --> 03:59:15,840 want to go to the contact us page that's 6090 03:59:15,840 --> 03:59:17,359 where we are the menu is on the home 6091 03:59:17,359 --> 03:59:18,960 page i don't know about you but i'm 6092 03:59:18,960 --> 03:59:20,319 starting to get hungry when i look at 6093 03:59:20,319 --> 03:59:22,640 those so let's finish up this project so 6094 03:59:22,640 --> 03:59:24,800 we can go get some tacos i'm going to 6095 03:59:24,800 --> 03:59:26,960 scroll up and once again we're going to 6096 03:59:26,960 --> 03:59:28,399 change out 6097 03:59:28,399 --> 03:59:29,199 the 6098 03:59:29,199 --> 03:59:31,199 comment inside of the main element and 6099 03:59:31,199 --> 03:59:33,920 put in our content we'll start with an 6100 03:59:33,920 --> 03:59:35,920 h2 following the header hierarchy 6101 03:59:35,920 --> 03:59:38,080 remember we already have contact us up 6102 03:59:38,080 --> 03:59:40,000 here in the header i believe if we 6103 03:59:40,000 --> 03:59:42,080 scroll up there there's the h1 so we 6104 03:59:42,080 --> 03:59:44,000 want an h2 here 6105 03:59:44,000 --> 03:59:47,359 and this h2 is going to say our 6106 03:59:47,359 --> 03:59:48,560 contact 6107 03:59:48,560 --> 03:59:49,680 form 6108 03:59:49,680 --> 03:59:51,760 okay now we need to go ahead and create 6109 03:59:51,760 --> 03:59:53,840 this form so we'll start with the form 6110 03:59:53,840 --> 03:59:55,760 element and let's go ahead and give it 6111 03:59:55,760 --> 03:59:57,199 an action well 6112 03:59:57,199 --> 03:59:58,720 there we go form 6113 03:59:58,720 --> 04:00:00,319 tab over and it gives us the action 6114 04:00:00,319 --> 04:00:02,720 there we go and we'll send this to that 6115 04:00:02,720 --> 04:00:04,960 same website we used in the forms 6116 04:00:04,960 --> 04:00:08,040 tutorial that's http 6117 04:00:08,040 --> 04:00:09,760 bin.org 6118 04:00:09,760 --> 04:00:11,600 get so we're going to use a get method 6119 04:00:11,600 --> 04:00:13,760 when we submit it and we'll at least be 6120 04:00:13,760 --> 04:00:15,920 able to see the information on that 6121 04:00:15,920 --> 04:00:18,399 website so as i said we use the get 6122 04:00:18,399 --> 04:00:20,160 method so let's go ahead and apply that 6123 04:00:20,160 --> 04:00:23,040 attribute as well method equals get 6124 04:00:23,040 --> 04:00:24,960 after that i'm going to put some space 6125 04:00:24,960 --> 04:00:28,160 here in the form and we need a field set 6126 04:00:28,160 --> 04:00:29,279 element 6127 04:00:29,279 --> 04:00:31,520 now we can put our form inside the field 6128 04:00:31,520 --> 04:00:33,920 set element and then we'll have a legend 6129 04:00:33,920 --> 04:00:37,040 element and here we'll say send us a 6130 04:00:37,040 --> 04:00:39,279 message 6131 04:00:39,279 --> 04:00:41,120 and then we can start in with the 6132 04:00:41,120 --> 04:00:43,279 description of our form 6133 04:00:43,279 --> 04:00:45,920 so we have a paragraph and then we have 6134 04:00:45,920 --> 04:00:47,520 a label 6135 04:00:47,520 --> 04:00:49,600 and then it has a four and this will be 6136 04:00:49,600 --> 04:00:51,760 name and so then we need to put name 6137 04:00:51,760 --> 04:00:55,120 inside the label as we label the input 6138 04:00:55,120 --> 04:00:57,439 and now we need that input so here's the 6139 04:00:57,439 --> 04:00:58,560 input 6140 04:00:58,560 --> 04:01:00,319 let's give it a 6141 04:01:00,319 --> 04:01:01,840 type 6142 04:01:01,840 --> 04:01:03,680 there we go text 6143 04:01:03,680 --> 04:01:06,319 there it is text now we put in the name 6144 04:01:06,319 --> 04:01:09,359 which is name and the id which is going 6145 04:01:09,359 --> 04:01:10,399 to be 6146 04:01:10,399 --> 04:01:12,000 name as well 6147 04:01:12,000 --> 04:01:14,560 now i want a placeholder element here 6148 04:01:14,560 --> 04:01:16,960 also 6149 04:01:16,960 --> 04:01:19,040 this placeholder is going to say your 6150 04:01:19,040 --> 04:01:21,359 name giving the user a clue as to what 6151 04:01:21,359 --> 04:01:22,479 to put in 6152 04:01:22,479 --> 04:01:25,279 and let's put in required as we want the 6153 04:01:25,279 --> 04:01:27,439 username to be required before they can 6154 04:01:27,439 --> 04:01:29,680 submit the form scroll just a little 6155 04:01:29,680 --> 04:01:31,199 more for some more room i'm going to 6156 04:01:31,199 --> 04:01:33,040 highlight this paragraph now and once 6157 04:01:33,040 --> 04:01:35,680 again shift alt and the down arrow and 6158 04:01:35,680 --> 04:01:37,760 now i've already got my label and input 6159 04:01:37,760 --> 04:01:39,520 and i just need to change some of these 6160 04:01:39,520 --> 04:01:41,920 things so this would be email 6161 04:01:41,920 --> 04:01:44,239 and we'll change name here to 6162 04:01:44,239 --> 04:01:47,600 email as well and now this will be an 6163 04:01:47,600 --> 04:01:50,640 email input and then for the name 6164 04:01:50,640 --> 04:01:53,920 and id i'm going to press ctrl d 6165 04:01:53,920 --> 04:01:56,720 for each of those remaining name words 6166 04:01:56,720 --> 04:01:59,120 and then i can change them all at once 6167 04:01:59,120 --> 04:02:00,399 to email 6168 04:02:00,399 --> 04:02:02,319 okay i'm going to save this much and we 6169 04:02:02,319 --> 04:02:04,640 see the beginning of our form over here 6170 04:02:04,640 --> 04:02:07,359 but we still need the area to put in the 6171 04:02:07,359 --> 04:02:08,399 message 6172 04:02:08,399 --> 04:02:10,080 so i think i want to scroll some more 6173 04:02:10,080 --> 04:02:13,040 for that and then return once again one 6174 04:02:13,040 --> 04:02:14,399 more paragraph 6175 04:02:14,399 --> 04:02:17,520 inside this paragraph let's have a label 6176 04:02:17,520 --> 04:02:19,520 and now the four here is going to be 6177 04:02:19,520 --> 04:02:20,720 message 6178 04:02:20,720 --> 04:02:23,279 and now inside the label we'll also put 6179 04:02:23,279 --> 04:02:25,120 well we'll put your message here that's 6180 04:02:25,120 --> 04:02:26,239 fine 6181 04:02:26,239 --> 04:02:28,960 and then we need a text area which is a 6182 04:02:28,960 --> 04:02:31,520 little bit different than a text input 6183 04:02:31,520 --> 04:02:33,359 this is going to have the name of 6184 04:02:33,359 --> 04:02:35,920 message and it should have the id of 6185 04:02:35,920 --> 04:02:38,640 message as well 6186 04:02:38,640 --> 04:02:41,279 columns 30 and rows 10 that's fine that 6187 04:02:41,279 --> 04:02:44,160 is the default and then placeholder also 6188 04:02:44,160 --> 04:02:46,319 so let's put a placeholder 6189 04:02:46,319 --> 04:02:49,840 let's set that equal to type your 6190 04:02:49,840 --> 04:02:52,000 message here 6191 04:02:52,000 --> 04:02:54,160 and then the actual message of course 6192 04:02:54,160 --> 04:02:56,880 goes inside the text area so we'll save 6193 04:02:56,880 --> 04:02:59,359 that and now we should see a place they 6194 04:02:59,359 --> 04:03:01,520 can put their message oh but we can see 6195 04:03:01,520 --> 04:03:02,960 it looks a little different this doesn't 6196 04:03:02,960 --> 04:03:05,680 look quite right let's put a break after 6197 04:03:05,680 --> 04:03:07,600 that label 6198 04:03:07,600 --> 04:03:10,000 and then it should put the label up on 6199 04:03:10,000 --> 04:03:12,560 top of that message box now let's scroll 6200 04:03:12,560 --> 04:03:14,560 a little bit more and after the field 6201 04:03:14,560 --> 04:03:18,160 set but important enough before the form 6202 04:03:18,160 --> 04:03:20,800 has ended we need to put a button and 6203 04:03:20,800 --> 04:03:23,120 then inside of this button let's give it 6204 04:03:23,120 --> 04:03:26,160 an attribute which is type equals 6205 04:03:26,160 --> 04:03:29,600 submit and then let's go ahead and put 6206 04:03:29,600 --> 04:03:32,560 send for the button text i'm going to 6207 04:03:32,560 --> 04:03:34,160 copy this down 6208 04:03:34,160 --> 04:03:36,880 ctrl alt and the down arrow and now this 6209 04:03:36,880 --> 04:03:39,279 type will be reset so we have a second 6210 04:03:39,279 --> 04:03:40,160 button 6211 04:03:40,160 --> 04:03:43,040 and we can put reset here as well so 6212 04:03:43,040 --> 04:03:45,040 now let's save and we should see our 6213 04:03:45,040 --> 04:03:48,800 buttons that will send or reset the form 6214 04:03:48,800 --> 04:03:50,960 and as i look at everything i've noticed 6215 04:03:50,960 --> 04:03:53,199 something we put our form inside the 6216 04:03:53,199 --> 04:03:56,160 main element but i wanted to wrap that 6217 04:03:56,160 --> 04:03:59,199 inside of a semantic tag as well not 6218 04:03:59,199 --> 04:04:00,960 just the main element 6219 04:04:00,960 --> 04:04:03,040 but i wanted to put it inside of a 6220 04:04:03,040 --> 04:04:05,680 section element so let's go ahead and 6221 04:04:05,680 --> 04:04:08,000 put a section element there 6222 04:04:08,000 --> 04:04:09,199 and we will 6223 04:04:09,199 --> 04:04:11,199 copy that or cut that actually with 6224 04:04:11,199 --> 04:04:15,199 control x and scroll all the way down to 6225 04:04:15,199 --> 04:04:18,160 where the form ends and put the closing 6226 04:04:18,160 --> 04:04:20,560 section there now let's save that 6227 04:04:20,560 --> 04:04:22,319 it doesn't make the page look any 6228 04:04:22,319 --> 04:04:24,479 different but it holds up the html 6229 04:04:24,479 --> 04:04:26,880 semantics better and the main reason we 6230 04:04:26,880 --> 04:04:29,359 need it is because the form is not the 6231 04:04:29,359 --> 04:04:32,399 only content of the page so we have 6232 04:04:32,399 --> 04:04:35,279 another section here and this section 6233 04:04:35,279 --> 04:04:38,800 has an h2 of its own and here we can put 6234 04:04:38,800 --> 04:04:41,439 our location which goes nicely with a 6235 04:04:41,439 --> 04:04:44,640 contact us page as well so now we've got 6236 04:04:44,640 --> 04:04:47,199 the h2 there and we need an address 6237 04:04:47,199 --> 04:04:48,960 element because now we can put our 6238 04:04:48,960 --> 04:04:51,600 location inside of this address element 6239 04:04:51,600 --> 04:04:54,399 so it's 555 6240 04:04:54,399 --> 04:04:55,439 taco 6241 04:04:55,439 --> 04:04:57,359 temptation 6242 04:04:57,359 --> 04:05:02,720 lane and then it's at sweet tea 6243 04:05:02,720 --> 04:05:06,880 line break and then kansas city 6244 04:05:06,880 --> 04:05:12,600 missouri and then 555 555-5555 6245 04:05:12,800 --> 04:05:15,120 completely fictitious zip code 6246 04:05:15,120 --> 04:05:18,160 after that we'll put in a line break and 6247 04:05:18,160 --> 04:05:19,840 another line break 6248 04:05:19,840 --> 04:05:21,760 and then let's put in a phone number 6249 04:05:21,760 --> 04:05:24,479 which is also fictitious but we want an 6250 04:05:24,479 --> 04:05:27,439 actual link that will work 6251 04:05:27,439 --> 04:05:29,840 to make your phone or whatever mobile 6252 04:05:29,840 --> 04:05:31,760 device dial the phone number and we can 6253 04:05:31,760 --> 04:05:34,560 do that with the tell abbreviation 6254 04:05:34,560 --> 04:05:35,840 and then we need 6255 04:05:35,840 --> 04:05:37,359 a plus 6256 04:05:37,359 --> 04:05:38,239 and then 6257 04:05:38,239 --> 04:05:41,680 five five five five five five five five 6258 04:05:41,680 --> 04:05:44,720 five five there we go and then we can 6259 04:05:44,720 --> 04:05:48,760 put the link so it's 555-555-5555 6260 04:05:50,399 --> 04:05:52,720 and now we've completed the address 6261 04:05:52,720 --> 04:05:55,199 section so if we save that and scroll up 6262 04:05:55,199 --> 04:05:56,319 a little bit 6263 04:05:56,319 --> 04:05:58,319 there is the location information and 6264 04:05:58,319 --> 04:06:01,120 with that i believe we have completed 6265 04:06:01,120 --> 04:06:04,479 our website in the three pages so i hope 6266 04:06:04,479 --> 04:06:06,960 this tutorial has helped and more than 6267 04:06:06,960 --> 04:06:08,720 that i hope you were able to complete 6268 04:06:08,720 --> 04:06:10,960 much of it on your own before watching 6269 04:06:10,960 --> 04:06:13,760 the tutorial let's expand chrome and 6270 04:06:13,760 --> 04:06:16,640 look at our overall site so if we go to 6271 04:06:16,640 --> 04:06:19,120 the home page here it is 6272 04:06:19,120 --> 04:06:21,359 here's everything we added 6273 04:06:21,359 --> 04:06:23,040 here's the back to the top link that 6274 04:06:23,040 --> 04:06:25,600 works too we can go to the menu that's 6275 04:06:25,600 --> 04:06:27,439 great we should be able to go to the 6276 04:06:27,439 --> 04:06:30,800 about lts yep that works good too 6277 04:06:30,800 --> 04:06:33,120 mouse over an image and we get our title 6278 04:06:33,120 --> 04:06:35,920 text all of that's as expected store 6279 04:06:35,920 --> 04:06:36,960 hours 6280 04:06:36,960 --> 04:06:38,880 everything looks like it should here as 6281 04:06:38,880 --> 04:06:39,760 well 6282 04:06:39,760 --> 04:06:42,160 and then the contact us page 6283 04:06:42,160 --> 04:06:43,760 everything's looking good here let's go 6284 04:06:43,760 --> 04:06:45,680 ahead and try the contactless 6285 04:06:45,680 --> 04:06:48,479 information so then we say dave 6286 04:06:48,479 --> 04:06:49,920 at dave 6287 04:06:49,920 --> 04:06:50,800 dot 6288 04:06:50,800 --> 04:06:52,960 dave whatever and then 6289 04:06:52,960 --> 04:06:55,199 dave in the message that's fine 6290 04:06:55,199 --> 04:06:58,960 send and yes it goes to the http 6291 04:06:58,960 --> 04:07:00,920 http 6292 04:07:00,920 --> 04:07:04,000 bin.org and we see the information from 6293 04:07:04,000 --> 04:07:06,080 the form and that's a great site to test 6294 04:07:06,080 --> 04:07:09,199 out forms on so everything is looking as 6295 04:07:09,199 --> 04:07:11,680 it should i'm ready to go get some tacos 6296 04:07:11,680 --> 04:07:14,160 congratulations on completing your html 6297 04:07:14,160 --> 04:07:16,239 project remember to keep striving for 6298 04:07:16,239 --> 04:07:18,720 progress over perfection and a little 6299 04:07:18,720 --> 04:07:20,960 progress every day will go a very long 6300 04:07:20,960 --> 04:07:23,279 way please give this video a like if 6301 04:07:23,279 --> 04:07:25,199 it's helped you and thank you for 6302 04:07:25,199 --> 04:07:27,120 watching and subscribing you're helping 6303 04:07:27,120 --> 04:07:29,840 my channel grow have a great day and 6304 04:07:29,840 --> 04:07:34,600 let's write more code together very soon436029

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