Jump to content
xisto Community
vicky99

A First Peep Into Html

Recommended Posts

Dear friends
HTML is the building block of any web page. Without it no pages can be written though there are some exceptions. Even you got to have some knowledge of HTML to write dynamic web applications. An HTML file is a text file containing small markup tags
The markup tags tell the Web browser how to display the page
An HTML file must have an htm or html file extension
An HTML file can be created using a simple text editor
HTML is acronym of Hyper Text Markup Language. This time I will discuss about HTML tags.
Dear friends
HTML is the building block of any web page. Without it no pages can be written though there are some exceptions. Even you got to have some knowledge of HTML to write dynamic web applications. An HTML file is a text file containing small markup tags.
The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor.
Do You Want to Try It?
If you are running Windows, start Notepad.

Type in the following text:
<html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>

Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.

Thing or two about HTML Tags:-

HTML tags are used to mark-up HTML elements
HTML tags are surrounded by the two characters < and >
The surrounding characters are called angle brackets
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
The text between the start and end tags is the element content
HTML tags are not case sensitive, <b> means the same as <B>

--------------------------------------------------------------------------------

HTML Elements
Remember the HTML example from the previous page:

<html> <head> <title>Title of page</title> </head> <body> This is my first page. <b>This text is written in bold letters</b> </body> </html> 
This is an HTML element:

<b>This text is bold</b>
The HTML element starts with a start tag: <b>
The content of the HTML element is: This text is bold
The HTML element ends with an end tag: </b>

The purpose of the <b> tag is to define an HTML element that should be displayed as bold.

This is also an HTML element:
<body> This is my first homepage. <b>This text is bold</b> </body>
This HTML element starts with the start tag <body>, and ends with the end tag </body>.

The purpose of the <body> tag is to define the HTML element that contains the body of the HTML document.


Tag Attributes
Tags can have attributes. Attributes can provide additional information about the HTML elements on your page.
This tag defines the body element of your HTML page: <body>. With an added bgcolor attribute, you can tell the browser that the background color of your page should be red, like this: <body bgcolor="red">.

This tag defines an HTML table: <table>. With an added border attribute, you can tell the browser that the table should have no borders: <table border="0">

Attributes always come in name/value pairs like this: name="value".

Attributes are always added to the start tag of an HTML element.


--------------------------------------------------------------------------------

Quote Styles, "red" or 'red'?
Attribute values should always be enclosed in quotes. Double style quotes are the most common, but single style quotes are also allowed.

In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes:

name='Vicky "cricket" Ray'
Edited by vicky99 (see edit history)

Share this post


Link to post
Share on other sites

Some of that information is basically from w3schools.com, you might want to mention this or basically re-write it in your own words or staff here won't be too happy with you :unsure:

Share this post


Link to post
Share on other sites

I wouldn't have known unless my misses pointed it out to me but it's only little bits that are actually taken from there, not the entire post content so it should be ok I guess?

Share this post


Link to post
Share on other sites

Thanks for the tutorial vikki, but have you tried building a web site yourself using the tutorial you have posted? While it is possible to use notepad, the html is going to suck big time. I think if people are going to start coding for the first time, then they should visit some simple pages online using Netscape or SeaMonkey and look at the page source and the page info. Then they can open the page in Composer and look at the page in normal view, the page in tag view and the page in code view, make some changes and then see how the code changes.

If you want a better html editor, then try Nvu here

Share this post


Link to post
Share on other sites

I personally use Notepad, always have, or just a slightly better one that has Syntax highlighting. w3schools is a great place for reference if you ever forget stuff about HTML/CSS/Jscript etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.