HTML text formatting

Source: Internet
Author: User

italic text ;<b> bold text </b><br><br can be replaced <em>this text is emphasized</em>;

bold text :<i> italic text </i><br><br> can replace <strong>this text is strong</strong>;

computer automatic output:<code> computer auto Output </code><br><br>;

text subscript and superscript:<sub> subscript </sub> and <sup> superscript </sup>;

XL/Wenben : <big/small>this text is big</big/small>;

Usually label <strong> replace bold label <b> to use, <em> replace <i> label to use;

preformatted Text : This example shows how to use the Pre tag to control blank lines and spaces; The rendered text is the same as the hit;

<!DOCTYPE HTML><HTML><Body><Pre>Text in a pre elementis displayed in a fixed-widthfont, and it preservesboth spaces Andline breaks</Pre></Body></HTML>

effect :

The computer output label :<code> defines the computer code. <samp> define a sample of computer code. <tt> define the typewriter code. <pre> define pre-formatted text. , used in the display of static page source code, the output format is different. Some functions are similar to H1 H2. No special meaning.

<HTML><Body><Code>Computer code</Code><BR/><KBD>Keyboard input</KBD><BR/><TT>Teletype text</TT><BR/><Samp>Sample text</Samp><BR/><var>Computer variable</var><BR/><P><b>Comments:</b>These tags are often used to display computer/programming code. </P></Body></HTML>

Address : This example shows how to write an address in an HTML file;

<!DOCTYPE HTML><HTML><Body><Address>written by<ahref= "Mailto:[email protected]">Jon Doe</a>.<BR>Visit us at:<BR>example.com<BR>Box 564, Disneyland<BR>USA</Address></Body></HTML>

Abbreviations and acronyms: How to implement abbreviations or acronyms;

<HTML><Body><abbr(abbreviated) title (title)= "Etcetera">etc.</abbr><BR/><acronym(initials) title= "World Wide Web">Www</acronym><P>In a device, when you move your mouse over an abbreviated word, the title can be used to show the full version of the expression.</p Some browse><P>Valid only for acronym elements in IE 5.</P><P>Valid for both the ABBR and acronym elements in Netscape 6.2.</P></Body></HTML>

Text Direction : How to change the direction of the text;

<!DOCTYPE HTML><HTML><Body><P>This paragraph would go left-to-right.</P>  <P><BDOdir= "RTL">This paragraph would go right-to-left.</BDO></P>  </Body></HTML>

double quotation marks : If the token is a short reference that does not require paragraph separation, use <q>.

The,<blockquote> tag defines a long reference in HTML 4.01.

<!DOCTYPE HTML><HTML><Body><P>WWF ' s goal is to:<Q>Build a future where people live in harmony with nature.</Q>We hope they succeed.</P></Body></HTML>
< blockquote > < P > Here are a long quotation here is a long quotation. </ P > </ blockquote >

In HTML5, the,<blockquote> tag definition is excerpted from another source's block reference;

<!DOCTYPE HTML><HTML><Body><H1>About WWF</H1><P>Here are a quote from WWF ' s website:</P><blockquotecite= "http://www.worldwildlife.org/who/index.html">for years, WWF have been protecting the future of nature. The World?s leading conservation organization, WWF works in countries and was supported by 1.2 million members in the U nited states and close to 5 million globally.</blockquote></Body></HTML>    

effect :

To delete a word effect and insert a word effect :

<!DOCTYPE HTML><HTML><Body><P>My Favorite color is<del>(delete) Blue</del> <ins>(insert) Red</ins>!</P></Body></HTML>

tags and definitions :

<b> Define bold text
<em> Define text-focused
<i> Defining italic characters
<small> Define Small words
<strong> Define the aggravating tone
<sub> Define the subscript Word
<sup> defining superscript words
<ins> Defining Insert Words
<del> Define Delete words
<code> Defining computer code
<kbd> Defining keyboard Codes
<samp> Defining a sample of computer code
<var> Defining variables
<pre> Defining pre-formatted text
<abbr> Defining abbreviations
<address> Define Address
<bdo> Define text orientation
<blockquote> Define a long reference
<q> Define short cited terms
<cite> Define references, citations
<dfn> Define a definition Project

HTML text formatting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.