Home >Web Front-end >CSS Tutorial >How to set the hyperlink font bold effect in css

How to set the hyperlink font bold effect in css

王林
王林Original
2020-11-17 10:33:055271browse

How to set the hyperlink font bold effect in css: 1. Create an a tag; 2. In the style tag, use the tag selector to select all hyperlinks; 3. Set font-weight for the a tag Just use the style, such as [a{font-weight: bold;}].

How to set the hyperlink font bold effect in css

Related attributes:

font-weight attribute sets the thickness of the text

(Learning video recommendation: css Video tutorial)

Attribute value:

  • normal Default value. Defines standard characters.

  • #bold Defines bold characters.

  • #bolder Defines bolder characters.

  • #lighter Defines finer characters.

  • #inherit Specifies that the font weight should be inherited from the parent element.

Specific method:

1. First create a tag

<a href="#">http://www.php.cn</a>

2. Then in the style tag, use the tag selector to select all Hyperlink

<style>
    a{}
</style>

3. Finally, set the font-weight style for the a tag

<style>
    a{
        font-weight: bold;
    }
</style>

Related recommendations: CSS tutorial

The above is the detailed content of How to set the hyperlink font bold effect in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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