Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
HTML tag questions please
Old 11-21-2008, 08:26 AM HTML tag questions please
Super Talker

Posts: 132
Trades: 0
Hello all, I am new here, I am now starting to learn web designing and I am leraning from the w3schools tutorials, I was told that I can questions here? If so, my first 2 questions are:

1] Regarding <body> tags, I am noticing that using this tag does not make difference so why use it?

2] HTML Comments? This what the tutorial says:

Quote:
Comments can be inserted in the HTML code to make it more readable and understandable. Comments are ignored by the browser and not displayed.
I don't understand and see no difference if this is used or not?

Help please?
mikehende is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-21-2008, 08:35 AM Re: HTML tag questions please
Experienced Talker

Posts: 32
Trades: 0
BODY: The body tag is there to indicate the main section of your page. In other word anything that is visible to the user (content wise) goes between <body> and </body>. If you want your pages to be valid you have to use it. Why validate? Well, that's another discussion.

HTML Comments: Say you have a page with approx 1000 lines of code. Content boxes, menus, sub menus, some other content. When you write the code you just know what you are doing. Try though opening the same page after 3 or 6 months. Will you be able to tell what is going on? Which part of your code does what? So, comments are here to help you as a coder.

Even if you have to pass this page to another coder, there's no way for him to know what is going on. Well, the most experienced could tell in a minute, but why not give them an easy time by providing some comments for each section of your code?
__________________

Please login or register to view this content. Registration is FREE
Professional PSD to XHTML coding services
tsiger is offline
Reply With Quote
View Public Profile
 
Old 11-21-2008, 09:22 AM Re: HTML tag questions please
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Besides the fact that the <body> tag is required in order for the page to validate, it is a very useful element that serves as a parent to all other elements. The body can have its own style rules applied to it (and nearly always does), which range from font-size, to line-height, to a background, etc. Since font-size, if done proportionally, is inherited by children elements, styling the body like this is a good way to give uniformity to the document.

Also, the body is sometimes used for onload events for JavaScript. Functions can be placed on it that affect the document in a special way, since it is the parent to all of the content.

So, although it is technically possible to not include the body in a document, when it comes to doing anything significant, it is silly to leave it out. Therefore, it is best practice to never do so.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 11-21-2008, 09:25 AM Re: HTML tag questions please
Experienced Talker

Posts: 32
Trades: 0
Good points wayfarer07
__________________

Please login or register to view this content. Registration is FREE
Professional PSD to XHTML coding services
tsiger is offline
Reply With Quote
View Public Profile
 
Old 11-21-2008, 10:35 AM Re: HTML tag questions please
aldor's Avatar
Ultra Talker

Posts: 479
Name: Alan
Location: Lincoln(UK)
Trades: 0
Two great posts by tsiger and wayfarer07.
aldor is offline
Reply With Quote
View Public Profile
 
Old 11-24-2008, 05:54 PM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
Sorry I did not get the email notif for these posts guys but THANKS for the explanations, I will be posting more and more questions as I go along, appreciate it.
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 07:04 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
This, I am not getting:

Quote:
Non-breaking Space

The most common character entity in HTML is the non-breaking space.
Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add lots of spaces to your text, use the &nbsp; character entity.
What does it mean "if you write 10 spaces of text?"
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 07:14 AM Re: HTML tag questions please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
press the space bar 10 times
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2008, 07:21 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
Still don't understand, if I press the space bar 10 times between any 2 words, I don't see anything changing? Can I have a real example of this please?
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 07:24 AM Re: HTML tag questions please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
That's because:-
Quote:
If you write 10 spaces in your text HTML will remove 9 of them
Though strictly it doesn't remove them, simply ignores them.
look in the source code you'll find 10 (or more) spaces
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2008, 07:47 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
Ok thanks, got that now this last part:

Quote:
To add lots of spaces to your text, use the &nbsp; character entity.
first why would you want to "add lots of spaces to your text"? Can you give me an example please?

Last edited by mikehende; 11-26-2008 at 07:56 AM..
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 07:57 AM Re: HTML tag questions please
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Usually you want to avoid using a bunch of &nbsp; to add space, as it is typically better to use margins or padding instead. However, if you're being lazy, you could space out all sorts of things, from items in a navigation, to pretend "tabs" at the beginning of sentences, etc.

One other common use of a &nbsp; is to stop a table cell from breaking a line automatically (by using it instead of a regular space, so that the block of text is treated by the browser as a single word).
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 11-26-2008 at 07:59 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 11-26-2008, 08:14 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
Let me see if I get this, so the text space we are talking about is simply empty space in a line of text? Sort of like when you start a paragraph you would usually start writing maybe an inch or so away from the left margin of the page? If this is correct, what would I have to type to do this please?
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-26-2008, 08:20 AM Re: HTML tag questions please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Formatting basically

eg:
with response
.write "<input type="
.write chr(34)
.write "hidden"
.write chr(34)
.write " name="
.write chr(34)
.write "error"
.write chr(34)
.write " value="
.write chr(34)
.write strErrorURL
.write chr(34)
.write g_sTagEnd
.write vbcrlf
.write "<input type="
.write chr(34)
.write "hidden"
.write chr(34)
.write " name="
.write chr(34)
.write "refer"
.write chr(34)
.write " value="
.write chr(34)
.write strReferURL
.write chr(34)
.write g_sTagEnd
.write vbcrlf
end with

Should look like this:-
HTML Code:
 	with response
		.write "<input type="
		.write chr(34)
		.write "hidden"
		.write chr(34)
		.write " name="
		.write chr(34)
		.write "error"
		.write chr(34)
		.write " value="
		.write chr(34)
		.write strErrorURL
		.write chr(34)
		.write g_sTagEnd
		.write vbcrlf
		.write "<input type="
		.write chr(34)
		.write "hidden"
		.write chr(34)
		.write " name="
		.write chr(34)
		.write "refer"
		.write chr(34)
		.write " value="
		.write chr(34)
		.write strReferURL
		.write chr(34)
		.write g_sTagEnd
		.write vbcrlf	
	end with
Or you may want a wide gap for effect;

As I said to the other day

Code:
As I said to                        the other day
or;

you might want it to look like you are speaking slowly

Code:
you     might    want    it      to      look     like      you     are       speaking      slowly
You can of course use various html elements to handle this but for a one off situation it may be complete overkill. So for a double/triple spaced sentence, you use one space plus one or two nbsp entities.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2008, 08:31 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
GOT IT!! Thanks!!
mikehende is offline
Reply With Quote
View Public Profile
 
Old 11-27-2008, 12:28 PM Re: HTML tag questions please
Novice Talker

Posts: 12
Trades: 0
If you want to these type of coding you can use <pre> tage for this purpose and when you want to end this then close </pre> tage. The results will be the same as it shown in note pad. For example
I am
learning
HTHL.
HTML Stands
for
Hypyer
Text
Markup
Language.

The results will be show as it you see.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
ish221100 is offline
Reply With Quote
View Public Profile
 
Old 12-23-2008, 09:30 AM Re: HTML tag questions please
Super Talker

Posts: 132
Trades: 0
The underneath is taken from the tutorial, what I don't understand is , how do you edit any of those 3 pages please? It says to use Notepad as the editor but I don't understand how to link what I write in notepad to any of the 3 pages?



Quote:
Creating Your Own Test Web

If you just want to learn HTML, skip the rest of this chapter.
If you want to create a test web on your own computer, just copy the 3 files below to your desktop.
(Right click on each link, and select "save target as" or "save link as")
mainpage.htm
page1.htm
page2.htm
After you have copied the files, you can double-click on the file called "mainpage.htm" and see your first web site in action.

Last edited by mikehende; 12-23-2008 at 09:32 AM..
mikehende is offline
Reply With Quote
View Public Profile
 
Old 12-23-2008, 10:56 AM Re: HTML tag questions please
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
First you have to save the file:






And then you have to open it in notepad (Not Word it uses the wrong formatting/quotes).



Enjoy!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


Last edited by Decaf; 12-24-2008 at 01:13 PM..
Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 12-23-2008, 11:08 AM Re: HTML tag questions please
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 9,007
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
When you open the page in Notepad, it shows the source code. That's what you make changes to. For instance, copy and paste the two links on the mainpage in the source code and save the file. Now open the file from your desktop (which will open it from your default browser) and note that there are now four links displayed, the original two and the two you copied.

Saving a template works much the same way. You save the page as "Web page, complete" which also saves the images and other files the page uses to display. You can edit all of these with Notepad (well, except the images, of course).

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 12-23-2008, 04:16 PM Re: HTML tag questions please
Defies a Status

Posts: 1,606
Trades: 0
Allow me to try this one. If you open the mainpage file used above in notepad, you will see this:
Quote:
<html>
<body>
<h1>This is my Main Page</h1>
<p>This is some text.</p>
<p><a href="page1.htm">This is a link to Page 1</a></p>
<p><a href="page2.htm">This is a link to Page 2</a></p>
<p>&nbsp;</p>
<h1>&nbsp;</h1>
</body>
</html>
You can then edit any of the content between the <h1> </h1> or the <p> </p> tags, save the page and have something entirely different shown on the page.

Html is nothing more than text and images enclosed between tags to format it for a browser.

I also suggest you download notepad2 or other free text editor than use line numbers. That feature will help other help you when you hit a snag. It also will help you find your mistakes because of the syntax highlighting feature.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HTML tag questions please

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.74217 seconds with 12 queries