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>
相关推荐
LFly_ice13 分钟前
学习React-22-Zustand
前端·学习·react.js
东华帝君29 分钟前
vue3自定义v-model
前端
fruge1 小时前
搭建个人博客 / 简历网站:从设计到部署的全流程(含响应式适配)
前端
光影少年1 小时前
css影响性能及优化方案都有哪些
前端·css
呆呆敲代码的小Y1 小时前
2025年多家海外代理IP实战案例横向测评,挑选适合自己的
前端·产品
q***3751 小时前
爬虫学习 01 Web Scraper的使用
前端·爬虫·学习
v***5651 小时前
Spring Cloud Gateway
android·前端·后端
b***59432 小时前
分布式WEB应用中会话管理的变迁之路
前端·分布式
q***21602 小时前
Spring Boot项目接收前端参数的11种方式
前端·spring boot·后端
顾安r2 小时前
11.21 脚本 网页优化
linux·前端·javascript·算法·html