Tips for applying CSS to webpage text

Source: Internet
Author: User

I would like to take a chapter to discuss how to set text styles with CSS. generally, most CSS applications are used to process text content, even for websites that do not fully comply with the standards. removing the repeated <font> labels on the Web page is a very attractive thing for designers, and it is not difficult to see the huge advantage of controlling text layout with CSS, that is, the content and display method are further separated.

We have learned from many previous examples that CSS can handle many situations, and setting text styles is the easiest way to add design elements to the most basic web pages. at the same time, adding styles to CSS text also avoids unnecessary images on the page.

In this chapter, we will see how CSS brings a boring plain text to another height (with new colors, sizes, and fonts ).

How to Make hypertext look cool?

Specifying text styles is one of CSS's best practices. It is the same for browsers that do not fully support advanced CSS functions. in the past, designers and developers may want to design text in a way that is not large or bold, create a webpage that is intolerable and hard to use by today's standards (have you ever seen a webpage with most of the text shown in images? But you happen to be using a text browser ...)

To provide you with some alternative methods to use images and answer the above question at the same time, in this chapter, we will start with a text that has not been set as a style, and gradually add various CSS rules for it, make it a compelling design.

Changing Times

Start by reading the text to be processed in the preset font of the browser. in my case, the default font is 16-pixel Times. the Safari browser is used on Mac OS X. As a result, the text displayed will be deprecated in the form of anti-aliasing. If Windows XP is used and ClearType is enabled, you can also see similar results.

Times (or variant Times New Roman) is the default font of many browsers. However, it is easy for users to change the font they like, So you certainly cannot rely on this default value.

Figure 13-1 shows the text that we have used in this chapter with no styles added: A simple title marked with

Figure 13-1 display the title and text preset in the browser

  • 5 pages in total:
  • Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page

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.