|
-
Jun 27th, 2002, 10:57 AM
#1
Thread Starter
Frenzied Member
(html?) When to use " />" **Resolved**
I cannot remember where I read about self closing tags.
But when do you use them? Is it going to be the new standard? Is it a good idea that I start using it?
Thanks
Michael
Last edited by msimmons; Jun 27th, 2002 at 01:03 PM.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 27th, 2002, 11:01 AM
#2
Frenzied Member
Use that only if you use XHTML or XML. You can use it like <br></br> too but <br /> is better for backward compatibility. XHTML is the newest web standard, you should try to use it, it's not really hard, it's just that you have to be stricter with your coding and break some old bad habbits . Start with transitional and then move to strict if you are interested.
-
Jun 27th, 2002, 11:02 AM
#3
Black Cat
This is the XML/XHTML standard - all tags must close, unlike HTML where some are optional.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 27th, 2002, 11:25 AM
#4
Thread Starter
Frenzied Member
OK thanks, I don't even know what XML is (Just haven't had the time to read about it) I know it has something to do w/custom tags. So I won't bother with it for now because all I do is asp pages.
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 27th, 2002, 11:28 AM
#5
if there is nothing you need between an open and closing tag..you just self close the open tag. Like for intance a hr or br...why waste space typing
<br></br>? its a waste.
Its also appropriate for input tags. Like a button
<input type="button"/>
-
Jun 27th, 2002, 11:30 AM
#6
Thread Starter
Frenzied Member
but not in html only xml/xhtml correct?
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 27th, 2002, 11:37 AM
#7
use it anywhere...any browser is going to catch it correctly.
<br></br> and <br/> will do the same thing and any browser regardles wether you define the document as xhtml or not.
-
Jun 27th, 2002, 12:05 PM
#8
Frenzied Member
That's true but it won't validate if you use /> and you're not using XHTML/XML.
-
Jun 27th, 2002, 03:26 PM
#9
Hyperactive Member
note
according to elizabeth castro from peachpit press
xhtml is a transition language betwenn html and xml
xml is to be the next true standard and shtml is but a tool to facilitate the transition
i wonder if this is true?
bsw1212
-
Jun 27th, 2002, 03:41 PM
#10
no that is not true and wouldnt make any sense. XML is is just a standard to describe data. xhtml is a markup language that uses the xml structure standard using very specific tags and attributes.
-
Jun 28th, 2002, 10:56 AM
#11
Black Cat
XML + CSS will probably replace HTML eventually. Once CSS is well-defined (CSS3 columns instead of HTML tables for layout) and supported (will take a while), there really is no use for HTML.
Code:
<div class="menubar">
<div class="meniitem">Code</div>
<div class="meniitem">Code</div>
<div class="meniitem"><span class="important">Code</span></div>
</div>
Code:
<menubar>
<menuitem>Code</menuitem>
<menuitem>Code</menuitem>
<menuitem><important>Code</important></menuitem>
</menubar>
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 28th, 2002, 12:13 PM
#12
Thats right..forgot about CSS3. And I guess XForms will replace the regualr old <form> tags some day
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|