Thursday 13 April 2017

Basic HTML5 Page(Document)

HTML is the standard language used to construct pages on the World Wide Web. we will not spend much time on HTML, but it does from the basis of <convas> so we cannot skip it entirely.

A basic HTML page is divided into sections, commnly <head> and <body>. the new HTML% specification adds a few new sections, such as <nav>, <article>, <header>, and <footer>.
The <head> tag usually contains information that will be used by the HTML <body> tags to create the HTML page. It is a standard convention to put JavaScript functions in the <head>.


For Example: A Basic HTML Page.

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Basic html5 document</title>
</head>
<body>
Hello World !!!
</body>
</html>

The browser view of above Document


In this Document <!doctype html>
This tag informs the web browser to render the page in standards mode. According to the HTML5 spec from W3C, this is required for HTML5 documents. This should always be the first line of HTML in a document.

<html lang="en">

This is the <html> tag with the language referenced: for example, "en' =English.

<meta charset="UTF-8">

This tag tells the web browser which character-encoding method to use for the page. Unless you know what you're doing there is no need to change it. This is a required element for HTML5 pages.

<title>.....</title>

This is the title that will be displayed in the browser window for the HTML page. This is a very important tag. because it is one of the main pieces of information a search engine uses to catalog the content on the HTML page.

No comments:

Post a Comment