Question: Hy guys, is there a difference between `<li>Hello wolrd</li>` and `<li>Hello world`.

Both tags have the same result:

> 
> * Hello world
> 
> 
> 

I know that every tag should have an close tag but I discovered this by mistake. Can anyone tell me the reason?

Answer: 
In HTML some closing tags are optional. `</li>` is one of them.

From [the HTML5 syntax W3C recommendations](http://www.w3.org/TR/html5/syntax.html#optional-tags):

> 
> An li element's end tag may be omitted if the li element is
>  immediately followed by another li element or if there is no more
>  content in the parent element.
> 
> 
>
No, actually there isn't, if you follow the rules described in the spec.

The HTML specification, both [HTML4](http://www.w3.org/TR/html4/index/elements.html) and [HTML5](http://www.w3.org/TR/html5/syntax.html#optional-tags) provide a way to write `<li>` without closing tag, since it can be logically derived from the markup.

The rule is, as pointed out in the HTML spec:

> 
> An `li` element's end tag may be omitted if the `li` element is immediately followed by another `li` element or if there is no more content in the parent element.
> 
> 
>