Css controls the spacing between words and letters

Source: Internet
Author: User
Tags html tags

What needs to be learnedCSSAttributes make HTML tags impossible: control the word spacing and letter spacing.

Word spacing

With the padding attribute, you can add more distances between words:

    H3 {word-spacing: 1em}

The parameter value you used will be added to the default settings of any browser. You can use any length unit we talked about yesterday:

  • In (inches)
  • Cm (cm)
  • Mm (mm)
  • Pt (points)
  • Pc (typewriter spacing)
  • Em (EMS)
  • Ex (x-height)
  • Px (pixel)

The result is as follows:

    Behold the power of cheese.

If your browser does not support this CSS attribute, clickHereView the display effect.

If you cannot see any difference, it means that your browser does not support this attribute. Only Internet Explorer 4 of the MAC server supports this padding setting.

Letter spacing

Letter spacing can be applied in IE 4, but Communicator doesn't work, alas...

    H3 {letter-spacing: 10px}

The letter spacing function is similar to the word spacing function: the parameter value is added to the default settings of the browser, you can use any of the above length units.

If you are using IE 4, here is an example:

    Behold the power of cheese.

You can use the normal parameter for both attributes. So that it is displayed according to the original default settings of the browser.

Don't be frustrated. There are many CSS attributes that can be used in both browser types.

Related Article

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.