1、HTML基础学习 第一天_html/css_WEB-ITnose
1、基本标签属性
1 <html> 2 <!--属性和属性值对大小写不敏感。 3 不过,万维网联盟在其 HTML 4 推荐标准中推荐小写的属性/属性值。 4 而新版本的 (X)HTML 要求使用小写属性。 5 --> 6 7 <body> 8 9 <!-- hello this is a comment-->10 11 <h1 id="This-is-heading">This is heading 1</h1>12 <h2 id="This-is-heading">This is heading 2</h2>13 <h3 id="This-is-heading">This is heading 3</h3>14 <h4 id="This-is-heading">This is heading 4</h4>15 <h5 id="This-is-heading">This is heading 5</h5>16 <h6 id="This-is-heading">This is heading 6</h6>17 18 <hr><!--绘制水平线-->19 20 <a href="http://www.baidu.com"> link_baidu </a>21 22 <br>23 <body bgcolor="#e6e6e6">24 25 26 <p> this is paragraph 1 </p>27 <p> this is paragraph 2 </p>28 <p> this is paragraph 3 </p>29 30 <img src="/static/imghw/default1.png" data-src="/i/eg_w3school.gif" class="lazy"/ alt="1、HTML基础学习 第一天_html/css_WEB-ITnose" >31 <img src="/static/imghw/default1.png" data-src="/i/eg_w3school.gif" class="lazy" style="max-width:90%" style="max-width:90%" / alt="1、HTML基础学习 第一天_html/css_WEB-ITnose" >32 <br/>33 <br/>34 <br/>35 36 37 normal38 <br/>39 <b> bold </b>40 <br/>41 <strong> strong </strong>42 <br/>43 <big> big font </big>44 <br/>45 <small> small font </small>46 <br/>47 <i> italic font </i>48 <br/>49 what's the <sub> fuck </sub>50 <br/>51 what's the <sup> fuck </sup>52 <br/>53 <i> what's the <sup> fuck </sup> </i>54 55 <p>pre 标签很适合显示计算机代码:</p>56 57 <pre class="brush:php;toolbar:false">58 for i = 1 to 1059 print i60 next i61
2、始终为属性值加引号
属性值应该始终被包括在引号内。双引号是最常用的,不过使用单引号也没有问题。
在某些个别的情况下,比如属性值本身就含有双引号,那么您必须使用单引号
3、h标签只用于标题
请确保将 HTML heading 标签只用于标题。不要仅仅是为了产生粗体或大号的文本而使用标题。
搜索引擎使用标题为您的网页的结构和内容编制索引。
4、HTML 折行
如果您希望在不产生一个新段落的情况下进行换行(新行),请使用
标签
5、
还是
您也许发现
与
很相似。
在 XHTML、XML 以及未来的 HTML 版本中,不允许使用没有结束标签(闭合标签)的 HTML 元素。
即使
在所有浏览器中的显示都没有问题,使用
也是更长远的保障。
6、计算机输出标签
1 <br /> 2 <code>Computer code </code> 3 <br /> 4 <kbd>Keyboard input </kbd> 5 <br /> 6 <tt>Teletype text </tt> 7 <br /> 8 <samp>Sample text</samp> 9 <br />10 <var>Computer variable</var>11 <br />
7、地址输入
1 <address>2 Written by <a href="mailto:webmaster@example.com">Donald Duck</a>.<br> 3 Visit us at:<br>4 Example.com<br>5 Box 564, Disneyland<br>6 USA7 </address>
8、文字方向
<p>如果您的浏览器支持 bi-directional override (bdo),下一行会从右向左输出 (rtl);</p><bdo dir="rtl">Here is some Hebrew text</bdo>
9、块引用
1 这是长的引用: 2 <blockquote> 3 这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。这是长的引用。 4 </blockquote> 5 6 这是短的引用: 7 <q> 8 这是短的引用。 9 </q>10 11 <p>12 使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现。13 </p>
10、格式化总结
文本格式化标签
标签 | 描述 |
定义粗体文本。 | |
定义大号字。 | |
定义着重文字。 | |
定义斜体字。 | |
定义小号字。 | |
定义加重语气。 | |
定义下标字。 | |
定义上标字。 | |
定义插入字。 | |
定义删除字。 | |
不赞成使用。使用 | |
不赞成使用。使用 | |
不赞成使用。使用样式(style)代替。 |
“计算机输出”标签
标签 | 描述 |
定义计算机代码。 | |
定义键盘码。 | |
定义计算机代码样本。 | |
定义打字机代码。 | |
定义变量。 | |
Copy after login | 定义预格式文本。 |
|
不赞成使用。使用 代替。 Copy after login Copy after login Copy after login |
不赞成使用。使用 代替。 Copy after login Copy after login Copy after login | |
|
不赞成使用。使用 代替。 Copy after login Copy after login Copy after login |
引用、引用和术语定义
标签 | 描述 |
定义缩写。 | |
定义首字母缩写。 | |
定义地址。 | |
定义文字方向。 | |
定义长的引用。 | |
定义短的引用语。 | |
定义引用、引证。 | |
定义一个定义项目。 |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.
