All language subtitles for 15 - Formatting HTML.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
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
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

Original subtitles

- Let's talk about what's going on inside the HTML file

and options we have for formatting our code.

As I've mentioned earlier, for the most part,

HTML doesn't care about spaces, tabs, carriage returns.

There are a few exceptions.

If you use a element or a element

or a , or if you use CSS

to change how the white space is handled,

in those situations, extra space, returns, and indentations

can count.

But most of the time, the browser will ignore everything

having to do with spacing

beyond the presence or single space.

Let's look at an example.

Here, I've typed up a paragraph with the extra spaces

between each sentence, but the browser is going to ignore them.

Another way programmers keep code easy to understand

is by "documenting it",

by putting comments in the code to explain what's going on.

In HTML, you add comments to code by typing less than,

exclamation point, dash, dash.

Everything after that will be ignored by the browser.

To end the comment, you close it with dash, dash,

greater than.

Most code editors will gray out commented code or remarks,

including the CodePen editor, which is super helpful.

Then we aren't confused why something isn't working.

We can see that it's commented out.

Let's talk about uppercase versus lowercase.

Back when HTMl was new,

everyone capitalized our HTML elements.

Along the way, as HTML evolved,

the web industry switched to believing that it's much better

to write all the elements with lowercase letters.

Now, the truth is, it doesn't actually matter.

There's still millions of ancient websites out there

with HTML written in all caps,

and there are billions of newer sites

that never use capitals in their HTML.

So the browsers are going to support whatever it is

that you do.

That said, everybody writes everything in lowercase letters.

It's just the way that it's done now.

All caps?

It hurts my eyes.

You might have noticed that some of the elements

are very short, like or .

And then others are longer,

especially some of the ones we haven't talked about yet,

like or .

Those are full words in English.

It's video, not v or vid.

So why?

Well, HTML was invented in the late 80s and the early 90s,

when computer scientists were obsessed

with counting every single bit and bite.

Computers had one megabyte of ram

and 20 megabytes of hard drive space.

Yeah, megabytes.

And each character adds to the total size of a file.

As HTML evolved, the memory in computers grew,

and it was far less important to save a few characters

here and there, and far more important

to make code easily readable and understandable.

So the newer elements use whole words.

It's just much easier for humans.

At least, for humans who speak English.

Nowadays, the length of an element, it's a bit of a clue

as to how long an element has been around.

One last thing about how HTML is written.

Do we have a closing tag or not?

We've gone through quite a few elements

in this course so far, and almost all of them

come in pairs with an opening and a closing tag.

The newer HTML elements always have both

an opening and a closing tag,

like the video element, which we'll cover in Chapter 6.

Sometimes, you don't put anything

between the opening and closing tag,

but for some of the older elements,

there is no closing tag.

Like, image, which we'll dive into in Chapter 5.

These elements were invented in the mid 90s

and in those days, folks thought,

"Hey, if there's no need for a closing tag,

why have one?"

Later, thinking changed and the best practice changed

to put a slash at the end of any element

that otherwise didn't have a closing tag.

The idea is that the element kind of opens and closes

itself, all at once.

There were many years when everyone told each other,

"You have to have the slash".

But, around 2010, people stopped worrying about it.

Honestly, at this point, I don't know if most developers

use a closing slash or not.

At this point, it really doesn't matter.

Browsers will support a range of different options

of how you format your code.

It's really up to you and your team to decide

how you want to do it.

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