Why do people write HTML like this?

I noticed a lot of people who don't use quotation marks when writing HTML. For example:

<li class=somename>blabla</li>
instead of
<li class="somename">dkdk</li>

Where do they come from?

+3
source share
8 answers

From the HTML 4.01 specification :

In some cases, authors may specify the attribute value without quotation marks. The attribute value can only contain letters (az and AZ), numbers (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58 ) We recommend that you use quotation marks, even if they can be removed.

XHTML XML (. XHTML 1.0: HTML 4 - ).

+8

XHTML ; . XHTML , .

+6

, . , HTML - -. " , ". - , XHTML . , HTML WYSIWYG, , .

0

, , . , . .

0

, , , "" html.

0

, , , W3C (.. ).

, , . . .

0

Many WYSIWYG editors do not add Quotes, IntelliSense in Visual Studio does not add tags, people may wonder what is the point of adding tags if they are not needed. In the end, they also require bandwidth.

I always use Quotes, but there really is no reason to use them except for code, and if you need to use something like class = "two two three".

0
source

Perhaps because its quite normal to be imperfect, but its abnormal to be perfect. Human nature, buddy!

0
source

Source: https://habr.com/ru/post/1704975/


All Articles