No, because what you don’t see in your example is the outer P tag that wraps it all. Your example would better be written as:
<p><h1>This is my Heading</h1>
And this is the start of my text, blah, blah,.............
.................................................................end of my text</p>
Now you know you cannot nest a header inside a P (or vice-versa) – they are both block-level tags that do not take block-level children. A browser might make sense of it, but would not be bound by any convention to do exactly the right thing that you imagine – it could, with impunity – place your header AFTER the surrounding P, rather than before it. And some browsers would put an empty P before the header, so you would end up with:
<p></p>
<h1>This is my Heading</h1>
<p>And this is the start of my text, blah, blah,.............
.................................................................end of my text</p>
Not all browser agree what to do with an empty P – some include the padding and margin defaults (a honking big vertical space before your header, in other words) and others collapse any empty tag to no vertical space. Again, if your code isn’t valid, then the browser can put it through the Cuisinart and make tag soup and won’t be taking the blame for how bad your page looks in some browsers.
As far as I know, the only way to do this when you’re starting from Express-generated code is to use a text editor to post-process the code. And you’ll have to re-run that process each time you make any change to the page, because Freeway generates new HTML to replace the previous version, wiping out all of your changes.
Walter
On Apr 20, 2012, at 5:41 AM, spidercrab wrote:
Would it be possible (in Express) to mark a heading in this way, without changing the text style, font,etc?
I.e. could you create some body text with a short sentence ending in a carriage return, and add the
and
into the body text.
I.e. Currently in Express a body text might look like:
“This is my Heading
And this is the start of my text, blah, blah,…
…end of my text.”
And with the tags:
“
This is my Heading
And this is the start of my text, blah, blah,…
…end of my text.”
Is this how you would do it?
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options