HTML & CSS 学习总结

HTML是超文本标记语言(HyperText Markup Language)的缩写,是为“网页创建和其它可在网页浏览器中看到的信息”设计的一种标记语言,构成 Web 世界的一砖一瓦。它定义了网页内容的含义和结构。HTML 不是一门编程语言,而是一种用于定义内容结构的标记语言

HTML 结构大概如下:

<!DOCTYPE html>

<html>

<head>

  <meta charset="utf-8">

  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">

  <title>页面标题</title>//标题

</head>

<body>

  <h1>我的第一个Web页</h1>

  <p>helloworld!</p>

</body>

</html>

HTML 的文本格式如下:

<p>You can use the mark tag to <mark>highlight</mark> text.</p>//强调

<p><del>This line of text is meant to be treated as deleted text.</del></p>//横线

<p><s>This line of text is meant to be treated as no longer accurate.</s></p>//横线

<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>//补充

<p><u>This line of text will render as underlined</u></p>//下划线

<p><small>This line of text is meant to be treated as fine print.</small></p>//精细打印

<p><strong>This line rendered as bold text.</strong></p>//粗体

<p><em>This line rendered as italicized text.</em></p>//斜体

HTML 的超链接格式如下:

<a href="你想加入的网站">网站名</a>

网页中的图片使用这种方法进行存储:

<img src="图片地址" alt="MDB Logo" width="宽度" height="高度">

而CSS 是级联样式表(Cascading Style Sheets)的缩写。HTML 用于撰写页面的内容,而 CSS 将决定这些内容该如何在屏幕上呈现。

CSS 语法:

选择器+{声明}

例如:

p{color:red;text-align:center;}//红色居中;

CSS可以控制文本的颜色、尺寸、整齐度、边框、定位、溢出、浮动、不透明度;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值