Chapter 1 HTML language text elements 1.4 basis

1.4 text elements

HTML text in the document content elements include title, text decoration and special characters.

1.4.1 Title Tag

Examples

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>漫步时尚广场 E&amp;S</title>
	</head>
	<body>
		<h1>一级标题——漫步时尚广场</h1>
		<h2>二级标题——Q-Walking Fashion E&S</h2>
		<h3>三级标题——购物广场</h3>
		<h4>四级标题——男装区</h4>
		<h5>五级标题——上衣区</h5>
		<h6>六级标题——衬衣</h6>
	</body>
</html>

Renderings

note

<Hn> tag is a ditag. By default, the reality in most browsers <h1>, <h2>, <h3> element content is greater than the text on the page in the default size, <h4> default text size and content of the element is basically the same, but < content h5> and <h6> elements smaller number. The special needs of users can be defined style features titles by CSS.


1.4.2 modified text label

Commonly used font tags
label description
<font>···</font> Font style setting for the text
<b>···</b> Content of elements displayed in bold, the same effect as <strong> tag
<i>···</i> Content elements shown in italics manner
<s>···</s> Content elements will be added with a line
<u>···</u> Content elements will be added an underscore
<sup>···</sup> In superscript form content elements displayed
<sub>···</sub> The following content elements form the subject of the show
<strong>···</strong> Content of elements displayed in bold, the same effect as <b> tag
<big>···</big> Content elements in the display than the text around a large font size
<small>···</small> When the content of elements in the display is smaller than the surrounding text of a font size

note

HTML 5 is the <strong> tag adds semantics, using the <strong> tag to wrap the text representation of important text. HTML 5 deleted the original <big> tag, and <small> tags redefine used to identify so-called "Boy printed", usually used to mark such considerations, legal requirements, disclaimers or copyright-related declarative character.

Examples

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>漫步时尚广场战略发布会-文本修饰标签</title>
	</head>
	<body>
		<font face="隶书" size="10" color="blue">通过font标签设置字体的样式</font>
		<font face="楷体" size="+3" color="#FF0000">通过font标签设置字体的样式</font>
		<font face="黑体" size="-1" color="gray">通过font标签设置字体的样式</font>
		
		<p>2015年1月11日,<b>漫步时尚广场</b>在<big>青岛</big>举行战略发布会。时尚广场总裁<i>郭总</i>
	介绍,取这个名字一方面是打造<small>休闲娱乐</small>的时尚购物广场,更重要的原因是随着B2C的发展,消费者
	需要全新的电子商务品台。漫步时尚广场从传统的V<sub>1.0</sub>向综合性互联网V<sup>2.0</sup>转型。
	<s>时尚购物广场将提供这样一个定位和风格更加清晰的消费品台,全力打造的品质之城。</s></p>
	</body>
</html>

Renderings

note

Since the modified text label set the font style, text content and style embedded together, post code maintenance inconvenient, so the design of the page, with text labels modified as little as possible, it is recommended to use more CSS style landscaping.


1.4.3 Special characters

Common entity reference
Special characters Entity Reference
Double quotes(") $quot;
&number &amp;
Blank &nbsp;
Less than (<) &lt;
Greater than (>) &gt;
Less than or equal (≤) &le;
Greater than or equal (≥) &ge;
No. Copyright (©) &copy;
Trademark symbol (™) &trade;
Registered trademark (®) &reg;
Fraction (1/4) &frac14;
Fraction (1/2) &frac12;
Left Arrow (←) &larr;
Arrow (↑) &uarr;
Right arrow (→) & Rarr;
Down arrow (↓) &darr;
Left and right arrows (↔) &harr;
Lower left arrow (↙) &crarr;
Left double arrow &lArr;
Double arrow &uArr;
Right double arrow & RArr;
Double arrow &dArr;
Intersection (∩) &cap;
Union (∪) &cup;

 

Published 35 original articles · won praise 5 · Views 876

Guess you like

Origin blog.csdn.net/m0_43443133/article/details/104324036