+ 3

Is <script> an inline element or block level element?

(Please tell me if you need description)

12th May 2018, 11:01 AM
Ibaadi Jaya
Ibaadi Jaya - avatar
8 Answers
+ 3
Does that mean I can put a <script> tag inside inline elements?
12th May 2018, 11:16 AM
Ibaadi Jaya
Ibaadi Jaya - avatar
+ 2
inline or block is set in css with "display:inline"
12th May 2018, 11:11 AM
Lexfuturorum
Lexfuturorum - avatar
+ 2
It's neither . Script tag does not affect the visuals of the body (not talking about the code in it but the tag itself)
12th May 2018, 11:14 AM
Utkαrsh
Utkαrsh - avatar
+ 1
script is a element for adding javascript
12th May 2018, 11:10 AM
Lexfuturorum
Lexfuturorum - avatar
+ 1
Utkαrsh not directly if you just call a funtion that returns something you could use it as div element
12th May 2018, 11:16 AM
Lexfuturorum
Lexfuturorum - avatar
+ 1
Feichtinger Andreas You mean if I put this in the script tag - " return document.createElement("div"); " , then the script tag will behave as a div tag . Interesting
12th May 2018, 11:19 AM
Utkαrsh
Utkαrsh - avatar
+ 1
no i said said if u use return "some text" it works the same as a div tag
12th May 2018, 11:21 AM
Lexfuturorum
Lexfuturorum - avatar
0
most of the time its useless to put the js anywhere else than the footer(loading speed), but yes you can put it everywhere
12th May 2018, 11:19 AM
Lexfuturorum
Lexfuturorum - avatar