All language subtitles for 12 - Debugging 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

- Before we go into more HTML elements,

I want to make sure you know

how to inspect HTML in a browser developer tools.

In all of today's desktop browsers,

there's a secret cockpit of information about

what's happening with a website's code and performance.

Let's look at them in Firefox.

Here I've got a demo in Codepen

that combines a lot of the HTML elements that we've learned.

I'll open this Codepen demo up in a new tab,

so we just have the demo and not all the parts

for the Codepen website.

Now, I'll right-click on this and go to inspect element,

or instead we can go to tools, web developer, inspector.

This opens the developer tools.

Across the top here, there are a bunch of other tabs

with page after page of different tools.

Like I said, it's a cockpit of controls.

But let's ignore all that, and let's just look

at the inspector.

We've got three panes here.

On the left is the HTML, the middle is for CSS

and the right pane has several more options.

You can click on more tabs here and see the layout tools,

the list of any changes you've made to CSS

and a pane about fonts.

But we aren't going to think about this right pane

or this middle pane for CSS right now.

Let's just look at the left pane, this is our HTML.

I can see here the DOM that the browser has created,

the Document Object Model.

Firefox read the HTML that I sent it,

and then it revised it, it tried its best

to fix any mistakes that I might have had,

and created its own version, the DOM version.

We can see what the headline Bees is wrapped in an h1,

and below that, Beekeeping is an h2,

and then we can see that there are two paragraphs.

We see a p element, but instead of the words

in the paragraph, it just says, "..."

and there's a little triangle right here,

you can turn these triangles

and reveal what's inside.

I can see in the second paragraph, there's a sup element

around the number for the footnote.

Further down, I can see a pre element

and a block quote, inside the block quote

I have a cite element.

The inspector is representing the DOM tree here,

the family tree of elements,

and that's going to be very useful.

Many browsers have developer tools, Safari, Chrome, Edge,

and they all have an HTML panel that's just like this one.

They use the same way of indenting things

and using these little triangles

to make sense of the DOM tree.

We can use developer tools to inspect any website

on the internet, and peek under the hood

to see how other developers use HTML.

This is how I get ideas when I'm not sure

what markup to use, I'll go to other websites,

find some content that's similar to the content I'm trying

to markup, and use the developer tools

to find out what elements they used.

Especially if the website was built by a team

that I respect, looking at other peoples work

can help me to better understand how

to structure my own HTML.

You can also use HTML inspector in dev tools

to help us debug mistakes.

Let's look at some code that has something wrong with it.

Here I have an unordered list with four items,

and they should be counting off one, two, three, four,

but if you look at the results there's a blank one,

and it throws off the counting, we get five items, so why?

Well, let's right click on this

and look at it in the developer tools

we can see that in fact the browser is doing something

to repair the HTML that it received

when it built the DOM tree.

And it thinks that there should be five items,

one, two, empty, three, four,

so what's going on?

Well I can see that there's something going wrong

before what should be the third item,

and I know the browser is adding more tags,

it's adding an extra pair of tags.

Let's look back at my original HTML

and somewhere before the third term,

oh I see, it, I told the browser to start another list item

right here instead of telling it end one,

so let's fix that.

If I put the slash where it's missing,

we can see now that it works, the DOM is fixed.

Any time you aren't sure what's going on, reach

for the developer tools in a browser to sort things out.

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