can you show the code for this
more then likely you have a return after the <H1> causing the line break.
if you wanted to use style for it you would do somethin glike a span or div
span is only for short phrases though
<style>
.txt {
font-size:46pt;
}
</style>
<span class="txt">Hello!</span>
or if it is for a large block of text
<div class="txt">paragraph</div> ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
first If you just use the <h1> tage it puts a blank line after whatever's in the tag
why are you putting anything in the tag?
what is the code in question?
if you do
<h1>heading</h1>
you result in one thing
BUT if you do things as
<h1>
heading</h1>
<h1> heading</h1>
etc..
browsers can interpret this differently.
you need to be more detailed and or give the code in question in asking why is this happening?
another note: drop the V4 issues. Most have and you should also. It's not worth it! ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
nice catch BDNFLNC and if that is the case in what you are trying to do then as BDNFLNC said you can't so do a span instead
<span style="font-size:46pt;">heading</span>more text
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
so should we as well throw the other less meaningful elements out the door and stick to the first release of HTML?
That sounds like it should be in the same category of we should keep up with the V4 browsers. Maybe that's a good ethical question in the ethic's forum.
as for the <span> tag I find hundreds of very good uses for it and hope others know it is a great means to include formatting aspects of their text.
besides the fact how can you come up with a argumentful conversation on the <span> tag not being a good idea over a preformatted tag when it is viewable in most browsers
like
Netscape 4, 6, 7
Mozilla 1
Internet Explorer 4, 5, 6
Opera 6
from my last check (thirty seconds ago)
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
The purpose of HTML is to structure a document into something meaningful, regardless of how it might look. (This is a paraphrase of the w3c) This way you ensure the content is meaningful to everybody, because all user-agents and devices agree upon what the HTML tags mean, but few agree on how they should be presented.
<span> is great to set off pieces of text with some special meaning HTML can't convey, but if there's already an HTML tag with that meaning built-in then by all means use it! CSS can be used to make the tag look different, but if a browser doesn't support CSS at least the content structure is there.
There's tons of good articles about all this at these sites:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.