HTML样式插入、链接、表单标签

HTML样式

1.三种样式插入方法

外部样式表

<link rel = "stylesheet" type = "text/css" href = "***.css">

内部样式表

<style type = "text/css">
    body {back-ground:red}
    p {margin-left:20px}
</style>

内联样式表

<p style = "color:red>

HTML 链接

1.链接数据

文本链接

<a href = "http://www.baidu.com">点击我</a>

图片链接

<a href = "http://www.baidu.com">
       <img src = "**.png">
</a>

2.属性:

href属性:指向另一个文档的链接
name属性:创建文档内的链接

<a name = "tips">hello</a>

<a href = "#tips">跳转到hello</a>

3.img标签属性

alt:替换文本属性
width:宽 height:高

HTML表单常用标签

<input type = "text">
<input type = "password">
<input type = "button" value = "按钮">
<input type = "submit" value = "确定">
<input type = "checkbox">

--- 二选一
<input type = "radio" name = "sex">
<input type = "radio" name = "sex">

--- 下拉选项
<select>
     <option>****</option>
     <option>****</option>
</select>

--- 文本域
<textarea cols = "30"  rows = "30">请在此填写信息</textarea>
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值