HTML-04.新浪新闻-标题-超链接

1.超链接

标签:<a>

属性:

href:指定资源访问的url

target:指定在何处打开资源链接

_self:默认值

_blank:在空白页面打开

2.CSS属性

text-decoration:规定添加到文本的修饰,none表示定义标准的文本(无任何修饰)。

color:定义文本的颜色

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>焦点访谈:中国底气 新思想夯实大国粮仓_新浪新闻</title>
    <!-- 
        1.超链接
        标签:<a>
        属性:
            href:指定资源访问的url
            target:指定在何处打开资源链接
                _self:默认值
                _blank:在空白页面打开
        2.CSS属性
        text-decoration:规定添加到文本的修饰,none表示定义标准的文本(无任何修饰)。
        color:定义文本的颜色
    -->
    <style> 
        h1 {
            color: #4D4F53;
        }
        .cls {
            color: #8897BA;
            font-size: 16px;
        }
        a {
            color: #141B23;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <img src="./img/news_logo.png" > <a href="https://gov.sina.com.cn/" target="_self">新浪政务</a> >正文
    <h1>  
        焦点访谈:中国底气 新思想夯实大国粮仓
    </h1>
    <hr>
    <span id="time" class="cls">2023年03月02日 21:50</span> <span><a href="https://news.cctv.com/2023/03/02/ARTIUCKFf9kE9eXgYE46ugx3230302.shtml" target="_blank">央视网</a></span>
    <hr>
</body>
</html>
相关推荐
wing98几秒前
Vue3 接入 Google 登录:极简教程
前端·vue.js·google
weixin199701080166 分钟前
货铺头商品详情页前端性能优化实战
java·前端·python
new code Boy43 分钟前
NestJS、Nuxt.js 和 Next.js
前端·后端
进击切图仔1 小时前
执行 shell 脚本 5 种方式对比
前端·chrome
局i1 小时前
React 简单地图组件封装:基于高德地图 API 的实践(附源码)
前端·javascript·react.js
执行部之龙1 小时前
AI对话平台核心技术解析
前端
yuki_uix1 小时前
防抖(Debounce):从用户体验到手写实现
前端·javascript
HelloReader1 小时前
Flutter 进阶 UI搭建 iOS 风格通讯录应用(十一)
前端
张元清1 小时前
每个 React 开发者都需要的 10 个浏览器 API Hooks
前端·javascript·面试
HelloReader1 小时前
Flutter ListenableBuilder让界面自动响应数据变化(十)
前端