Self-closed tags are not valid HTML syntax. The proper syntax is to leave
off the end tag and leave it at that, which is what Haml does. Haml won't
render invalid HTML. If you want XHTML syntax, use :xhtml as Mislav
suggested.

On Mon, Nov 23, 2009 at 9:51 AM, ludicco <[email protected]> wrote:

> Thanks for the tip Mislav, yes I see your point, but the thing is, if
> it's optional, why not fill this 'optional'?
> or why don't let the user decide if he wants its closed or not (even
> with :autoclose)?
> Particularly I don't see a point in make the closing tag "optional" in
> html5 (I know this is not a haml approach but the markup's), I think
> this tends to causes confusion and this is opposed as 'standard' in my
> opinion.
> I can agree for html4 and older, but now we have more markup standards
> and everything, so why keep using the old way to do it?
> Maybe I'm missing something but I really don't see why you should
> leave something you create opened, or better, whats the side effect of
> closing it?
> If there is a side effect, so I would change my mind on it, otherwise
> I think this is really pointless.
> Again, I'm not sure If I'm missing something about html5 markup style.
> this is just my opinion as HAML could render the tags, helping to
> maintain a 'standard' all over the document
>
> On Nov 23, 2:05 pm, Mislav Marohnić <[email protected]> wrote:
> > On Mon, Nov 23, 2009 at 14:39, ludicco <[email protected]> wrote:
> > > Hello there,
> > > I'm not sure about this, but I'm having problems while using html5 in
> > > haml. It looks like that the input tag is not being closed.
> >
> > Somebody correct me if I'm wrong, but the input tag (like many other
> tags)
> > doesn't have to be closed. In fact, forcing it to render a self-closing
> tag
> > makes no sense unless you're using XHTML.
> >
> > If you want to write your HTML5 with an XHTML syntax, tell Haml to render
> > your templates as ":format => :xhtml" and use "!!! 5" to get a HTML5
> doctype
> > (you need the newest stable version).
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=.


Reply via email to