05 Jun Creating HTML Document
HTML document has the head and body part. In the head, add the documentās information and in the body, add the content.
An HTML document/ web page begins with the following declaration,
1 2 3 |
<!DOCTYPE html> |
The head part comes under,
1 2 3 |
<head></head> |
The body part comes under,
1 2 3 |
<body></body> |
The following is an example of an HTML document,
Code
1 2 3 4 5 6 7 8 9 10 11 12 |
<!DOCTYPE html> <html> <head> <title>First HTML Document</title> </head> <body> <p>Add content here.</p> <p>Learning examples from Studyopedia website</p> </body> </html> |
Output
In the above example, we have used the paragraph tag to add content under the <body></body> content.
More Examples
- Create Headings on an HTML web page
- Creating Paragraphs in HTML Web Page
- Page links in an HTML Web Page
- Inserting Image in HTML
- Add Title in an HTML web page
- How to create horizontal line in HTML Page
- The href attribute in HTML Page
- Image height and width attribute in HTML
- Inserting Hyperlinks on an HTML web page?
- Why head tag is used in HTML?
No Comments