Sure, here’s the translation: 在Java Eclipse中的HTML标签

huangapple go评论63阅读模式
英文:

HTML tags in java Eclipse

问题

使用Eclipse/java。一些标签已过时。例如,u,required
找不到如何交换和消除黄色警告

<h1 align="center">欢迎<span style="color:red"> <%=user1 %>访问网站</span></h1>
<hr>
<h2 align="left"><u>介绍:</u></h2>
<h3 style="color:green"><%=intro %></h3>
<hr>
<h2 align="left"><u>爱好:</u></h2>
<h3 style="color:green"><%=hobby %></h3>
英文:

Using Eclipse/java. Some tags obsolete. For example, u, required
Can't find how to exchange and take rid of yellow warnings

&lt;h1 align=&quot;center&quot;&gt;Welcome&lt;span style=&quot;color:red&quot; &gt; &lt;%=user1 %&gt;to the website&lt;/span&gt;&lt;/h1&gt;
       &lt;hr&gt;
       &lt;h2 align=&quot;left&quot;&gt;&lt;u&gt;INTRODUCTION :&lt;/u&gt;&lt;/h2&gt;
       &lt;h3 style=&quot;color:green&quot;&gt;&lt;%=intro %&gt;&lt;/h3&gt;
       &lt;hr&gt;
       &lt;h2 align=&quot;left&quot;&gt;&lt;u&gt;HOBBIES : &lt;/u&gt;&lt;/h2&gt;
       &lt;h3 style=&quot;color:green&quot;&gt;&lt;%=hobby %&gt;&lt;/h3&gt;

答案1

得分: 1

你试图让你的HTML执行CSS设计的任务。你的JSP构建它认为HTML将呈现的外观,并将其转发给用户。因此,用户永远不会看到JSP,只会看到一个HTML页面。因此,当你使用特殊标签时,它们是在服务器上执行并转发给用户。

弃用
https://stackoverflow.com/questions/14551305/align-attribute-deprecated
对齐方式
https://www.w3schools.com/cssref/css3_pr_align-content.asp

英文:

Your trying to make your HTML do what CSS was designed to do. Your JSP builds what it thinks the HTML will look like and forwards that to the user. Thus the user never sees the JSP only an HTML page. So when you use the special tags they are done on the server and forwarded to the user.

Deprecation
https://stackoverflow.com/questions/14551305/align-attribute-deprecated
To align
https://www.w3schools.com/cssref/css3_pr_align-content.asp

huangapple
  • 本文由 发表于 2020年9月28日 22:37:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/64104325.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定