I am working with this Web Page for improving my programming skills:
我正在使用这个网页来提高我的编程技能:
http://www.studenti.ict.uniba.it/esse3/ListaAppelliOfferta.do
If you take a look at its source code, you can see HTML peculiar tags like
如果您查看它的源代码,您可以看到HTML特有的标记,比如
<head> <body> <title>
The question is: I am quite sure this page is not in XML, so is it simple HTML or XHTML?
问题是:我很确定这个页面不是XML,所以它是简单的HTML还是XHTML?
According to my knowledge those two are quite similar.
据我所知,那两个很相似。
How can I tell which of the two it is? If I must choose I'd say simple HTML (5 or 4) but I am not 100% sure!
我怎么知道是哪一个呢?如果我一定要选择的话,我会选择简单的HTML(5或4),但我不是100%确定!
2 个解决方案
#1
3
Look for a Doctype
declaration at the very beginning of the document.
在文档的开头查找Doctype声明。
If it is XHTML
, the doctype will look like this:
如果是XHTML, doctype将是这样的:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If it is HTML5
, it will look like this:
如果是HTML5,会是这样的:
<!DOCTYPE html>
See the W3 Spec for information on Doctype. More information here at the Mozilla Developer Network, too.
有关Doctype的信息,请参阅W3规范。更多信息请访问Mozilla开发人员网络。
The Website you linked has <!DOCTYPE html>
declared, which instructs the browser to interpret the document as HTML5 markup.
你链接的网站有 ,指示浏览器将文档解释为HTML5标记。
#2
1
The <!DOCTYPE html>
declaration indicates that it is HTML5. Of course, it might not actually be HMTL5, but it's claiming that it is. The only way to be sure is to run it through an HTML5 validator.
< !DOCTYPE html>声明表明它是HTML5。当然,它可能不是HMTL5,但它声称它是。唯一可以确定的方法是通过HTML5验证器运行它。
#1
3
Look for a Doctype
declaration at the very beginning of the document.
在文档的开头查找Doctype声明。
If it is XHTML
, the doctype will look like this:
如果是XHTML, doctype将是这样的:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If it is HTML5
, it will look like this:
如果是HTML5,会是这样的:
<!DOCTYPE html>
See the W3 Spec for information on Doctype. More information here at the Mozilla Developer Network, too.
有关Doctype的信息,请参阅W3规范。更多信息请访问Mozilla开发人员网络。
The Website you linked has <!DOCTYPE html>
declared, which instructs the browser to interpret the document as HTML5 markup.
你链接的网站有 ,指示浏览器将文档解释为HTML5标记。
#2
1
The <!DOCTYPE html>
declaration indicates that it is HTML5. Of course, it might not actually be HMTL5, but it's claiming that it is. The only way to be sure is to run it through an HTML5 validator.
< !DOCTYPE html>声明表明它是HTML5。当然,它可能不是HMTL5,但它声称它是。唯一可以确定的方法是通过HTML5验证器运行它。