Question

Get Help With All Aspects of Web Design & Design Software

Moderators: Moderator, Global Moderator

Post Reply
Josh
Hero Member
Hero Member
Posts: 4627
Joined: Fri Jun 04, 2004 2:54 pm

Question

Post by Josh »

Okay, I\'ve been looking at a lot of code our site coders have been making and I\'m very curious if I\'ve always done my HTML wrong.

[code]<img src="http://www.site.com/my_image.jpg" alt="My Image" title="My Image">[/code]

This is what I would use if I were putting an image on my site yet on our site coder\'s coding they don\'t use the normal [b]>[/b] to close a tag -- they use [b] />[/b]

Example:

[code]<img src="http://www.site.com/my_image.jpg" alt="My Image" title="My Image" />[/code]

Is this proper to do?

Thanks in advance
~Josh /sp_ike.gif\' class=\'bbc_emoticon\' alt=\'(spike)\' />
[align=center]

Image

“If you stop learning, you stop living.” ~Tami Quiring

“It's the rare man who understands the value of a single perfect rose.”

[/align]
ner0
Hero Member
Hero Member
Posts: 982
Joined: Sat May 22, 2004 4:45 pm

Question

Post by ner0 »

yours would be valid html, the reason for the \" />\" is that the code is xhtml...

the img tag is an \"empty\" tag, meaning it has no need for a , and in order to ensure validity in xhtml you\'ll need to close the tag, hence the \" />\"

it\'s also the same with the html
, in xhtml this would be
(empty tag)

hope it helps
Last edited by ner0 on Wed Jan 19, 2005 6:19 pm, edited 1 time in total.
[color=\"green\"]'class KPIM::ProcessManager' only defines private constructors and has no friends[/color] <- :( poor class



[18:09:00] * ~Moppy stews ner0 erotically 1 times.
Josh
Hero Member
Hero Member
Posts: 4627
Joined: Fri Jun 04, 2004 2:54 pm

Question

Post by Josh »

Thanks ner0 /smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
[align=center]

Image

“If you stop learning, you stop living.” ~Tami Quiring

“It's the rare man who understands the value of a single perfect rose.”

[/align]
Post Reply

Return to “Web Design Principles”