css question

Asked 2 years ago, Updated 2 years ago, 17 views

I'm studying while making a website

<a href="> Title </a>

If you add a path to the title and make a css separately, The style of the title doesn't work Isn't this how you do it?

python

2022-09-22 21:30

1 Answers

I don't know if you understood the question well, but for example, if you're in a situation like below, if you're right about giving style to the 'Title' font... You could do the following.

<!-- Method 1: How to style tags directly in html -->
<a href=" style="color:red;"> Title B</a>

<!-- Method 2: Using class in css -->
<a href="class="color-red"> Title A </a>

<!-- Method 3: How to style the tag directly in css -->
<a href="> Title C </a> 

/* Method 1 */


/*  Method 2 */
.color-red {
  color: red;
}

/*  Method 3 */
a {
    color: red;
}


2022-09-22 21:30

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.