HTML----基础语句

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/BODOA/article/details/79900552
添加链接标签:
<a href="http://www.runoob.com">html</a>
网页打开默认方式为在本网页打开,属性target定义打开方式,_blank表示新的窗口打开
<a href="http://www.runoob.com/" target="_blank">访问菜鸟教程!</a>


添加图片标签:

<img src="/images/logo.png" width="500" height="39" />


换行标签:

<br />


水平线标签:

<hr />


加粗、斜体和上下标标签

<b>加粗文本</b><br><br>
<i>斜体文本</i><br><br>
这是 <sub> 下标</sub> 和 <sup> 上标</sup>


对空行及空格进行规定标签:

<pre>
此例演示如何使用 pre 标签
对空行和    空格
进行控制    123
</pre>


扫描二维码关注公众号,回复: 3723410 查看本文章

格式化html地址标签:

<address>
Written by <a href="mailto:[email protected]">Jon Doe</a>.<br> 
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>

 

控制文字方向标签:

<p><bdo dir="ltr">该段落文字从左到右显示。</bdo></p>  
<p><bdo dir="rtl">该段落文字从右到左显示。</bdo></p>  


块应用标签(说话加封号)

<p>WWF's goal is to: 
<q>Build a future where people live in harmony with nature.</q>
We hope they succeed.</p>


显示去处文字标签:

<del> </del>


创建图片链接:(border :边框,src:图片所在文件位置,alt:图片加载不出显示的文本信息...)

<p>创建图片链接:
 <a href="http://www.runoob.com/html/html-tutorial.html">
 <img  border="1" src="smiley.gif" alt="HTML 教程" width="32" height="32">
 </a>
</p>


在当前页面链接制定位置(链接):

<p>
<a href="#C4">查看章节 4</a>
</p>
<h2><a id="C4">章节 4</a></h2>
<p>这边显示该章节的内容……</p>







猜你喜欢

转载自blog.csdn.net/BODOA/article/details/79900552
今日推荐