The HEAD section of an HTML document contains meta-data, or data that describes the document. Mostly, it's there for the use of search engines and browsers. HEAD sections also frequently contain Style information, that makes the HTML have a certain look, and Javascripts that are used in the page. Much of the data in the HEAD section is really just links to other data elsewhere on the web. (Like CSS and JS files.)
The basic HTML base to a HTML website is <HTML> <title> </title> <head> </head> <body> </body> </HTML>
<html> <head> <script type="text/javascript"> function show_alert() { alert("I am an alert box!"); } </script> </head> <body> <input type="button" onclick="show_alert()" value="Show alert box" /> </body> </html>
<html> <head> <title></title> </head> <body> </body> </html>
< html > < head > </ head > < body > </ body > </ html > Without spaces.
The function of HTML as a scripting language is limited to it's design. All the design developed can be viewed by HTML.
HTML head title /title meta style /style /head body /body /HTML
The only HTML element that is required in the HEAD section of an HTML document (according to the W3C specifications for HTML 4, HTML 5 and XHTML) is the TITLE element.
The <head> tag in an HTML document is used to hold data that describes the rest of the document. For instance, the title of the document that shows up in search engines and the users browser is placed in the HEAD section. The HEAD also contains things like styles, which describe what the document should look like in the browser, and scripts, which effect the function of the page.
The function of HTML is to create a layout in Web page. It constructs the design of the page smoothly.
Here's the code: <html> <head> <script type="text/javascript"> function callMe() { alert("Alert Box is called on body load"); } </script> </head> <body onload="javascript:callMe()"> <h1 align="center">Content here</h1> </body> </html>
<html> <head> <title> <body>
The <body></body> tag defines the body of an HTML document. Here is the minimum format needed for a basic HTML page. <html> <head> <title>Title</title> </head> <body> Stuff goes here... </body> </html>