基础HTML标签

基础HTML标签

只有<body>...<body>之间的内容会被显示出来。Only the content inside the <body> section is displayed in a browser.

标签 描述
<!DOCTYPE> 定义文档格式 defines file type
<html> 定义HTML文档 This is the root element of an HTML page. The HTML document itself begins with <html> and ends with </html>.
<!DOCTYPE html> 所有HTML文档必须使用的定义
<head> A container for all the head elements (title, scripts, styles, meta information, and more) --> contains meta information about the document
<title> 定义文档标题,标题可以用来呈现文档结构 specifies a title for the document
<body> 定义文档的主体 contains the visible page content
<h1> to <h6> 定义 HTML 标题 defines headings
<p> 定义段落 defines a paragraph
<br> or <br /> 定义简单的折行,前者适用于HTML,严格的写法为后者,XHTML无法显示前者 Inserts a single line break
<!--...--> <!-- 这是一个注释 --> 定义注释
<hr> 定义简单的水平线、分割线 It defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.

The HTML <head> element has nothing to do with HTML headings.
The <head> element is a container for metadata. HTML metadata is data about the HTML document. Metadata is not displayed.
Note: Metadata typically define the document title, character set, styles, links, scripts, and other meta information.

HTML Comment Tags


<!-- This is a comment -->

<p>This is a paragraph.</p>

<!-- Remember to add more information here -->

Comments are also great for debugging HTML, because you can comment out HTML lines of code, one at a time, to search for errors:

<!-- Do not display this at the moment
<img border="0" src="pic_trulli.jpg" alt="Trulli">
-->

关于HTML标签

  • HTML tags normally come in pairs like <p> and </p>
  • The first tag in a pair is the start tag/opening tag, the second tag is the end tag/closing tag
  • The end tag is written like the start tag, but with a forward slash inserted before the tag name

浏览器的作用是什么?

读取并显示HTML文档 The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.

基本HTML编辑器

保存记事本要注意格式和语言 Name the file "index.htm" or "index.html" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).
You can use either .htm or .html as file extension. There is no difference, it is up to you.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,168评论 0 10
  • LUBOV 今天下午刷歌听到了一句歌词“我们坐在甲板上唱着歌,背靠着背看日落”,瞬间被温暖到。传说中的18岁,悄无...
    小旦子阅读 3,308评论 0 0
  • 和胖达爸爸去办公室拿东西,胖达爸爸非要在办公室睡一觉,于是我趁机上网买了好多东西。
    礽哥儿阅读 1,288评论 0 0
  • Android Studio常用快捷键整理 一、运行与调试:①运行:shift + F10②调试:shift + ...
    码客_Yang阅读 3,421评论 0 1
  • 我知道爱如同对虚空呐喊,而且必然被遗忘,我们的命运已注定,有一天,所有辛苦都会化为灰烬,我也知道太阳会吞没唯一的地...
    鱼丸的尾巴阅读 4,379评论 0 0

友情链接更多精彩内容