0

我有一个 Razor 布局 MVC3 页面,如下所示:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<style "text/css">
</style>
</head>

在单词“style”之后和单词 text 下,它显示了一个语法错误,上面写着:元素文本已过时或不标准。一切仍然有效,但我只是想知道为什么会出现错误。不确定,但我认为它来自 ReSharper。在版本 6 之前,我不记得看到此消息。

4

2 回答 2

2

我想你错过了type.

<style type="text/css">
于 2011-08-02T13:17:18.390 回答
1

你错过了type.

<HEAD>
 <STYLE type="text/css">
  H1 {border-width: 1; border: solid; text-align: center}
 </STYLE>
</HEAD>

http://www.w3.org/TR/html4/present/styles.html#h-14.2.2

于 2011-08-02T13:17:31.813 回答