Use CSS to put img attributes

css, html

Solution

The answer is No. You can't manipulate the html tags with the help of css. Use javascript for that. CSS is only used for manipulate the style attributes.

To change the height and width property using css you can do something like this

.img-dollar
{
   height:100px;
   width: 100px
}

Problem

Can I use CSS programmatic to put the attributes of my img tag? ``` <span><img class="img-dollar"></img></span> <span><img class="img-royalty"></img></span> ``` I want to put src to get the image and put height and width to scale it down. How can I achieve?

Original source

Related problems