整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:

话说前端(1)-前端a标签的使用

话说前端(1)-前端a标签的使用

击蓝字 关注我们


分享兴趣,传播快乐,增长见闻,留下美好!亲爱的您,这里是Learning yard新学苑。今天小编为大家带来《a标签的使用方法》。

Share interest, spread happiness, increase knowledge, and leave behind beauty! Dear you, this is Learning yard New Academy. Today, Xiaobian brings you "How to Use A Label".

前端网页的打开方式:

一般用标签a来引用例如<a href=”#”></a>填写#的地方就是你需要跳转的网站例如:

How to open the front page:

Generally, web pages are quoted by the label A, for example < a href="#" > </a > The place where # is filled in is the website you need to jump to, for example:


标签中间写字,就可以得到以下效果:

里头的字默认就是蓝色,有下划线。当然字体也可以调整可以通过css里的text-decoration:none,来取消下划线,通过color来调整字体颜色。代码效果如下

The words in it are blue by default and underlined. Of course, the font can also be adjusted. You can cancel the underline by text-decoration: none in css, and adjust the font color by color. The code effect is as follows


咱们再回到网站最重要的一点就是打开方式,用target来引用,样式为<a href=”#” target=””></a>,其中有blank,在新的一个页面打开,self,在本页面打开(默认为)parent(在a里面打开,以后知识齐全再讲)以及top 和framename最常用的就是前两个。

Let's go back to the website's most important point, which is how to open it. Use target to quote it, and the style is < a href="#" target="> </a >, among which blank, open on a new page, self, open on this page (default is) parent (open in A, we'll talk about it later), top and framename, and the most commonly used ones are the first two.

总结如下:

Summarize as follows:

今天的分享就到这里了。如果您对今天的文章有什么独特的想法,欢迎评论留言,让我们相约明天,祝您今天过得开心快乐!

That's it for today's sharing. If you have any unique ideas for today's article, please leave a comment, let us meet tomorrow, I wish you a happy day!

LearningYard学苑

分享兴趣,传播快乐,增长见闻,留下美好!少年易老学难成,一寸光阴不可轻

本文由learningyard新学苑原创,如有侵权,请联系删除。

翻译来源:谷歌翻译

排版:李仕阳

文本:李仕阳

审核:闫庆红

过web前端开发的都知道,每个标签都自带样式,比如body自带margin,a标签自带下划线,li标签自带小圆点,但是你知道更具体的吗?以下的文档还原了w3c对每个标签最初的定义,收藏一下,对你一定有帮助。

@charset "utf-8";/*@charset "gb2312";*//**
*============================================================================* 版权所有: 切版
* 网站地址: http://www.qieban.cn
* 该文件为W3C为标签赋予最原始样式规则、制作参考无实际作用
* ----------------------------------------------------------------------------
**/ 
html, address, blockquote, body, dd, div, dl, dt, fieldset, form, frame, frameset, h1, h2, h3, h4, h5, h6, noframes, ol, p, ul, center, dir, hr, menu, pre { display: block } li { display: list-item } head { display: none } table { display: table } tr { display: table-row } thead { display: table-header-group } tbody { display: table-row-group } tfoot { display: table-footer-group } col { display: table-column } colgroup { display: table-column-group } td, th { display: table-cell } caption { display: table-caption } th { font-weight: bolder; text-align: center } caption { text-align: center } body { margin: 8px } h1 { font-size: 2em; margin: .67em 0 } h2 { font-size: 1.5em; margin: .75em 0 } h3 { font-size: 1.17em; margin: .83em 0 } h4, p, blockquote, ul, fieldset, form, ol, dl, dir, menu { margin: 1.12em 0 } h5 { font-size: .83em; margin: 1.5em 0 } h6 { font-size: .75em; margin: 1.67em 0 } h1, h2, h3, h4, h5, h6, b, strong { font-weight: bolder } blockquote { margin-left: 40px; margin-right: 40px } i, cite, em, var, address { font-style: italic } pre, tt, code, kbd, samp { font-family: monospace } pre { white-space: pre } button, textarea, input, select { display: inline-block } big { font-size: 1.17em } small, sub, sup { font-size: .83em } sub { vertical-align: sub } sup { vertical-align: super } table { border-spacing: 2px; } thead, tbody, tfoot { vertical-align: middle } td, th { vertical-align: inherit } s, strike, del { text-decoration: line-through } hr { border: 1px inset } ol, ul, dir, menu, dd { margin-left: 40px } ol { list-style-type: decimal } ol ul, ul ol, ul ul, ol ol { margin-top: 0; margin-bottom: 0 } u, ins { text-decoration: underline } br:before { content: "\A" } :before, :after { white-space: pre-line } center { text-align: center } :link, :visited { text-decoration: underline } :focus { outline: thin dotted invert } /* Begin bidirectionality settings (do not change) */ BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } *[DIR="ltr"] { direction: ltr; unicode-bidi: embed } *[DIR="rtl"] { direction: rtl; unicode-bidi: embed } @media print { h1 { page-break-before: always } h1, h2, h3,
h4, h5, h6 { page-break-after: avoid } ul, ol, dl { page-break-before: avoid } }

切版,切图网旗下靠谱的web前端外包服务切图客群体。http://www.qieban.cn/

作为一个零基础入门的小白,应该先从基本的html标签开始认起。熟悉后再进行下一步学习。

HTML 标题

HTML 标题(Heading)是通过 <h1> - <h6> 等标签进行定义的。

<h1>www.861lll.com</h1>

HTML 段落

HTML 段落是通过 <p> 标签进行定义的。

<p>www.861lll.com</p>

HTML 链接

HTML 链接是通过 <a> 标签进行定义的。

<a href="http://www.861lll.com">www.861lll.com</a>

HTML 图像

HTML 图像是通过 <img> 标签进行定义的。

<img src="http://www.861lll.com" width="104" height="142" />
  • HTML 元素以开始标签起始
  • HTML 元素以结束标签终止
  • 元素的内容是开始标签与结束标签之间的内容
  • 某些 HTML 元素具有空内容(empty content)
  • 空元素在开始标签中进行关闭(以开始标签的结束而结束)
  • 大多数 HTML 元素可拥有属性