HTML知识集锦
常用代码片段
HTML Head标签
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!-- 内容类型声明 --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!--样式表--> <style type="text/css"> <!-- body { margin: 0; padding: 0; } --> </style> <!--外联样式表--> <link rel="stylesheet" type="text/css" href="style.css" /> |
嵌入Flash影片
1 2 3 4 5 6 7 8 9 10 11 12 |
<object id="FlashID" width="50" height="50" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="flash-file.swf" /> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="flash-file.swf" width="50" height="50"> <!--<![endif]--> <param name="quality" value="high" /> <param name="wmode" value="transparent" /> <!--[if !IE]>--> </object> <!--<![endif]--> |
内容安全策略(CSP,Content Security Policy)是一个附加的安全层,用于帮助检测和缓解某些类型的攻击,包括跨站脚本(XSS)和数据注入等攻击。
使用标签 属性的格式为:
策略指令
使用策略指令可以在多种策略范围配置安全策略:
策略指令 | 说明 |
default-src | 定义了那些没有被更精确指令指定的安全策略,相当… |
21 years ago
0