The body tag contains the content which is visible within the content area of your web browser.
It contains things like text hyperlinks images tables lists and any other visible elements.
In our example we've included two items in our about body tag.
The first is just basic text since we've not defined the location or any other attributes of this text.
It will be displayed at the top left corner of our web browser.
We also haven't specified the font face but if you recall we did specify the default font color is red
in our cascading style sheet.
In a moment we'll preview this document in our web browser and you'll see exactly how it looks
after the basic text content.
We have a form element the text field we won't be covering form elements just yet but this example demonstrates
how we call a javascript function named my function to convert the input text from lowercase to capitals
if you recall the javascript function was located in our head take we're now calling that function in
the body take
Let's preview the file again so we can see how this all comes together in our web browser
we can see that the text that was contained in our body tags is displayed here as it should be.
The color is red and it's located at the top left corner of the content area by default.
Next we have our javascript function to see how it works.
Type your name into the text field in lowercase letters and click anywhere on the screen to activate
the script
you'll see the name in the text field converts from lowercase to uppercase format
and that's it.
Once we've closed the body tag all that remains is our closing H2 email tag to complete the entire HDMI
document.
This is the basic structure of an HDL page.