l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2001 Dec 30 17:13

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] dumb html question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] dumb html question



I seem to recall that CSS (and JavaScript also) have two comment
markers:  "<!--" and "//".  Both of these markers are only active until
the end of the line, the same way "#" works in shell scripts.  I think
the problem with your first example is that <!-- kills everything on its
line, so your STYLE tag really is empty (it only contains a comment).
The problem with the second example is that "-->" has no meaning in CSS
(it isn't an end of comment marker like it is in HTML) so the ">" at the
end is getting interpreted strangely.  What you want is:

<STYLE type="text/css">
    <!--
    H1 {font-size: +33pt}
    // -->
</STYLE>

Now the first and third lines inside the STYLE tag are comments as far
as CSS browsers are concerned.  Old browsers that don't understand CSS
will simply think the whole thing is an HTML comment.  Note that a CSS
capable browser would accept

<STYLE type="text/css">
    <!--
    H1 {font-size: +33pt}
    //
</STYLE>

just fine.  The "-->" is only there to help old browsers.

Of course it's been a while since I looked at this type of stuff, so I
may be completely wrong here...


Matt

On Thu, Dec 13, 2001 at 12:04:47PM -0800, Peter Jay Salzman wrote:
> weblint complains that <STYLE> is empty:
> 
> 	<STYLE type="text/css">
> 		<!-- H1 {font-size: +33pt} -->
> 	</STYLE>
> 
> weblint complains that "< should be written as &lt;":
> 
> 	<STYLE type="text/css">
> 		<!--
> 		H1 {font-size: +33pt}
> 		-->
> 	</STYLE>
> 
> someone help me out here.  what's the correct form?  both work on netscape
> 4.x and opera.   but i'd like for this to weblint clean if possible.
> 
> pete
> 
> 
> -- 
>                ** Please don't send me html email **
> PGP Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
> PGP Public Key:  finger p@dirac.org
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

-- 

*************************************************
* Matt Roper <matt@mattrope.com>                *
* http://www.mattrope.com                       *
* PGP Key: http://www.mattrope.com/mattrope.asc *
*************************************************
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.