HTML CSS set variable?
You would need to use a server-side language like PHP to achieve what you want - HTML is a static language (though it can be modified by JS on the client side, but only if the client has JS enabled, which most do but you can't rely on it), and CSS stylesheets can't be modified at all once loaded by the browser (you just have to apply inline styles to modify things using JS).
If you're only using it to make it easier to add super long links, I would recommend just hard coding them (you can always copy and paste), but if you want to get a bit more advanced, a server side language will soon become necessary. PHP is good for the basics, like you want at the moment, but as a language it has a lot of flaws, and I would recommend trying something else like node.js or python's Django framework if you want to do something seriously with web programming (PHP is very widely used (this site runs on PHP), but I wouldn't recommend starting any new projects using it).

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now