Jump to content
xisto Community
Sign in to follow this  
tiger1405241538

HTML Tags Ever wondered what a HTML tag was

Recommended Posts

Many people that i have met have mentioned HTML to me without really knowing what it really means. Because of this i thought that maybe it would be a good idea to compile a tutorial for everyone to read.

 

When i listen to people talking about HTML; they never seemed to know what a HTML tag was so that is what i will focus on here.

 

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

 

Some people who use HTML may notice that I place the tags below in the order they appear in a document.

Most people who use HTML know the tags which no HTML document can do without. Those are:

 

<html> = this is the tag which every HTML document must start with.

<head> = this contains primarily the TITLE tag and the META tag.

<title></title> = this contains the title of the page; it is displayed in the bar at the top which contains the name of your ISP and the minimize, restore and close icons.

</head> = this closes off the tag containing TITLE and META tags.

<body> = this tag indicates the beginning of the main body of text.

 

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

 

Now follows tags which can be found anywhere after the BODY tag:

 

<font color="your color here"></font color> = this indicates that the following text will be the color you stated; you can state it using a hexadecimal code or a RGB code.

<font size="your font size here"></font size> = this indicates that the folloing text will be the size that you stated.

<font face="your font style here"></font face> = this indicates that the text between the tags will be of the style you stated (eg. Arial).

<p align="left,center or right"></p align> = this indicates that any text between the tags will be positioned in that specific spot on the line.

<p></p> = any text between the tags will be placed in a paragraph. There will be 1 line space between the paragraph and the next line or image.

<img src="location of your image"> = this tag tells the browser to collect an imagefrom a location and place it in that position on the page.

<a href="your link here"></a> = this tag tells the browser that if the text between the tags is clicked then link to the stated web address. (the address must start with "http://forums.xisto.com/;)

<b></b> = this tag tells the browser to in effect double or even triple the width of the letters transforming BOLD to BOLD.

<i></i> = this tag tells the browser to italicise the text between the tags which means it sort of leans in one direction for example ITALIC becomes ITALICS.

<u></u> = this tag tells the browser to underline all text between the tags with a solid line.

<table></table> = this tag tells the browser that a table will be made within them (tags will follow).

<tr></tr> = this tag tells the browser that a row of a table is between the tags.

<td><td> = this tag is placed between the <tr> tags; this tells the browser to add one column to the table.

 

This now shows all of the tags you need to create the main body of your webpages.

 

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

 

To close off your script you need 2 tags and those are:

 

</body> = this tells the browser that the main body of text has now ended.

</html> = this tag tells the browser that the document has now finished.

 

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

 

I hope this gives people the basic understanding of HTML tags that can be essential to creating your first web page.

 

Good luck with your HTML scripting.

Share this post


Link to post
Share on other sites

First of all, that tutorial is partially all wrong!

<font color="your color here"></font color> = this indicates that the following text will be the color you stated; you can state it using a hexadecimal code or a RGB code.<font size="your font size here"></font size> = this indicates that the folloing text will be the size that you stated.
<font face="your font style here"></font face> = this indicates that the text between the tags will be of the style you stated (eg. Arial).
<p align="left,center or right"></p align> = this indicates that any text between the tags will be positioned in that specific spot on the line.


We do not use <font> anymore, we use something called CSS, or cascading style sheets. <font> is depreciated and is not valid in (X)HTML Strict.
</p align> ??? We do not end attributes, just the element.

<a href="your link here"></a> = this tag tells the browser that if the text between the tags is clicked then link to the stated web address. (the address must start with "http://forums.xisto.com/;)

No, the address doesn't have to start with http:// if it is an internal link, an FTP server, a NEWS server, TELNET protocol or email link (mailto:)

<b></b> = this tag tells the browser to in effect double or even triple the width of the letters transforming BOLD to BOLD.<i></i> = this tag tells the browser to italicise the text between the tags which means it sort of leans in one direction for example ITALIC becomes ITALICS.
<u></u> = this tag tells the browser to underline all text between the tags with a solid line.


<u> is depreciated. Also, CSS is suitable for achieving the results of <b> and <i>. They will be depreciated in XHTML 2.
For semantically stronger and emphasized words/phrases/paragraphs, use <strong> and <em>. Again, this is for SEMANTIC purposes only!

Stop living in the HTML 3.2 era and upgrade to XHTML 1.0. Browsers will thank you.

Share this post


Link to post
Share on other sites

im a little stuck, would you be able to assist me in creating a table that is centered and is 100x200 pixels.. i dont understand how to set the height. When i did it the page was all over the show and well, it really didnt work. Also within that table im trying a photo of myself and some friends.

Share this post


Link to post
Share on other sites

im a little stuck, would you be able to assist me in creating a table that is centered and is 100x200 pixels.. i dont understand how to set the height. When i did it the page was all over the show and well, it really didnt work. Also within that table im trying a photo of myself and some friends.

<div id="table">data</div>
#table { text-align: center;
min-height: 100px;
min-width: 100px;
}

Add extra rules like percentages if you want. If that doesn't work.. go ask someone who knows more than me :rolleyes:

Share this post


Link to post
Share on other sites

First things first, 'tables' are made for data, not for designing or structuring websites ... you'll need div's as toby already suggested.
If you realy want a 100x200 div to place the image in (eg. if you want a border around it, then you'll need something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/;	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	<title>Blablabla</title></head><body><div style="width: 100%; text-align: center;">	<div style="width: 200px; height: 100px; text-align: center; border: 1px solid #999;">		<img src="ze_image.png" alt="thiz is an image" />	</div></div></body></html>



Otherwhise, this will do the same (this actualy just centers the image).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://forums.xisto.com/no_longer_exists/;	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	<title>Blablabla</title></head><body><div style="width: 100%; text-align: center;">		<img src="ze_image.png" alt="a smiley" /></div></body></html>

Edited by wutske (see edit history)

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
Sign in to follow this  

×
×
  • 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.