To create your pages in
HTML, you need to know how to structure a page in
HTML. Usually, the page structure follows the example below:
<html> <head> <title>Title of the Page</title> </head> <body> <!-- Content --> </body> </html>
<!DOCTYPE html>statement must always be the first to appear on an
HTMLpage and tell the browser which version of the language is being used. In this case, we are working with
</html>tags tell the web browser where the
HTMLcode starts and ends.
</head>tags contains information about the website, e.g. style, meta-tags, etc.
</title>tags tell the browser what the page title is. The title can be seen by identifying the tab in your internet browser. The text that is defined between these tags is also the text that is used as title by the search engines when they present the pages in the results of a search.
- Between the
</body>tags the page content is placed, which is what is displayed in the browser.
Changes in HTML5
Introduction of semantic tags
HTML contains both semantic and non-semantic tags.
Semantic tags are descriptive tags that can easily convey their meaning to both a browser and a developer. Examples of semantic tags are:
<article>, etc. These tags also help screenreaders which are used by the visually
Non-semantic tags are tags that convey nothing about what they contain. Examples of non-semantic tags are:
Instead of using the generic
<div> for every other container, use the semantic tags such as
<footer>. These tags help people using screenreaders to navigate the page, and so makes the content more accessible for those with visual impairments.