URLs in doctype and html tags

5
1) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

2) <html xmlns="http://www.w3.org/1999/xhtml">

With HTML5 the use of URLs in the <!DOCTYPE html> and <html> -% tags was removed, but for each Doctype type there was a different URL as well as html .

What was the real purpose of the URLs in the cited tags?

    
asked by anonymous 12.05.2015 / 00:23

1 answer

3

HTML is a language that DERIVED from SGML. Before HTML5, HTML conventions tried to maintain the same SGML standards, making an HTML file at one and the same time an SGML file. However, with the popularity of HTML (which by then was the most widely used SGML format in the world), in order to "make life easier" for developers, browsers became increasingly flexible with HTML syntax.

As the guiding principles for HTML5 development were compatibility, usability, and interoperability, the discussion on language flexibility was opened, resulting in a language close to SGML, but with a few "twigs."

Although it seems unrepresentative, these changes contribute to the reduction of traffic and simplify the language, making it less stringent.

As for your doubt:

1. DOCTYPE

A well-defined SGML file, which contains an information called a DTD (Document Type Definition (DTD)). This information defines and validates the structure, elements, and attributes present in an XML file and is defined through declaration.

The DTD can be completely defined within the SGML file or can be referenced. In the case of HTML the most common (perhaps exclusive) practice was to refer to this DTD.

Over time, the HTML language was maturing and some elements were being incorporated and even modified, and it is necessary to define variations of the available structures.

To see the list of most common claims and their main features see: link

After much discussion on the structure of HTML5, W3C defined HTML as a language with its own characteristics, definitively abandoning the SGML standard (although the characteristics are still quite similar). Therefore it was agreed, for compatibility reasons, that the declaration should be used to identify an HTML file. The statement is required in a file. [ link

For more information about DTD: link

2. XMLNS

The XMLNS attribute is used to avoid conflicting element names and attributes in XML files. Remember the XML language derives directly from the SGML language, just as HTML derived. So, unless you're using XHTML, the XMLNS attribute has no effect on HTML. [ link

I hope to have healed your doubt.

    
12.05.2015 / 02:54