前端--JavaWeb--HTML(超文本标记语言)笔记

39 阅读1分钟

标题排版

  • 官方文档-w3school 在线教程

  • 文件后缀名为.html

  • 标题标签<1> - <6>

  • 水平分割线<hr>

  • 引入照片 <img src="文件地址"> src/width/height

  • 路径方式

  • 一 绝对路径;

    1 磁盘:属性--安全

    2 网络:右键--新标签中打开--新标签中打开--链接框复制

  • 二 相对路径:

    1 ./:当前路径(./可以省略)

    2 ../:上一级目录

  • ctrl+s

  • img=“” 标签:

    src:照片路径     
    w(px 像素, % 百分比)
    

标题排版

方式一:行内样式

  <h1 style="color: red;">焦点访谈:中国底气 新思想夯实大国粮仓</h1>

方式二:内嵌式

<style> h1{ /* color: red; */ /* color: rgb(255, 0, 0); */ color: #4D4F53; } </style>

方式三:外联式 <link rel="stylesheet" href="相对路径">

标题样式

颜色:color

  • 元素选择器:<spen></spen> spem
  • 类选择器:<spen class="cls"></spen> .cls
  • ID选择器:<spen id="time"></spen> #time

大小:font-size

  • 30px;

image.png

超链接

image.png

正文排版

image.png

image.png

正文布局

11

1

1

1

1

1 1

1

1 1 1

1 1 1

1

1

1

1

1

1

1