As we just saw astm Al is about marking up content to make it appear.
Are acts in a certain way in the browser.
We just added some astm old tags to some text to give us a bit of farm outing and lay out when we viewed
it in the browser.
However although Doing this will work to get a properly formed to email document.
We need to add some additional elements to this code.
An eight tier mail document is made up of a head section where we can provide general information.
Our metter data about the document including its title the type of characters used and so on.
Following this is the body section and this is where we put our content.
Basically what we see in the browser.
Let's add the various elements we need to structure this h to mail document properly.
The first line of an extra email document is the doc type.
While this really does is tells the browser that what follows is some h.t. email several years ago different
doc types were used to tell the browser exactly what version of h.t. email was being used so that we
could do useful things like barter Mattingly check for errors for example.
However nowadays it's not really used it's just necessary to include it for everything to work properly.
Next we need to add an H t e mail element around the rest of the code we have the opening tab here and
the closing tag at the end.
This is always the very last line of NHT mail document.
Nothing should go after this line.
This is commonly referred to as the root element and it wraps all the content on the entire page.
Then let's add the head section.
This comes immediately after the h.t. Amount opening tag here will leave it empty for now.
Then the body section which wraps the content the body element opening.
Tag always comes immediately after the head element closing tag with no spaces in between.
And the body closing tag always comes right before the s t r l closing tack.
If we look at this in the browser we can see that nothing has changed.
All we've done is added some information about the document itself.
While we're in the browser.
Note that the title of the page which is what is shown here in the top of the tab by default displays
the current address of the page
to change the pages title.
We need to add a title element in the header section.
You can put any text you like in the title as long as it's just text.
Apart from the head and body tags themselves.
If you're enclosing one element inside another.
It's good practice to indent them like this so it's easier to read.
Now in the browser.
The title is shown in the tab at the top and it's also what you used to describe the page.
When you add a bookmark favourites the text we've got at the moment just contains letters from what
you might call the English alphabet.
However let's add a new paragraph containing some different characters.
For example in Spanish.
If we look at this in a browser instead of the text we wrote we get these strange unintelligible characters
by default an H timal document only understands characters in the English alphabet.
This is called the character set of a document.
However there are many more characters that we might want to use in a web page from languages from all
over the world.
To fix this we need to set the character set of our AITs to email document.
We do this in the head section by adding a metter element with the charset attribute sets to a value
of utf 8.
This is a character set that includes most characters from the vast majority of human written languages.
Even if you're only planning to have your website in English there's no reason not to set this.
And it can help avoid problems later on
with this set.
Now in the browser the accented characters appear as they should.
Finally in this lecture I just want to mention this Web site which is an excellent searchable reference.
If you need help with the various eight team elements and their attributes.