Is this illegal

W

Will S

I am just starting to use CSS and have H1 as centre style. Now I am cheating
by inserting graphics in the heading

ie. <H1> graphics file </H1>
 
L

Lauri Raittila

I am just starting to use CSS and have H1 as centre style.

I don't understand this sentence.
Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.

And remember to use alt attribute in img element.

[please include question in body, and use sencible subject line in
future]
 
R

Roy Schestowitz

Lauri said:
I am just starting to use CSS and have H1 as centre style.

I don't understand this sentence.
Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.


I think that the original poster knows very well that he does not comply
with standards. He cannot be assured that his pages will get rendered
correctly in all browsers. Moreover, he demands more tolerance from the
browser, which he should not do.

Since there is no font size associated with an image, why not just use a
more suitable, rational element than HEADER? If one already breaks the
rules by embedding important text in an image, why break the document
structure too? Having said that, if the header contains mathematics that
HTML cannot convey, then images are fine.

And remember to use alt attribute in img element.

[please include question in body, and use sencible subject line in
future]


[sarcasm] But then nobody's gonna read it! [/sarcasm]

Roy
 
W

Will S

--
Will Sutton
http://members.ozemail.com.au/~wlsutton/trip.html
Roy Schestowitz said:
Lauri said:
I am just starting to use CSS and have H1 as centre style.

I don't understand this sentence.
Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.


I think that the original poster knows very well that he does not comply
with standards. He cannot be assured that his pages will get rendered
correctly in all browsers. Moreover, he demands more tolerance from the
browser, which he should not do.

No I dont know. I havn't played with HTML since last century . I am using
an older version of Homesite and the document validates,
 
L

Lauri Raittila

Still don't, but I fail to see how anyone else could... URLs would be
nice...
Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.


I think that the original poster knows very well that he does not comply
with standards.

The fact is that image inside h1 both comply standard, and is the best
markup, if that image contains heading. If image is not heading, then it
is not good to use h1 for it, of course, but I fail to see why h1 was
used then, exept if OP doesnt know what is div element, and class
attribute, in which I find unlikely, but maybe it is possible.
He cannot be assured that his pages will get rendered
correctly in all browsers. Moreover, he demands more tolerance from the
browser, which he should not do.

Exactly what tolerance is he looking, as it is valid and correct in
browsers poitn of few.
Since there is no font size associated with an image, why not just use a
more suitable, rational element than HEADER? If one already breaks the
rules by embedding important text in an image, why break the document
structure too?

Exactly. If the important text in the image is heading, heading markup
should be used, even if it does make it bit more complicated.

[OP: find OE quotefix or get rid of the sig. It's place is not as first
thing in your post. Also learn to only quote relevant parts, and if you
want good answer, try explain what you are doing...]
 
R

Roy Schestowitz

Will said:
Roy Schestowitz said:
Lauri said:
in alt.html, Will S wrote:
I am just starting to use CSS and have H1 as centre style.

I don't understand this sentence.

Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.


I think that the original poster knows very well that he does not comply
with standards. He cannot be assured that his pages will get rendered
correctly in all browsers. Moreover, he demands more tolerance from the
browser, which he should not do.

No I dont know. I havn't played with HTML since last century . I am using
an older version of Homesite and the document validates,

I didn't mean to be critical, but I definitely wouldn't encourage structures
like <h1><img src="foo"></h1>. It looks too organic and prone to breakage.
It also poorly conveys the structure of the document, which may become
crucial if you exported it to HTML into PDF, LaTeX or just copied it
elsewhere.

What I suggest you do is this:

-Go to: http://www.csszengarden.com/

-View the source of the document

-Now have a look at: http://www.csszengarden.com/zengarden-sample.css

-Note the way they combine header images and actual text in a very compliant
and elegant way.

Roy
 
M

Michael Winter

On 26/06/2005 12:17, Roy Schestowitz wrote:

[snip]
I didn't mean to be critical, but I definitely wouldn't encourage structures
like <h1><img src="foo"></h1>.

There's nothing wrong with that structurally. With the required alt
attribute, that is perfectly acceptable if the image does render the
level one heading for the document. If the image cannot be displayed,
then the alt attribute will convey whatever the image should have.

[snip]
What I suggest you do is this:

-Go to: http://www.csszengarden.com/
[...]

-Note the way they combine header images and actual text in a very compliant
and elegant way.

That isn't very good, in my opinion. If I've disabled images in my
browser for faster loading times (and I do from time to time), I would
lose all of the text rendered normally by images. To view that text, I
would have to disable the style sheet as well.

Mike
 
R

Roy Schestowitz

Michael said:
On 26/06/2005 12:17, Roy Schestowitz wrote:

[snip]
I didn't mean to be critical, but I definitely wouldn't encourage
structures like <h1><img src="foo"></h1>.

There's nothing wrong with that structurally. With the required alt
attribute, that is perfectly acceptable if the image does render the
level one heading for the document. If the image cannot be displayed,
then the alt attribute will convey whatever the image should have.

[snip]
What I suggest you do is this:

-Go to: http://www.csszengarden.com/
[...]

-Note the way they combine header images and actual text in a very
compliant and elegant way.

That isn't very good, in my opinion. If I've disabled images in my
browser for faster loading times (and I do from time to time), I would
lose all of the text rendered normally by images. To view that text, I
would have to disable the style sheet as well.

Mike

Quite ture. I could never comprehend why they _encourage_ people to embed
images to replace header 2 elements. Some styles, however, provide text
instead. Most likely, such styles rarely get past the reviewing process.

Roy
 
L

Lauri Raittila

Quite ture. I could never comprehend why [CSS zen garden] _encourage_
people to embed images to replace header 2 elements.

And why they want people to do it so that when images are not displayed,
nothing will be seen?
 
W

Will S

Its called been lazy, I am using CSS and have

H1 {
color : Maroon;
font-size : 48px;
text-align : center;
}

Now I am putting images instead of txt ie <H1> Image file</H1>

Is this legal ?


Still don't, but I fail to see how anyone else could... URLs would be
nice...


http://members.ozemail.com.au/~wlsutton/

I am strictly amateur and its a hobby that I have started on after a 5 year
break.
And yes I will be fixing the alt text for graphics ( most have but I missed
a few )
Now I am cheating by inserting graphics in the heading

ie. <H1> graphics file </H1>

[Subject:] Is this illegal
No, it is best way to do it, if you have your heading in image. Of
course, it would be better to not have text on images.


I think that the original poster knows very well that he does not comply
with standards.

The fact is that image inside h1 both comply standard, and is the best
markup, if that image contains heading. If image is not heading, then it
is not good to use h1 for it, of course, but I fail to see why h1 was
used then, exept if OP doesnt know what is div element, and class
attribute, in which I find unlikely, but maybe it is possible.
He cannot be assured that his pages will get rendered
correctly in all browsers. Moreover, he demands more tolerance from the
browser, which he should not do.

Exactly what tolerance is he looking, as it is valid and correct in
browsers poitn of few.
Since there is no font size associated with an image, why not just use a
more suitable, rational element than HEADER? If one already breaks the
rules by embedding important text in an image, why break the document
structure too?

Exactly. If the important text in the image is heading, heading markup
should be used, even if it does make it bit more complicated.

[OP: find OE quotefix or get rid of the sig. It's place is not as first
thing in your post. Also learn to only quote relevant parts, and if you
want good answer, try explain what you are doing...]

Had include sig in replies ticked..........its is now unticked
 
D

Dan

Will said:
Now I am putting images instead of txt ie <H1> Image file</H1>

Is this legal ?

You won't be sent to jail for doing it. It won't even stop your HTML
from validating, if your image element has the required ALT attribute.
However, it may or may not be good logical structure, depending on
whether the content of the image (and its ALT attribute value) is
actually a first-level header for your document. If your intent is
merely to cause the images to be centered, but they're not headers,
then you'd be better off defining a class for that purpose in your
stylesheet, and then using a class attribute in a div element
surrounding the content you wish to center.
Had include sig in replies ticked..........its is now unticked

If you were using a decent mail/news program, you'd have the option of
putting the sig blocks where they belong, below the quoted material;
you're apparently using one that tries to push you into top-posting
instead.
 
W

Will S

Dan said:
You won't be sent to jail for doing it. It won't even stop your HTML
from validating, if your image element has the required ALT attribute.
However, it may or may not be good logical structure, depending on
whether the content of the image (and its ALT attribute value) is
actually a first-level header for your document. If your intent is
merely to cause the images to be centered, but they're not headers,
then you'd be better off defining a class for that purpose in your
stylesheet, and then using a class attribute in a div element
surrounding the content you wish to center.

I am new to style sheets. So I give all the images that I want centred the
same ID and then put that ID in style sheets as centred ?
 
B

Beauregard T. Shagnasty

Will said:
I am new to style sheets. So I give all the images that I want
centred the same ID and then put that ID in style sheets as centred

IDs are unique. You may only use an ID word once in a document. A
class will do what you want, and be legal.

Try your page at: http://validator.w3.org/
 

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,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top