Logo - Albert Walicki

Color your links with specific href

CSS
Three examples of coloring anchor tags depending on the part of the URL

You can take advantage of CSS selectors to color different anchors with a different color! Look at the example; it's so simple.

  • [href^=] selects all anchors which href starts with the value

  • [href$=] selects all anchors which href ends with the value

  • [href*=] selects all anchors which href includes the value

See more tips!

CSS
Example of styling first line of the element

Target first line of sentence

Logo - Albert Walicki

Hello, i’m Albert Walicki. i’m a frontend developer and cofounder of development & design agency Hype4 and education platform Hype4 Academy. I wrote a book for Junior Frontend developers called Frontend Unicorn.

BlogGlassmorphismAurora UIShapes in CSSUnique css illustrations

Get in touch!

Have a question or need a project? Contact me!

© 2020-present Albert Walicki. All Rights Reserved