You are here: Re: Learn HTML and CSS « HTML « IT news, forums, messages
Re: Learn HTML and CSS

Posted by Harlan Messinger on 11/27/27 11:57

andreas.usenet@html.dk wrote:
>>> "HTML is tags - and nothing but tags. To learn HTML is to learn and use
>>> different tags."
>>>
>>> Nothing could be more wrong IMHO.
>>> This is where I gave up on your tutorial.
>>
>> I am sorry to hear that. Again, I don't want to make it too complicated
>> to start with. And I don't think there is anything wrong in that
>> formulation. The element is part of the tag, which is explained later
>> in the tutorial:
>>
>> "The basic part of a tag is called an element (for example the p in
>> <p>). Thus, a tag consists of either just an element (for example <p>),
>> or an element plus one or more attributes (for example <p
>> style="background-color:#ff0000;">). Simple as that."
>>
>
> You might actually be right on this one. I am sorry to admit :-)

He is. The name inside the tag isn't the element itself, but the name of
the element that the tag delimits. Some elements are inferred in a
document even without any tags to indicate their presence. The following
is a valid HTML document (minus the DOCTYPE):

<title>Good Morning</title>
<p>Have fun!</p>

A proper HTML agent will treat this as a document with an HTML element
containing a HEAD element and a BODY element. For all three of these
elements, both start *and* end tags are optional. (But please don't make
life difficult by omitting them. Leaving out optional tags can make code
harder to maintain.) Since the TITLE element belongs in the HEAD element
and the P element belongs in the BODY element, the agent correctly
inserts each of them where it belongs in its internal representation of
the document.

Also, any time you have a table without TBODY tags, a TBODY element is
imputed, and all the TR elements that aren't in a THEAD or TFOOT are
placed inside it.

Aside from that, I appreciate the desire to keep things simple, but it
can be a real pain to discuss code when people keep using the wrong
names for things--like when they call attributes "tags", as in "Your
images are missing ALT tags". When tags are tags but elements,
attributes, and document type declarations are also tags, it's hard to
be confident that what people have in mind corresponds to what they are
saying.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация