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>
相关推荐
小赵同学WoW26 分钟前
1-2 TypeScript 中的 `any` 与 `unknown`
前端
six_38 分钟前
C# 上位机(持续更新中)
前端·面试·c#
风雨_38 分钟前
Git Worktree sourcetree完整使用指南
前端
半个落月1 小时前
React 组件通信进阶:useContext 与自定义 Hook 实战详解
前端·react.js
用户921080262861 小时前
ChatComposer 输入区改造:基于技能市场实现 Agent 输入框
前端
用户45989204565161 小时前
一套 KMP 多仓库版本治理工作流:用 Version Catalog + CI 把发版流水线自动化
前端·kotlin
小赵同学WoW1 小时前
1-4 TypeScript 中的 `number`、`bigint` 与 `string`
前端
小赵同学WoW1 小时前
1-3 `boolean` 与字面量类型
前端
光影少年1 小时前
react navite 长列表优化:FlatList / SectionList 原理与优化属性
前端·react native·react.js
cindershade1 小时前
鼠标 3D 倾斜卡片
前端