Create Your Very First HTML Web Page.
Creating good HTML
All
the web pages are structured in a logical order. So if you want to
create a good Web page you have to place certain html elements in
certain order in the html document. If you create html document
according to this order. Any web browser can display your content
easily.
Common HTML Elements
1. <a> - This element is called Anchor and it'll creates a link to another page or a section of the same document.
2. <br> - This element is called Line break and it enters a line break or return character.
3.
<div> - This element is A section of a page and it'll creates
overall areas or logical division on a page, such as a heading/ menu
section, a content area, or a footer.
4. <h1> through <h6> - This element is Heading and it creates a container for a heading, such as heading text.
5. <hr> - This element is Hard rule and it creates a horizontal line.
6. <img> - This element is Image and it is a container for an image.
7. <input> - This is Input element it's an element to accept user input.
8.
<link> - This is Resource link element which links to a resource
for the page; not to be confused with an anchor element.
9. <p> - This element is A paragraph in a page which creates textural paragraphs or other areas and containers for text.
10.
<script> - This element is A script tag which denotes a web
script or program. Also frequently found in the head section.
11.
<span> - This element is called Span which creates a container
for an element. Frequently used in conjunction with styling information.
Creating Your First HTML Page
You can create HTML with any text editor. Their are lot of text editors our there.
If your OS is Windows then you can use a program like Notepad.
If your OS is Linux based OS then you can use VI or VIM editor or Gedit Text editor .
If your OS is Mac you can use a program like TextEdit.
Or there are many more text editors if you want.
To create a web HTML web page,
1. Open your text editor.
2. Enter the following HTML code in the text editor.
<!doctype html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>First Header</h1>
<p>A Paragraph goes here</p>
</body>
</html>
3. Save this document as firstwebpage.html.
This .html extension is important. If you save it in another extension like .txt the web page can not display your web page.
Save anywhere you want in your hard drive or in your server.
4. Open your web browser and give the location url as the web page url
the out put will be like this.
so this is the basic structure of an html document we'll talk about more in html in future.
No comments