美文网首页
HTML-01. 一个简单例子

HTML-01. 一个简单例子

作者: RaoZC | 来源:发表于2020-10-09 15:04 被阅读0次

HTML是HyperText Markup Language的简写,指的是超文本标记语言。HTML不是编程语言,而是一种标记语言。使用标记标签来描述网页。
HTML简单实例

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Notch signaling pathway</title>
    <base href="http://www.runoob.com/images/" target="_blank">
    <link rel="stylesheet" type="text/css" href="mystyle.css">
    <style type="text/css">
        body {background-color:yellow}
        p {color:blue}
    </style>
</head>

<body>
    <h1>Notch signaling pathway</h1>
    <p>The Notch signaling pathway is a highly conserved cell signaling system present in most animals.[1] Mammals possess four different notch receptors, referred to as NOTCH1, NOTCH2, NOTCH3, and NOTCH4.[2] The notch receptor is a single-pass transmembrane receptor protein. It is a hetero-oligomer composed of a large extracellular portion, which associates in a calcium-dependent, non-covalent interaction with a smaller piece of the notch protein composed of a short extracellular region, a single transmembrane-pass, and a small intracellular region.[3]</p>
    <!--annotation-->
    <p>Notch signaling promotes proliferative signaling during neurogenesis, and its activity is inhibited by Numb to promote neural differentiation. It plays a major role in the regulation of embryonic development.</p>
    <br>
    <h4>References</h4>
    <a href="https://en.wikipedia.org/wiki/Notch_signaling_pathway">Wiki</a>

    <img loading="lazy" src="C:/Users/Administrator/Desktop/1.jpg" width="258" height="139"/>
</body>

</html>

解释:

<!DOCTYPE html>

声明为 该文档为HTML文档

<html>...</html>

是HTML的根元素

<head>...</head>

包含了文档的头部标签元素,可以插入脚本(scripts), 样式文件(CSS),及各种meta信息。可以添加在头部的元素标签为:

  • <meta>:<meta>标签描述了一些基本的元数据。元数据也不显示在页面上,但会被浏览器解析。META 元素通常用于指定网页的描述,关键词,文件的最后修改时间,作者,和其他元数据。元数据可以使用于浏览器(如何显示内容或重新加载页面),搜索引擎(关键词),或其他Web服务。中文网页必须定义:charset="utf-8"
  • <title>...</title>:描述了文档的标题,在标签中显示。
  • <style>:定义了HTML文档的样式文件引用地址。
  • <link>:定义了文档与外部资源之间的关系,通常用于链接到样式表。
  • <base>:描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接

<body>...</body>

定义主体部分:

  • <h1>...</h1>:定义第一大标题,标题可以用<h1>~<h6>来定义
  • <p>...</p>:定义一个段落
  • <br >:折行
  • <a href="">...</a>:加入一个链接
  • <img src="" width="" height=""/>:引入一张图片

相关文章

网友评论

      本文标题:HTML-01. 一个简单例子

      本文链接:https://www.haomeiwen.com/subject/ohslpktx.html