<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Olsha100</title>
    <description>The latest articles on DEV Community by Olsha100 (@olsha100).</description>
    <link>https://dev.to/olsha100</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F559519%2Feee9ecf8-e512-461d-894a-b01ab695a6b1.png</url>
      <title>DEV Community: Olsha100</title>
      <link>https://dev.to/olsha100</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/olsha100"/>
    <language>en</language>
    <item>
      <title>Javascript - inline styling or manipulating CSS class list</title>
      <dc:creator>Olsha100</dc:creator>
      <pubDate>Tue, 16 Feb 2021 20:48:14 +0000</pubDate>
      <link>https://dev.to/olsha100/javascript-inline-styling-or-manipulating-css-class-list-21go</link>
      <guid>https://dev.to/olsha100/javascript-inline-styling-or-manipulating-css-class-list-21go</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;In my journey of learning WebDev I constantly encounter a problem of changing style of an element using Javascript. There's one thing I can't figure out: &lt;/p&gt;

&lt;p&gt;Is it better to change element's style with JS using "inline method" like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;button.style.color = 'white';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or trying to manipulate it e.g. by adding a class which contains such property to the element like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;button.classList.add('className')&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;At first glance I'd choose the "inline method" since it's easier and more flexible but I found out that adding inline CSS which in fact is done by this method is considered as a bad practice and can affect SEO.&lt;/p&gt;

&lt;p&gt;What do you think about it? I'd really appreciate for an opinion of more experienced than me in this matter :) &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>css</category>
    </item>
  </channel>
</rss>
