|
Posted by Andy Dingley on 11/13/06 12:45
Ganesh wrote:
> http://www.seashellwebs.com/structure1/structure1.htm
>
> Can you please check the same now. I've got that working once again.
Looks nice. Reasonable coding too, and it's valid.
A few comments:
Doctype should be 4.01 Strict, not Transitional, if this is a new page
you're working on.
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
would be better served as a HTTP header, not a <meta> tag, if you can
possibly set the server up to do this. In general, if it's not
essential, then I'd ignore this tag anyway -- they cause a lot of
trouble if they're not accurate and when you _really_ need them then
it's worth getting the headers right.
"<br><em>P tag used: No Class assigned</em><br> "
This is misleading - this _isn't_ a <p> tag, it's just one piece of a
large unstructured lump of text. It would be better to re-structure
this, particularly in this case where you expected linebreaks and
whitespace around it.
Structure is always good. Adding structure when you author the document
is quite easy and it's easy to make this structure invisible later on.
In contrast it's hard or near-impossible to try and infer structure
later on when you didn't include it at the beginning.
At the very least, this should be a <div> not a<p>. It's not a
"paragraph" in the sense of English grammar.
"<br><br>"
It's bad practice to use repeated <br> tags. It's unclear what they
mean - Should this be rendered as one space or many? Certainly they
shouldn't be used as a substitute for controlling whitespace through
the CSS margin properties.
"<br>"
<br> is an inline line-break, which should only be used for typesetting
poetry and the like where one verse does have rigid linebreaks inside
it. This example is clearly using them for whitespace between text
blocks. Use <p> or <div> instead
"<strong>This is a brief explanation about the product,
service</strong>."
Should this use <strong> or <span class="tagline" > ? Most good coders
would favour the second. Personally I'd compromise and happily use
<strong class="tagline" > if I could reliably anticipate the "strong"
was always appropriate for this context. I'd definitely add the class
attribute though.
I might even use <div class="tagline" > (this would have to be inside a
<div>, not a <p>). I'd then set display:inline; in CSS. Crucially
though, the "tagline" concept might be more appropriate as a "separate
piece of text" and thus a <div>, rather than just a lead-in to the same
paragraph.
".content h2 { font-size: 130%; margin: 5px; }"
I'm a little wary of setting font-size larger than 100%, then setting
margins in pixels. It's not wrong to do this, and setting very small
margins with a pixel unit is a reasonable technique. However think
about how the page is redrawn with an enlarged text size. You could
have quite large characters here and they'd still keep only a tiny
margin between them.
When thinking of what units to set margins in, think of horizontal and
vertical separately. It's often good practice to use a different unit
for horizontal and vertical. If some good reason does cause you to use
an unusual choice of unit (e.g. horizontal measures in pixels to fit
around an image) then this reason may well apply to one direction but
not the other.
Navigation:
[Reply to this message]
|