What is the purpose of adding an id to a css link tag -


this question has answer here:

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

why give style tag id


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -