+ 2
How to change background image opacity in HTML not CSS?
Every time i want to change the opacity of a background image, i must have open CSS and write code as <style... and so on. Is there anyway i could do this using only HTML??
4 Answers
+ 3
In almost all html tags you can use the "style" property to change the appearance of that element. See the example of Brains:
<div style = "css inline here"> </ div>
Within the "style" property you will need to use the css syntax in the same way as you use it in style sheets.
I'll give you a more direct example:
<div style = "backgound-color: red; color: white"> this is an example </ div>
As you can see I changed the background in red and the text will be blank
P.S. note that this type of writing is strongly discouraged, you should use style sheets
+ 7
you could use inline css
<div style="inline css here" ></div>
+ 3
Thanks simone
+ 1
Can you explain?
<style> is used in CSS but i am asking for html only.