- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Return the value of an attribute of the selected element using CSS
The attr() CSS function returns the value of an attribute of the selected element using CSS
Example
You can try to run the following code to implement the attr() function in CSS
<!DOCTYPE html> <html> <head> <style> a:before {content: " (" attr(href) ")";} </style> </head> <body> <h2>Information Resource</h2> <p> Resource:<a href="https://www.qries.com">Welcome to Qries </a> </p> </body> </html>
Advertisements
To Continue Learning Please Login
Login with Google