html里的option错误


问题: 

myeclipse里面html代码 

<option value='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'>HTML 4.01 Frameset</option> 

报错 
Multiple annotations found at this line: 
- Invalid location of tag (HTML). 
- Start tag (<option>) not closed. 
- Invalid character used in text string ('>HTML 4.01 
Frameset). 

Start tag (<option>) not closed. 


单引号和双引号互换也不行 



解决办法: 

转义 

小于号的转义字符为&lt; 
大于号的转义字符为&gt; 
将<换为&lt,将>换为&gt即可。。。。
原文地址:https://www.cnblogs.com/yigerendehaibian/p/2810513.html