문제

What is the main difference between:

<meta charset="UTF-8" />

and

<meta charset="UTF-8">

I understand that this is related to the fact that the tags that are getting /> instead of > don't have closing tags, but what is the benefit of using /> on HTML, PHP and ASP documents?

올바른 솔루션이 없습니다

다른 팁

Not closing tags is now HTML5 valid for void elements (such like img, br...)

<meta charset="UTF-8">

Adding the closing /> is still valid, and in my personal opinion (only personal), it may get deprecated in a near future.

Void elements only have a start tag; end tags must not be specified for void elements.

Reference: W3C

EDIT: Of course, not closing tags is invalid for XHTML

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top