HTML

1.标题很重要

    请确保将 HTML heading 标签只用于标题。不要仅仅是为了产生粗体或大号的文本而使用标题。

搜索引擎使用标题为您的网页的结构和内容编制索引。

2.带有可点击区域的图像映射(延伸开来可以做成一个类似于数据地图):
    <img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" />

   <map name="planetmap" id="planetmap">
      <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />
      <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />
      <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" />
   </map>

注释:area 元素永远嵌套在 map 元素内部。area 元素可定义图像映射中的区域。

注释:<img>中的 usemap 属性可引用 <map> 中的 id 或 name 属性(取决于浏览器),所以我们应同时向 <map> 添加 id 和 name 属性。

思路:可以去掉链接,然后加上事件监听,再做处理

3.base标签让整个页面所有链接变得简约
   <head>
     <base href="http://www.mytest.com/all/" />
     <base target="_blank" />
   </head>

如此一来:
1.<img src="eg_smile.gif" />  图片就可以直接定位到:http://www.mytest.com/all/eg_smile.gif
2.<a href="http://www.w3school.com.cn"> 这个a链接就会在新的窗口中打开

你可能感兴趣的:(html)