Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: stripes1776

It works on this board, but I’ve had to close the img tag on some others. But it is interesting that in all the HTML books and websites I’ve read, none of them mentioned that the img tag can work without closing it. Thanks.


130 posted on 12/26/2008 5:46:11 AM PST by sig226 (1/21/12 . . . He's not my president . . . Impeach Obama . . . whatever)
[ Post Reply | Private Reply | To 129 | View Replies ]


To: sig226
It works on this board, but I’ve had to close the img tag on some others. But it is interesting that in all the HTML books and websites I’ve read, none of them mentioned that the img tag can work without closing it. Thanks.

Here is the specification from the World Wide Web Consortium (W3C) on the image tag:

The img element is a void element. An img element must have a start tag but must not have an end tag.
The World Wide Web Consortium is the organization that develops the web standards. The director of W3C is Tim Berners-Lee who invented of the World Wide Web.

Newbies are always asking how to post images. This is difficult for them. Putting a closing tag for the image tag just complicates things unnecessarily for them. Besides, a closing image tag is just plain a mistake.

Also the quoting is wrong in the example on FR. As is, the quotes are around the attributes. Instead the pair of quotes needs to surround only the value of the attribute after the = sign. Here is the sample on FR:

"height=218""width=285"
The opening quote of each pair of quotes needs to be moved to just after the = sign as in the following:
height="218" width="285"
I think the the least FR could do is give newbies the correct web standard and syntax of HTML.
131 posted on 12/26/2008 1:15:03 PM PST by stripes1776 ("That if gold rust, what shall iron do?" --Chaucer)
[ Post Reply | Private Reply | To 130 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson