What is the purpose of adding an id to a css link tag -
this question has answer here:
- why give style tag id 1 answer
what purpose of adding id attribute css link tags?
example:
<style type="text/css" id="some_id_name">
in html 4.01, id attribute cannot used with: <base>, <head>, <html>, <meta>, <param>, <script>, <style>, , <title>
.
while in html5, id attribute can used on html element (it validate on html element.however, not useful).
but use can reference i.e
var styles = document.getelementbyid('some_id_name'); // want, styles.parentnode.removechild(styles); // remove these styles styles.setattribute('href', 'alternate-styles.css');
check
Comments
Post a Comment