Re: [whatwg] Site-Wide Heading Element

On Wed, Jun 24, 2015 at 3:30 PM, Barry Smith <bearzteez@live.com> wrote:

> ...
>>>
>>>
> When I build a website that is to have more than one page, and I want the
> "banner" to be the same across all pages,  I use the <header> element with
> a
> javascript file embedded inside, like this:
>
> <header id="banner">
>    <script src="scripts/header.js" type="text/javascript"></script>
> </header>
>
> and the javascript file looks like this:
>
> document.write('\
>    <hgroup class="myHeader">\
>        <h1>The Site Name</h1>\
>        <h2>Site Tagline</h2>\
>    </hgroup>\
> ');
>
> This way the <h1> element is still free to use as the main body heading in
> the document itself.
>
>
Please don't use document.write like this, do a server side include instead.

- E

Received on Monday, 6 July 2015 23:27:05 UTC