+ 1

Can we use Javascript instead of CSS?

17th Jun 2016, 5:51 AM
Zahid Ali
Zahid Ali - avatar
6 Answers
+ 7
You can use JS instead of CSS just like you could use a pencil instead of a paint roller to paint a house. Technically its possible, but you shouldn't do it.
17th Jun 2016, 7:47 PM
Charlie Clarke
Charlie Clarke - avatar
+ 4
yes but you'll more than likely end up using <style></style>
2nd Jul 2017, 8:36 PM
D'yara Williams
D'yara Williams - avatar
+ 2
JavaScript is for validation & CSS is purely for styles i hope, we can use CSS in JS but can't use CSS instead of JS.
17th Jun 2016, 7:04 AM
Priya Cjay
Priya Cjay - avatar
+ 2
CSS is presentation of web and JavaScript is behavior of web.
20th Jun 2016, 8:20 PM
Hassan
Hassan - avatar
0
well. you can access CSS styles thought JS but it will take twice as much code to do the same thing. But theoretically, yes. DOM Elements have a style object that allows you to access all the properties that can be used in CSS For example Document.GetElementById ("ElementId").Style.propertyOfChoise = value;
24th Jun 2016, 5:19 PM
josh mizzi
josh mizzi - avatar
- 1
yes you can use canvas and svg
19th Jun 2016, 12:27 PM
Adil Yousfi