Sunday, July 10, 2011

Minimal HTML Document

An HTML document has two main parts:
  1. head. The head element contains title and meta data of a web document.
  2. body. The body element contains the information that you want to display on a web page.

This is the minimum that a HTML 4 document should contain: all of these are important so our web page will be pretty cool and organize.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
</body>
</html>

Remember the syntax only controls the presentation or structure of a web page. The most fundamental piece of building block of HTML is the elements.
Elements of structure of a document functions:
html= indicates that this webpage is written in HTML
head= contains the information about web
body= it contains the content of the web page
title= contains the web page title
p= element defines a paragraph
h1= level one in heading
br= element forcibly (ends) the corner line of the text, line break


Examples of elements of structure of a document
head
body
p
      Examples of elements as tags
<head>
<body>
<p>

Tags= always in pairs


No comments:

Post a Comment