How to set the font color in html and how to use ps to obtain the correct font color in html _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
Here we will introduce three font color settings, including HTML font, CSS text color, and css hyperlink font color. We also introduce how to use PS to obtain accurate color values. You can flexibly extend the font and set color values for the background. I. html font color settings

In HTML, we can use the font tag to set the color of the font content.

1. font Syntax:


The Code is as follows:






Font color online example </p>


I am a red font






Hi!




First, font is a regular label. The font text content is placed into the label, and the font color can be set in the font label with the color + corresponding color value.

2. Example of setting font color in html font

2-1. complete code of the html font color example:


The Code is as follows:






Online demonstration of css Implementation of font color </p>




My font is red


My font is blue





The preceding example sets the font color and the font color of the table separately.

2-2. Font color example

Case study of html font color settings

2-3. Online demonstration: view the case

To change the font color, you only need to change the color value.

Ii. html p css font color settings

Set the font color in html using the css style.

You can use css to set the html font color. One is CSS in the tag and the other is external CSS.

1. Introduction to basic knowledge

With external CSS, you can put CSS code in a CSS file separately and use html link to introduce CSS (html attracts css). You can also use


Test content: I set the color in blue cSS.


In the p object, the hyperlink color is green.




Use

  • Test content I set the uniform color blue

  • In the p object, the hyperlink color is green.

  • The font of a hyperlink in blue is set in html, while the font color of a hyperlink in green is set separately.

    2. hyperlink font color example

    Css hyperlink font instance Effect

    3. Online demonstration: view cases

    The above three p + CSS cases are packaged and downloaded:

    Download Now (2.928KB)

    4. How to obtain the correct font color required by HTML

    To obtain accurate color values, you can obtain them using Photoshop (ps. The following example shows how to use PS to obtain the font color value of a certain image or border.

    Assume that we want to obtain the specific color value of CSS blue.

    1. PS open this image

    Ps open this image

    2. Click "select foreground color" or "select background color" in the PS tool.

    Click "foreground" in the red box.

    3. The "select foreground" tab is displayed.

    After the second step of the operation, the "select foreground" tab will pop up, and the mouse pointer will become the same icon as the "Color Picker". At this time, click the desired color value, if the image is small and not easy to click accurately, you can use the "ctrl ++" command to enlarge the image.

    Obtain the exact color value "0000FF"

    4. Set the color value obtained by the user.

    Color: # 0000FF

    Tip: when using the color value, you can copy the color value directly to PS to avoid manual input errors. Also, add the "#" sign before the color value.

    5. html font color Summary

    Here we will introduce three font color settings, including HTML font, CSS text color, and css hyperlink font color. We also introduce how to use PS to obtain accurate color values. You can flexibly extend the font and set color values for the background.

    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.