HTML 5 Programming and Web development/Head and Body Elements
The HTML element
editthe HTML element is the root element of a document.Every other element in the document must be inside the HTML element. the HTML element is divided into two main elements. the head and body elements
The HTML head Element
editThe HTML head element is where content not visible on the page is stored these include:
- HTML title element
- HTML meta element
- HTML link element
- HTML style element
and lots more.
The HTML title element
editThe HTML title element is used to specify the title of the document.The syntax for the title element is:
<title>Document title</title>
HTML meta Element
editThe meta element is an example of an empty element it usually contain two attributes name and content. For example if I wanted to store the following in a meta tag
Author:WikiGuy
Then we would write the following:
<meta name="Author" content="WikiGuy"/>
The meta element can also contain other attributes such as charset and http-equiv that we will learn about subsequently
The HTML body element
editThe HTML body element is where every element visible to the user is kept.These include paragraphs,tables and other page content.
HTML 5 tables and Paragraphs
editHTML 5 tables can be used in many ways, the most obvious of which is to order data. Tables are used in many webpages for many other reasons that are not very obvious.
<body>
<table border="1">
<tr>
<td>Name</td>
<td>Business</td>
</tr>
<tr>
<td>John Doe</td>
<td>OrgoCo</td>
</tr>
<tr>
<td>Mary Jane</td>
<td>Simple inc</td>
</tr>
</table>
</body>
The above was an example code for an HTML 5 table.and the following would be what it looks like.
Name | Business |
John Doe | OrgoCo |
Mary Jane | Simple inc |
HTML 5 paragraphs are used for writing a group of sentences together in paragraph form.The output would look like any normal paragraph.
Other Elements
editThere are many elements that are used in HTML 5 this includes:
- hyperlink
- images
- textbox
- button
- marquee
- span
- div
- section
- canvas
- video
- audio
N.B:Even though audio is not a visual element it most be included in the body.