HTML Get Started

What You Need You need ,a HTML editor(Notepad,html pad etc.)
1 Create an HTML file
  1. An HTML file is simply a text file saved with an .html or .htm extension (i.e. Index.html or .htm as .test)
  2. Open your text editor (Notepad if you're using Windows or TextEdit if you're using a Mac). You could use a specialized HTML editor such as DreamWeaver or htmpad if.
  3. Create a new file
  4. Save the file as html(Started.html)





2 Type some HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>HTML Tutorial Example</title>
</head>
<!-- Start body of the wesite-->
<body>
<p>this is my first Html page </p>
</body>
<!-- End body of the wesite-->
</html>
Explanation of the above code:
  1.  The <!DOCTYPE....> element tells the browser which version of HTML the document is using.
  2. The <html> element can be thought of as a container that all other tags sit inside
  3. The <head> tag contains information that is not normally viewable within your browser (such as meta tags, JavaScript and CSS), although the <title> tag is an exception to this. The content of the <title> tag is displayed in the browser's title bar (right at the very top of the browser).
  4. The <body> tag is the main area for your content. This is where most of your code (and viewable elements) will go.
  5. The <p> stag declares a paragraph. This contains the body text.
  6. The <!-- Start body of the wesite--> The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.

0 comments:

Post a Comment