<div class="position"> and <div class" section">

  • Thread starter Luigi Donatello Asero
  • Start date
J

Jonathan N. Little

Luigi said:
"Jonathan N. Little" <[email protected]> skrev i meddelandet


Sorry, but I think you are wrong.

I may not be alone in my opinion
I agree on that it is better to close tags but I also rely on validators.
Perhaps I should not but the fact is that they also let me spare a lot of
time.

No, a validator is a good and useful tool, but are it is not a
substitute for knowing what you are doing. Employing a number of things
can be helpful to better markup. 'Prettier' markup as I mentioned can
have a functional purpose of making it easier to identify mistakes and
easier to maintain a document as you make changes over time.

It is not 'this *or* that', as your attitude seems to be to do one thing
at the exclusion of another, but rather a 'this *and* that' can be the
best approach. I'd advise continuing to use the validator, *and* also
get the Web Developers Bar for Firefox with tools that *would* help you
analyze your markup, *and* use more than one browser for development,
*and* be more receptive to advice from folks who know what they are
doing, *and* since you appear to value education maybe take a course in
web design?
 
B

Beauregard T. Shagnasty

Jonathan said:
*and* since you appear to value education maybe take a course in
web design?

Sometimes productive, sometimes not.

The courses taught in my nearby community college are worthy only to the
newest of newbies. The instructors know nothing of valid syntax, CSS,
semantic markup, modern techniques, and in fact the last time I looked
at the course listings, were requiring students to own FrontPlague.

Be wary what you choose. ;-)
 
L

Luigi Donatello Asero

Jonathan N. Little said:
I may not be alone in my opinion


No, a validator is a good and useful tool, but are it is not a
substitute for knowing what you are doing. Employing a number of things
can be helpful to better markup.


I did not say that.
Of course I agree on that it is good to know what you are doing.
But forgetting to close a tag has not much to do with not to know that.
Validators are supposed to help.

'Prettier' markup as I mentioned can
have a functional purpose of making it easier to identify mistakes and
easier to maintain a document as you make changes over time.

It is not 'this *or* that', as your attitude seems to be to do one thing
at the exclusion of another, but rather a 'this *and* that' can be the
best approach.

Again, you seem to misunderstand me.
See above.

I'd advise continuing to use the validator, *and* also
get the Web Developers Bar for Firefox with tools that *would* help you
analyze your markup, *and* use more than one browser for development,
*and* be more receptive to advice from folks who know what they are
doing, *and* since you appear to value education maybe take a course in
web design?

You are "good" to say that other people do not follow
"advices". Sorry, I do not like your attitude.
As I tried to point out earlier, I sometimes follow it and other times I do
not, just because
I think.
"Cogito ergo sum" I think it over what other say and I try and decide on my
own what I want to do.
As to a course in web design, I am not likely to follow one at least in a
short time.
I have other priorities (for example I am learning Chinese on my own among
many things)
As to concrete questions,
I have now one
Would you rather have
a <div class="section" id="name of the file or some name which reminds of
the content of the page">
and then
<div class="subsection" id="head">?
I am not so sure about that.
On the one hand I think that a section should have a heading (h1),
on the other hand, it the section is a container for the whole page,
the "head" should be a subsection!
 
L

Luigi Donatello Asero

Beauregard T. Shagnasty said:
Sometimes productive, sometimes not.

I agree.
The courses taught in my nearby community college are worthy only to the
newest of newbies. The instructors know nothing of valid syntax, CSS,
semantic markup, modern techniques, and in fact the last time I looked
at the course listings, were requiring students to own FrontPlague.

Be wary what you choose. ;-)

I share your opinion. It is easier to learn on the web!
 
J

Jonathan N. Little

Luigi said:
"Jonathan N. Little" <[email protected]> skrev i meddelandet


I did not say that.
Of course I agree on that it is good to know what you are doing.
But forgetting to close a tag has not much to do with not to know that.
Validators are supposed to help.


Ok, now you misunderstand. Validators are a good tool, your problem was
*not* the missing optional tags but markup like this:

<a name="italienskan-ligan"</a>

Why did Validator not find this error, I do not know. Take it up with
the the programmers of the validator. However, the validator is just a
program, a tool, and can help you find error. Code can technically
validate and not be good design, also it is possible to throw certain
combinations of junk at it and cause the program to fail.

When your say "But forgetting to close a tag has not much to do with not
to know that. Validators are supposed to help."

Validators help, yes but not the only thing. Missing the option closing
tags is not an error but can contribute to confusion on your part,
interfering with my other point that "good markup is not obtained by
just running though a validator". Inconstantly using option ending tags
could be inferred as limited understanding or just sloppiness. In either
case it makes code very hard to debug manually and manual debut is
another part of making good markup, i.e., finding the error yourself.
That is why I suggested 'pretty-ing up' your markup, not for 'artistic
reasons but to make it easier to find your errors.
'Prettier' markup as I mentioned can

Again, you seem to misunderstand me.
See above.

I'd advise continuing to use the validator, *and* also

You are "good" to say that other people do not follow
"advices". Sorry, I do not like your attitude.
As I tried to point out earlier, I sometimes follow it and other times I do
not, just because
I think.
"Cogito ergo sum" I think it over what other say and I try and decide on my
own what I want to do.
As to a course in web design, I am not likely to follow one at least in a
short time.
I have other priorities (for example I am learning Chinese on my own among
many things)
As to concrete questions,
I have now one
Would you rather have
a <div class="section" id="name of the file or some name which reminds of
the content of the page">
and then
<div class="subsection" id="head">?
I am not so sure about that.
On the one hand I think that a section should have a heading (h1),
on the other hand, it the section is a container for the whole page,
the "head" should be a subsection!

I have no idea what you are talking about here. I suggested that you use
an elements 'id' for your anchor within a page instead of empty named
'A' elements <a name="SomeAnchor"></a> since your page had errors like
this one:

<a name="italienskan-ligan"</a>

where if could have been written

<p id="italienskan-ligan">The text for the block...

or

<h2 id="italienskan-ligan">Your Heading Text</h2>


Personally I like to name CCS class that describe the function of styled
element, e.g., class="pictureGallery", class="itemDesc", or class="currency"

"section" seems to generic, "articleBody" or "travelPicture"... but to
each his own...
 
L

Luigi Donatello Asero

Jonathan N. Little said:
Ok, now you misunderstand. Validators are a good tool, your problem was
*not* the missing optional tags but markup like this:

<a name="italienskan-ligan"</a>

Why did Validator not find this error, I do not know. Take it up with
the the programmers of the validator. However, the validator is just a
program, a tool, and can help you find error. Code can technically
validate and not be good design, also it is possible to throw certain
combinations of junk at it and cause the program to fail.

When your say "But forgetting to close a tag has not much to do with not
to know that. Validators are supposed to help."

Validators help, yes but not the only thing. Missing the option closing
tags is not an error but can contribute to confusion on your part,
interfering with my other point that "good markup is not obtained by
just running though a validator". Inconstantly using option ending tags
could be inferred as limited understanding or just sloppiness. In either
case it makes code very hard to debug manually and manual debut is
another part of making good markup, i.e., finding the error yourself.
That is why I suggested 'pretty-ing up' your markup, not for 'artistic
reasons but to make it easier to find your errors.


I have no idea what you are talking about here. I suggested that you use
an elements 'id' for your anchor within a page instead of empty named
'A' elements <a name="SomeAnchor"></a> since your page had errors like
this one:

<a name="italienskan-ligan"</a>

where if could have been written

<p id="italienskan-ligan">The text for the block...

or

<h2 id="italienskan-ligan">Your Heading Text</h2>


Personally I like to name CCS class that describe the function of styled
element, e.g., class="pictureGallery", class="itemDesc", or class="currency"

"section" seems to generic, "articleBody" or "travelPicture"... but to
each his own...


http://www.w3.org/TR/html401/struct/global.html#h-7.5.2
 
J

Jonathan N. Little

Luigi said:

Okay any your point being? Seems to parallel what I wrote.

W3C:
The id attribute has several roles in HTML:

* As a style sheet selector.
* As a target anchor for hypertext links.
* As a means to reference a particular element from a script.
* As the name of a declared OBJECT element.
* For general purpose processing by user agents (e.g. for
identifying fields when extracting data from HTML pages into a database,
translating HTML documents into other formats, etc.).

The class attribute, on the other hand, assigns one or more class names
to an element; the element may be said to belong to these classes. A
class name may be shared by several element instances. The class
attribute has several roles in HTML:
* As a style sheet selector (when an author wishes to assign style
information to a set of elements).
* For general purpose processing by user agents.
<!-- English messages -->
<P><SPAN id="msg1" class="info" lang="en">Variable declared twice</SPAN>
<P><SPAN id="msg2" class="warning" lang="en">Undeclared variable</SPAN>
<P><SPAN id="msg3" class="error" lang="en">Bad syntax for variable
name</SPAN>


msg1, msg2, & msg3 act as anchors on the page. Class names like "error"
describe the purpose of the styling not as what some folks do and have
class names like "redBold" nor so generic as "section".
 
T

Toby Inkster

Jonathan said:
<a name="italienskan-ligan"</a>

Why did Validator not find this error, I do not know.

It wouldn't spot that "error" because it's technically valid. The SGML
declaration for HTML specifies "SHORTTAG YES" which allows for certain
shortcuts to be used. For example:

<b/Foo/ = <b>Foo</b>
<b>Foo</> = <b>Foo</b>
<b<i>Foo</</> = <b><i>Foo</i></b>
<ul<li>One<>Two<>Three</>
= <ul><li>One<li>Two<li>Three</ul>

The example quoted above is shorthand for

<a name="italienskan-ligan"></a>

Thus the validator will not complain. However, virtually no browsers
properly support the full SGML syntax, so on real web pages these
features should probably not be used.

There is however one SHORTTAG feature that is supported by real
browsers -- SHORTTAG is what allows you to leave out the quote marks
for certain attribute values. i.e.

<b class=bar>Foo</b> = <b class="bar">Foo</b>
 
J

Jonathan N. Little

I know SGML syntax is a bit lax but how would it identify beginning and
end of a tag, tag parameters, and containing data within elements if
trailing '>' could be optional?

<a name="italienskan-ligan" some other text maybe</a>
<a name="italienskan-ligan" some other text maybe <b>or element</></a>

Just curious, must be a b*tch to parse!
 
L

Luigi Donatello Asero

Jonathan N. Little said:
Okay any your point being? Seems to parallel what I wrote.

W3C:
The id attribute has several roles in HTML:

* As a style sheet selector.
* As a target anchor for hypertext links.
* As a means to reference a particular element from a script.
* As the name of a declared OBJECT element.
* For general purpose processing by user agents (e.g. for
identifying fields when extracting data from HTML pages into a database,
translating HTML documents into other formats, etc.).

The class attribute, on the other hand, assigns one or more class names
to an element; the element may be said to belong to these classes. A
class name may be shared by several element instances. The class
attribute has several roles in HTML:
* As a style sheet selector (when an author wishes to assign style
information to a set of elements).
* For general purpose processing by user agents.
<!-- English messages -->
<P><SPAN id="msg1" class="info" lang="en">Variable declared twice</SPAN>
<P><SPAN id="msg2" class="warning" lang="en">Undeclared variable</SPAN>
<P><SPAN id="msg3" class="error" lang="en">Bad syntax for variable
name</SPAN>


msg1, msg2, & msg3 act as anchors on the page. Class names like "error"
describe the purpose of the styling not as what some folks do and have
class names like "redBold" nor so generic as "section".


So, you did not notice which class names they used themselves......
 
D

dorayme

Luigi Donatello Asero said:
As I tried to point out earlier, I sometimes follow it and other times I do
not, just because I think. "Cogito ergo sum" I think it over what other say and I try and decide on my
own what I want to do.

So that's it! You are scared of going out of existence. Dear,
dear Luigi, don't fear so!

You see, even if you did not think for yourself so much and just
followed advice, you would still exist. "I take advice, therefore
I exist" is just as much a guarantee (or not) of your existence
as "I think, therefore I exist".
 
T

Toby Inkster

Jonathan said:
I know SGML syntax is a bit lax but how would it identify beginning and
end of a tag, tag parameters, and containing data within elements if
trailing '>' could be optional?

Simple: the '<' character is not allowed within a tag unless it's quoted,
thus the '<' must be the start of another tag, thus the first tag must
have closed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top