javascript - Creating new html tags (elements) -
this question has answer here:
- is there way create own html tag in html5? 17 answers
so can use javascript crate new html elements, right?
but if write in html code:
sea{width: 100px; height: 100px; background: blue; color: red;} <sea>this sea tag</sea>
it make font color red , background blue dimensions aren't working... possible javascript or not?
like new html5 elements (header, footer, section...) there possible way create own names elements or not?
so can use javascript crate new html elements, right?
no. can create new elements, , put them html document, aren't html. don't come semantics. don't have default styling (including audio styling screen readers). don't that.
it make font color red , background blue dimensions aren't working... possible javascript or not?
javascript irrelevant. you'd same problem if generated same invalid dom js. browser error recovery treats unrecognised elements display: inline
default. height
, width
not apply elements display: inline
, have set different value (e.g. display: block
) height
, width
apply.
Comments
Post a Comment