Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
- 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.