Table of Contents
HTML 文本格式化实例
Home Web Front-end HTML Tutorial html基础 中_html/css_WEB-ITnose

html基础 中_html/css_WEB-ITnose

Jun 24, 2016 am 11:16 AM

HTML 文本格式化实例

(我不知道为什么“正常显示文本”这几个字不用加标签,虽然它有在

标签内)

<html><body><b>文本为黑体<br /></b><strong>文本表示强调,强于em,应谨慎使用<br /></strong><big>文本显示大号字体<br /></big><em>表示强调,谨慎使用<br/></em><i>文本以斜体标识<br /></i><small>文本显示小号字体<br /></small>正常显示文本<sub>下脚标</sub><br />正常显示文本<sup>上脚标</sup></body></html>
Copy after login

运行效果:(注:第一排改为:文本黑体)

预文本格式示例:

<html><body><pre class="brush:php;toolbar:false">预格式文本就是保留了     空格以及换行
Copy after login

pre 标签很适合用来装逼:

我闭着眼在白天 和 黑夜我看不见因为我睡不醒。。。
Copy after login

运行效果:

“计算机输出”标签

<html><body><code>显示代码用格式</code><br/><kbd>键盘输入文本显示</kbd><br/><tt>电传文本显示</tt><br/><samp>示例文本显示</samp><br/><var>电脑变量显示</var><br/><hr /><b>注释:</b>为不同属性的文本用不同的标签标识是为了让计算机可以分辨它们的类别</body></html>
Copy after login

运行效果:

地址:

<!DOCTYPE html><html><body><address>Written by <a href="http://www.baidu.com.cn">G-Spider</a><br />访问地址:<br />http://www.G-Spider.com.cn<br/>北京筒子胡同555号<br />中国<br /></address></body></html>
Copy after login

运行效果:

缩写和首字母缩写

<html><body><abbr title="etcetera">etc.</abbr><br /><acronym title="World Wide Web">WWW</acronym><p>在某些浏览器中,当您把鼠标移至缩略词语上时,title 可用于展示表达的完整版本。</p><p>仅对于 IE 5 中的 acronym 元素有效。</p><p>对于 Netscape 6.2 中的 abbr 和 acronym 元素都有效。</p></body></html>
Copy after login

运行效果:

文字方向

<html><body><p>如果您的浏览器支持 bi-directional override (bdo),下一行会从右向左输出 (rtl);</p><bdo dir="rtl">Here is some Hebrew text</bdo></body></html>
Copy after login

运行效果

块引用:

<html><body>这是长的引用:<blockquote>   “最最喜欢你,绿子。” <br />  “什么程度?” <br/>  “像喜欢春天的熊一样。”<br/>  “春天的熊?”绿子再次扬起头,“什么春天的熊?”<br />   “春天的原野里,你一个人正走着,对面走来一只可爱的小熊,浑身的毛活像天鹅绒,眼睛圆鼓鼓的。它这么对你说道:‘你好,小姐,和我一块儿打滚玩好么?’接着,你就和小熊抱在一起,顺着长满三叶草的山坡咕噜咕噜滚下去,整整玩了一大天。你说棒不棒?” <br/>  “太棒了。” <br/>  “我就这么喜欢你。”<br/></blockquote>这是短的引用:<q>一切被颠倒的都会被颠倒回来</q><p>使用 blockquote 元素的话,浏览器会插入换行和外边距,而 q 元素不会有任何特殊的呈现。</p></body></html>
Copy after login

运行效果:

删除字效果和插入字效果:

<html><body><P>第一天的最后一句话:<del>妈的背好疼</del>明天也要一样的加油啊</p><br/><ins>努力学习的正确打开方式</ins></body></html>
Copy after login

运行效果:

           好了,第一天慢慢腾腾地结束了,今天没有集中精力学习,晚上这一个多小时的学习量比之前好几个小时的都多。明天真的要早起开始练习!

明天小丹丹23岁生日,祝越来越可爱吧。不过竟然已经23了(阴险)

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1663
14
PHP Tutorial
1263
29
C# Tutorial
1236
24
Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

HTML, CSS, and JavaScript: Essential Tools for Web Developers HTML, CSS, and JavaScript: Essential Tools for Web Developers Apr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

HTML: The Structure, CSS: The Style, JavaScript: The Behavior HTML: The Structure, CSS: The Style, JavaScript: The Behavior Apr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web Design The Future of HTML: Evolution and Trends in Web Design Apr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The Future of HTML, CSS, and JavaScript: Web Development Trends The Future of HTML, CSS, and JavaScript: Web Development Trends Apr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML vs. CSS vs. JavaScript: A Comparative Overview HTML vs. CSS vs. JavaScript: A Comparative Overview Apr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Building the Structure of Web Pages HTML: Building the Structure of Web Pages Apr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

See all articles