Monday 18 February 2013

HTML Beginner Tutorial

The thing to keep in mind is that HTML and CSS are all about separating the content (HTML) and the presentation (CSS)
The basic structure of an HTML document:
<html><body>                 This is My first Web Page</body></html>
Now create a folder called 'html' in your C drive (or anywhere else you fancy) and save the file as "myfirstpage.html". It is important that the extension ".html"
Page Titles:
<html><head>              <title>My First Web Page</title></head><body>                 This is My first Web Page</body></html>
We have added two new elements here, that start with the head tag and the title tag (and see how both of these close).
Paragraphs:
<html><head>              <title>My First Web Page</title></head><body>                 Hai Friends                 This is My first Web Page</body></html>

You might have expected your document to appear as you typed it, on two lines, but instead you should see something like:
Hai Friends This is My first Web Page

If you want text to appear on different lines, you need to explicitly state that.Change your two lines of content so that they look like this:                 <p>Hai Friends</p>                <p>This is My first Web Page</p>
The p tag is for paragraph.
Emphasis:
You can emphasise text in a paragraph using em (emphasis) and strong (strong emphasis). These are two ways of doing pretty much the same thing, although traditionally, browsers display em in italics and strong in bold.
                     <p> This <em>is</em> My <strong>first</strong> Web Page</p>
Line breaks:
                Hai Friends<br />                This is My first Web Page



x