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>
相关推荐
a1117764 小时前
医院挂号预约系统(开源 Fastapi+vue2)
前端·vue.js·python·html5·fastapi
0思必得04 小时前
[Web自动化] Selenium处理iframe和frame
前端·爬虫·python·selenium·自动化·web自动化
行走的陀螺仪6 小时前
uni-app + Vue3编辑页/新增页面给列表页传参
前端·vue.js·uni-app
We་ct7 小时前
LeetCode 205. 同构字符串:解题思路+代码优化全解析
前端·算法·leetcode·typescript
2301_812731418 小时前
CSS3笔记
前端·笔记·css3
ziblog8 小时前
CSS3白云飘动动画特效
前端·css·css3
越努力越幸运5088 小时前
CSS3学习之网格布局grid
前端·学习·css3
半斤鸡胗8 小时前
css3基础
前端·css
ziblog8 小时前
CSS3创意精美页面过渡动画效果
前端·css·css3
akangznl8 小时前
第四章 初识css3
前端·css·css3·html5