HTML Document Structure
An HTML document starts and ends with <html> and >/html> tags. These tags tell the browser that the entire document is composed in HTML. Inside these two tags, the document is split into two sections:
- The <head>…</head> elements, which contain information about the document such as title of the document, author of the document etc. Information inside this tag does not display outside.
- The <body>…</body> elements, which contain the real content of the document that you see on your screen.
Creating HTML Document:
For creating HTML Document you have to do following steps:
- Open Notepad or another text editor or other IDE.
- At the top of the page type <html>.
- On the next line, indent five spaces and now add the opening header tag: <head>.
- On the next line, indent ten spaces and type <title> </title>.
- Go to the next line, indent five spaces from the margin and insert the closing header tag: </head>.
- Five spaces in from the margin on the next line, type<body>.
- Now drop down another line and type the closing tag right below its mate: </body>.
- Finally, go to the next line and type </html>.
- In the File menu, choose Save As.
- In the Save as Type option box, choose All Files.
- Name the file template.htm.
- Click Save.
You have basic HTML document now, to see some result put the following code in title and body tags.
<title>My First HTML Document </title>
<h1> My First HTML Document Heading</h1>
<p> My First HTML Document Are Ready. </p>
This way you can create HTML document.