h tag problem

Discussion in 'HTML' started by richard, Apr 12, 2012.

  1. richard

    richard Guest

    www.1littleworld.net/sample/

    how does one properly add a second line to an h tag?
    because the script uses the <h3> tag for creating the accordion sections, I
    want to have a second line in that section as I show it now.

    But the validator says that a <p> is not permitted inside the tags.
    Is it even possible to do and make the validator happy?

    Another issue I have, word wrapping.
    Text inside the division is not conforming to the width of the container.
    Instead, it just keeps on going on one line.
    How do I correct that? Overflow:hidden does not work.

    Also, another gripe with the validator.
    According to the errors listing, one is not permitted to use "ul" in text
    because that is a tag designator.
    WTF? A tag is designated by <>. NOT what is inside the <>.
    But I can say "html" and not get an error?
    yeah right.

    <begin the bashing>
    richard, Apr 12, 2012
    #1
    1. Advertising

  2. On Thu, 12 Apr 2012 14:30:37 -0400, richard <>
    wrote:

    >www.1littleworld.net/sample/
    >
    >how does one properly add a second line to an h tag?
    >because the script uses the <h3> tag for creating the accordion sections, I
    >want to have a second line in that section as I show it now.
    >
    >But the validator says that a <p> is not permitted inside the tags.
    >Is it even possible to do and make the validator happy?


    What about <br>?

    [snip]

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Apr 12, 2012
    #2
    1. Advertising

  3. richard the sto0pid wrote:

    > Also, another gripe with the validator. According to the errors listing,
    > one is not permitted to use "ul" in text because that is a tag
    > designator. WTF? A tag is designated by <>. NOT what is inside the <>.
    > But I can say "html" and not get an error? yeah right.


    The validator tells you exactly what the error is.

    "The character may appear on your browser as a curly quote, or a
    trademark symbol, or some other fancy glyph; ..."

    There are curly quotes around the letters "ul". Don't use them; use
    standard double-quote marks instead.

    Further, the page itself says:

    "This script is provided as-is with no warranty or guarantee. It is
    available at no cost for any project, non-commercial or commercial. Paid
    support is available by clicking here"

    > <begin the bashing>


    Why are you still using Transitional for new work? Use Strict.

    --
    -bts
    -This space for rent, but the price is high
    Beauregard T. Shagnasty, Apr 12, 2012
    #3
  4. richard

    dorayme Guest

    In article <yddvxtotijgv$>,
    richard <> wrote:

    > www.1littleworld.net/sample/
    >
    > how does one properly add a second line to an h tag?
    > because the script uses the <h3> tag for creating the accordion sections, I
    > want to have a second line in that section as I show it now.
    >
    > But the validator says that a <p> is not permitted inside the tags.
    > Is it even possible to do and make the validator happy?
    >


    <h3>"A" Team / An Empty Glass<br><span class="blue">SSgt Barry
    Sadler</span></h3>

    (Even if the Validator said it was OK to put a P there, would you
    still do it? I wouldn't. Let's face it, SSgt Barry's name is hardly a
    paragraph.)


    > Another issue I have, word wrapping.
    > Text inside the division is not conforming to the width of the container.
    > Instead, it just keeps on going on one line.
    > How do I correct that? Overflow:hidden does not work.
    >


    You can instead use overflow: auto; to help viewers with larger text
    sizes. Or mybe even better, design so that the "division" expands with
    the ems required.

    > Also, another gripe with the validator.


    Which one?

    > According to the errors listing, one is not permitted to use "ul" in text
    > because that is a tag designator.
    > WTF? A tag is designated by <>. NOT what is inside the <>.
    > But I can say "html" and not get an error?
    > yeah right.
    >
    > <begin the bashing>


    I look around and see no nicely balanced bit of gal piping, too early
    in the morning to use my bare hands. So, I will pass on this and just
    continue sipping my cup of tea in a civilised way.

    Why don't you say offer your validator some little concession and see
    if it puts it in a better mood? Some easy thing like say putting in an
    alt attribute in img elements. You need to negotiate with validators,
    they have moods just like all of us.

    --
    dorayme
    dorayme, Apr 12, 2012
    #4
  5. richard

    richard Guest

    On Thu, 12 Apr 2012 14:30:37 -0400, richard wrote:

    > www.1littleworld.net/sample/
    >
    > how does one properly add a second line to an h tag?
    > because the script uses the <h3> tag for creating the accordion sections, I
    > want to have a second line in that section as I show it now.
    >
    > But the validator says that a <p> is not permitted inside the tags.
    > Is it even possible to do and make the validator happy?
    >
    > Another issue I have, word wrapping.
    > Text inside the division is not conforming to the width of the container.
    > Instead, it just keeps on going on one line.
    > How do I correct that? Overflow:hidden does not work.
    >
    > Also, another gripe with the validator.
    > According to the errors listing, one is not permitted to use "ul" in text
    > because that is a tag designator.
    > WTF? A tag is designated by <>. NOT what is inside the <>.
    > But I can say "html" and not get an error?
    > yeah right.
    >
    > <begin the bashing>


    Solved the issue more or less.
    Removed the P tag and placed it just under the h3 tag.
    Color coding the p same as the h3 and you don't really notice the
    difference.
    Since the script causes the next section to show, the p tag remains in
    place as intended.
    richard, Apr 12, 2012
    #5
  6. richard

    richard Guest

    On Thu, 12 Apr 2012 16:21:24 -0500, Hot-Text wrote:

    > "richard" <> wrote in message news:yddvxtotijgv$...
    >> www.1littleworld.net/sample/
    >>
    >> how does one properly add a second line to an h tag?
    >> because the script uses the <h3> tag for creating the accordion sections, I
    >> want to have a second line in that section as I show it now.
    >>
    >> But the validator says that a <p> is not permitted inside the tags.
    >> Is it even possible to do and make the validator happy?
    >>
    >> Another issue I have, word wrapping.
    >> Text inside the division is not conforming to the width of the container.
    >> Instead, it just keeps on going on one line.
    >> How do I correct that? Overflow:hidden does not work.
    >>
    >> Also, another gripe with the validator.
    >> According to the errors listing, one is not permitted to use "ul" in text
    >> because that is a tag designator.
    >> WTF? A tag is designated by <>. NOT what is inside the <>.
    >> But I can say "html" and not get an error?
    >> yeah right.
    >>

    >
    > Not like this on the inside:
    > <h3>"A" Team / An Empty Glass <p class="blue">SSgt Barry Sadler</p></h3>
    >
    >
    > It go like this on the outside:::
    > <p class="blue"><h3>"A" Team / An Empty Glass SSgt Barry Sadler</h3></p>


    Which would result in a single line of text and the name would be the same
    color as the h3 tag.
    richard, Apr 12, 2012
    #6
  7. richard

    richard Guest

    On Fri, 13 Apr 2012 07:04:45 +1000, dorayme wrote:

    > In article <yddvxtotijgv$>,
    > richard <> wrote:
    >
    >> www.1littleworld.net/sample/
    >>
    >> how does one properly add a second line to an h tag?
    >> because the script uses the <h3> tag for creating the accordion sections, I
    >> want to have a second line in that section as I show it now.
    >>
    >> But the validator says that a <p> is not permitted inside the tags.
    >> Is it even possible to do and make the validator happy?
    >>

    >
    > <h3>"A" Team / An Empty Glass<br><span class="blue">SSgt Barry
    > Sadler</span></h3>
    >
    > (Even if the Validator said it was OK to put a P there, would you
    > still do it? I wouldn't. Let's face it, SSgt Barry's name is hardly a
    > paragraph.)
    >



    Tried that as well with the same errors.
    I use <p> like a div. Because of the formatting properties.
    Which helps in avoiding to use excessive br's.
    richard, Apr 12, 2012
    #7
  8. richard

    Guest

    On Thursday, April 12, 2012 2:30:37 PM UTC-4, richard wrote:
    > www.1littleworld.net/sample/
    >
    > how does one properly add a second line to an h tag?
    > because the script uses the <h3> tag for creating the accordion sections,I
    > want to have a second line in that section as I show it now.


    If you want two lines in a header, use <br>.

    > But the validator says that a
    > is not permitted inside the tags.
    > Is it even possible to do and make the validator happy?


    The most useful thing about the validator is that it gives you an indication of where your code should be headed. The problem is, there is no validator that can tell you how search-engine friendly your content is. In this case, it just isn't. It's wrapped in tags that don't relate to the content, and nested deep in the same way.

    I used accordion menus when I messed with Dreamweaver a few years ago. It ended up just being a frustrating experience. I would suggest you look at ways of describing and organizing your content that a computer can understand, as well as a vision-impaired user, for instance. It has the side effect of looking good in search engines (which, in their own way, are both computers and vision-impaired users).

    Hope you're well.
    , Apr 13, 2012
    #8
  9. richard

    dorayme Guest

    In article <12x8hk1r37bmy$.19k9mub4eex8r$>,
    richard <> wrote:

    > On Fri, 13 Apr 2012 07:04:45 +1000, dorayme wrote:
    >
    > > In article <yddvxtotijgv$>,
    > > richard <> wrote:
    > >
    > >> www.1littleworld.net/sample/
    > >>
    > >> how does one properly add a second line to an h tag?
    > >> because the script uses the <h3> tag for creating the accordion sections, I
    > >> want to have a second line in that section as I show it now.
    > >>
    > >> But the validator says that a <p> is not permitted inside the tags.
    > >> Is it even possible to do and make the validator happy?
    > >>

    > >
    > > <h3>"A" Team / An Empty Glass<br><span class="blue">SSgt Barry
    > > Sadler</span></h3>
    > >
    > > (Even if the Validator said it was OK to put a P there, would you
    > > still do it? I wouldn't. Let's face it, SSgt Barry's name is hardly a
    > > paragraph.)
    > >

    >
    >
    > Tried that as well with the same errors.
    > I use <p> like a div. Because of the formatting properties.
    > Which helps in avoiding to use excessive br's.


    You can't get the same error about the P in respect to my suggestion
    because there is no P in the suggestion.

    As for formatting, you can get whatever you want with either *a
    variation* of your mark-up, to wit:

    <h3>...</h3>
    <p> ...</p>

    and styling the P suitably

    Or you can use my suggestion and style the span suitably. If it is a
    bit more vertical space you want between the lines, try

    <h3 style="float: left">"A" Team / An Empty Glass<br><span
    class="blue">SSgt Barry
    Sadler</span></h3>

    or

    <h3 style="float: left">"A" Team / An Empty Glass<div
    class="blue">SSgt Barry
    Sadler</div></h3>

    with either

    h3 span {display: block; margin-top: .4em;}

    and you *can* leave out the BR (but better not in case CSS is off)

    or, respectively,

    h3 div {margin-top: .4em;}

    --
    dorayme
    dorayme, Apr 13, 2012
    #9
  10. Hot-Text wrote:
    > "richard" <> wrote in message
    > news:yddvxtotijgv$...
    >> www.1littleworld.net/sample/


    >>

    <snip>

    > Not like this on the inside:
    > <h3>"A" Team / An Empty Glass <p class="blue">SSgt Barry Sadler</p></h3>
    >
    >
    > It go like this on the outside:::
    > <p class="blue"><h3>"A" Team / An Empty Glass SSgt Barry Sadler</h3></p>
    >


    Except that is not valid either:

    <!ELEMENT P - O (%inline;)* -- paragraph -->

    <http://www.w3.org/TR/html401/struct/text.html#edef-P>

    H3 is not an *inline* element. The BR element suggestion would work...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Apr 13, 2012
    #10
  11. richard

    dorayme Guest

    In article <>,
    dorayme <> wrote:

    > <h3 style="float: left">"A" Team / An Empty Glass<div
    > class="blue">SSgt Barry
    > Sadler</div></h3>
    >
    > with either
    >
    > h3 span {display: block; margin-top: .4em;}
    >
    > and you *can* leave out the BR (but better not in case CSS is off)
    >
    > or, respectively,
    >
    > h3 div {margin-top: .4em;}


    Oops, quite wrong, that should have been more like:

    <h3 style="float: left">"A" Team / An Empty Glass</h3>
    <div class="blue">SSgt Barry Sadler</div>

    with

    div {margin-top: .4em;}

    Sorry about that, too hasty of me...

    But my other suggestion with the span is the way to go imo, especially
    if you think the whole is a heading of third level status.

    --
    dorayme
    dorayme, Apr 13, 2012
    #11
  12. On Apr 12, 10:43 pm, richard <> wrote:
    > On Fri, 13 Apr 2012 07:04:45 +1000, dorayme wrote:
    > > In article <yddvxtotijgv$>,
    > >  richard <> wrote:

    >
    > >>www.1littleworld.net/sample/

    >
    > >> how does one properly add a second line to an h tag?
    > >> because the script uses the <h3> tag for creating the accordion sections, I
    > >> want to have a second line in that section as I show it now.

    >
    > >> But the validator says that a <p> is not permitted inside the tags.
    > >> Is it even possible to do and make the validator happy?

    >
    > > <h3>"A" Team / An Empty Glass<br><span class="blue">SSgt Barry
    > > Sadler</span></h3>

    >
    > > (Even if the Validator said it was OK to put a P there, would you
    > > still do it? I wouldn't. Let's face it, SSgt Barry's name is hardly a
    > > paragraph.)

    >
    > Tried that as well with the same errors.
    > I use <p> like a div. Because of the formatting properties.
    > Which helps in avoiding to use excessive br's.


    So you misuse tags to fit your own propriety "standards" and then
    whinge about the fact that validators that enforce the real standards
    don't match your invention!

    Priceless!!!!!
    Captain Paralytic, Apr 13, 2012
    #12
  13. On Thu, 12 Apr 2012 14:30:37 -0400, richard wrote:

    > how does one properly add a second line to an h tag? because the script
    > uses the <h3> tag for creating the accordion sections, I want to have a
    > second line in that section as I show it now.


    To insert a line break inside a block element, sane and normal html
    coders use <br> or <br /> depending on the flavour of [x]html they're
    writing.

    > But the validator says that a <p> is not permitted inside the tags. Is
    > it even possible to do and make the validator happy?


    Of course <p></p> is not allowed inside <hN></hN>, just as <p></p> is not
    allowed inside <p></p>, and <hN></hN> is not allowed inside <hN></hN>,
    and <hN></hN> is not allowed inside <p></p>.

    <hN></hN> delineates a header, which is a type of paragraph. Hence, it
    can be used wherever a <p></p> can be used, and it can contain anything
    that a <p></p> can contain. Such as <br>

    > Also, another gripe with the validator. According to the errors listing,
    > one is not permitted to use "ul" in text because that is a tag
    > designator.


    Please post a url that demonstrates this.

    Here is one that disproves your assertion, and also demonstrates the use
    of <br> inside <hN></hN>:

    http://www.sined.co.uk/tmp/omfg.htm

    Rgds

    Denis McMahon
    Denis McMahon, Apr 13, 2012
    #13
  14. On Thu, 12 Apr 2012 17:43:57 -0400, richard <>
    wrote:

    [snip]

    >Tried that as well with the same errors.
    >I use <p> like a div. Because of the formatting properties.
    >Which helps in avoiding to use excessive br's.


    I had no idea that there was a limit.

    More <br> tags for the rest of us.

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Apr 13, 2012
    #14
  15. richard

    richard Guest

    On Fri, 13 Apr 2012 08:53:56 -0700, Gene Wirchenko wrote:

    > On Thu, 12 Apr 2012 17:43:57 -0400, richard <>
    > wrote:
    >
    > [snip]
    >
    >>Tried that as well with the same errors.
    >>I use <p> like a div. Because of the formatting properties.
    >>Which helps in avoiding to use excessive br's.

    >
    > I had no idea that there was a limit.
    >
    > More <br> tags for the rest of us.
    >
    > Sincerely,
    >
    > Gene Wirchenko


    well yeah there is kind of. when you run out of memory you've reached the
    limit.
    richard, Apr 13, 2012
    #15
  16. On Fri, 13 Apr 2012 14:35:26 -0400, richard wrote:

    >>>Tried that as well with the same errors. I use <p> like a div. Because
    >>>of the formatting properties. Which helps in avoiding to use excessive
    >>>br's.


    >> I had no idea that there was a limit.
    >> More <br> tags for the rest of us.


    > well yeah there is kind of. when you run out of memory you've reached
    > the limit.


    If you're hitting a memory limit in a browser with <br> tags, using more
    sets of <p></p> isn't going to fix it.

    Instead of making html up as you go along (are you sure you're not aka
    darkman aka hot-text) why don't you try using the same definitions as the
    rest of us.

    Although that would make the group less amusing to read, it might save
    some keyboards and screens from being covered in coffee splutters at the
    latest examples of your idiocy.

    Rgds

    Denis McMahon
    Denis McMahon, Apr 13, 2012
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jstack
    Replies:
    1
    Views:
    603
    Tor Iver Wilhelmsen
    Jul 4, 2003
  2. kishan bisht

    struts tag inside a tag

    kishan bisht, Jul 8, 2003, in forum: Java
    Replies:
    1
    Views:
    1,484
    Wendy S
    Jul 9, 2003
  3. shahbaz
    Replies:
    0
    Views:
    899
    shahbaz
    Oct 27, 2003
  4. RC
    Replies:
    2
    Views:
    426
    Malte
    May 10, 2005
  5. shruds
    Replies:
    1
    Views:
    783
    John C. Bollinger
    Jan 27, 2006
Loading...

Share This Page