<?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>Forem: menomanabdulla</title>
    <description>The latest articles on Forem by menomanabdulla (@menomanabdulla).</description>
    <link>https://forem.com/menomanabdulla</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%2F662827%2F34000f70-693f-4d2e-a470-e642068c8fbc.png</url>
      <title>Forem: menomanabdulla</title>
      <link>https://forem.com/menomanabdulla</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/menomanabdulla"/>
    <language>en</language>
    <item>
      <title>How I maintain large-scale dataset in react</title>
      <dc:creator>menomanabdulla</dc:creator>
      <pubDate>Mon, 04 Oct 2021 06:08:12 +0000</pubDate>
      <link>https://forem.com/menomanabdulla/how-i-maintain-large-scale-dataset-in-react-23la</link>
      <guid>https://forem.com/menomanabdulla/how-i-maintain-large-scale-dataset-in-react-23la</guid>
      <description>&lt;p&gt;Frontend technology turns in robust at current decades. Modern web technology now more dynamic, more interactive seems like more realistic then earlier. Business owners want more engaging of user and there is a cold-war among companies to, how provides more realistic feel, more efficient user-experience for potential customers. And here data plays a big game. If we are on frontend side then terms going like how efficiently maintain data at frontend. Today we are going to explore, how productively we could maintain large-scale data-set at frontend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://large-dataset-with-react.netlify.app/"&gt;Live Preview&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/menomanabdulla/large-dataset-with-react"&gt;Source Code&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pagination:
&lt;/h2&gt;

&lt;p&gt;Pagination is one of conventional and proven way of handling large-scale of dataset. We can reduce pressure from DOM tree by using pagination in large data context. As well as it’s also favorable for makes   frontend UI organized and clean. For paginate I use react-paginate npm package. It’ s really highly customizable and super simple to use. For customization it has a large list of props,  personally  I found it handy for dealing with large-scale data-set. &lt;/p&gt;

&lt;h2&gt;
  
  
  Infinite-scroll:
&lt;/h2&gt;

&lt;p&gt;Infinite-scroll is more trendy approach of maintain large-scale of data-set at frontend. I love infinite-scroll for its smoothness. Infinite-scroll is a bunch handy for news-feed component for this a large amount if popular platform are using infinite-scroll like facebook, twitter, linkedin most of the social-media platform are using infinite-scroll concept. In react we can use infinite-scroll by a popular package called ‘react-infinite-scroll’. Most interesting things about ‘react-infinite-scroll’ are its size and usability. Super simple to use, with super handy use-case. &lt;/p&gt;

&lt;h2&gt;
  
  
  Virtualized and Window:
&lt;/h2&gt;

&lt;p&gt;According to react-windows doc: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;React-window reduce the amount of work required to render the initial view and to process updates.&lt;/li&gt;
&lt;li&gt;It reduces the memory footprint by avoiding over allocation of DOM nodes. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;React-window is new form of react-virtualized. React-window is smaller and faster than react-virtualized. I would suggest go for react-window instead of react-virtualized for those size, customizability and speed issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Last-words:
&lt;/h3&gt;

&lt;p&gt;Thanks for staying till now; I highly appreciate your effort. If you have any suggestion about maintaining large-scale data-set at frontend especially in react please share in comment box so that it will resourceful for others too. If you love this article let me know by your activity. Happy coding.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS3 flexbox in simple way for beginners to master.</title>
      <dc:creator>menomanabdulla</dc:creator>
      <pubDate>Wed, 11 Aug 2021 03:49:04 +0000</pubDate>
      <link>https://forem.com/menomanabdulla/css3-flexbox-in-simple-way-for-beginners-to-advance-53fi</link>
      <guid>https://forem.com/menomanabdulla/css3-flexbox-in-simple-way-for-beginners-to-advance-53fi</guid>
      <description>&lt;p&gt;Today’s world you can’t survive without flex-box  as a frontend developer whether you are expert or beginner. Flex-box give you extra superiority for managing your content in final layout, also flex-box has huge market demand for building complex web-layouts.&lt;/p&gt;

&lt;p&gt;CSS flexbox will added new weapon in your visual development portfolio. Here I am explained all CSS3 flex-box property in simple way with visual example and copy ready code. So stick till to the end and give your CSS expertise next shape.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://css3-flexbox.netlify.app/" rel="noopener noreferrer"&gt;Here is live examples, you can check it from here.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/menomanabdulla/all-css3-flex-property" rel="noopener noreferrer"&gt;Here is github, you can see source-code from here.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Display:
&lt;/h2&gt;

&lt;p&gt;Display is CSS box-model properties,  it’s primary properties  for next all flex related properties. This defines a flex container, inline or block depending on the giver value. It enables a flex content for all its direct children. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5opurevdgxqxo1saz2lt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5opurevdgxqxo1saz2lt.png" alt="Display is CSS box-model properties"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Flex Order
&lt;/h2&gt;

&lt;p&gt;Flex item maintain default order as a source order.  Order properties can controls order in which they appear in the flex-container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuji28chsf6bk8ps32dfj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuji28chsf6bk8ps32dfj.png" alt="Flex item maintain default order"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Flex Direction
&lt;/h2&gt;

&lt;p&gt;Flex-direction defines how flex-box items are ordered within a flex-box container. Value example and use case: &lt;br&gt;
&lt;strong&gt;row:&lt;/strong&gt; Same as text direction&lt;br&gt;
&lt;strong&gt;row-reverse:&lt;/strong&gt;  Alternative to text direction&lt;br&gt;
&lt;strong&gt;column:&lt;/strong&gt; Same as row but top to bottom&lt;br&gt;
&lt;strong&gt;column-reverse:&lt;/strong&gt; Same as row-reverse but top to bottom &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wdemjgziob5pgzr6o0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wdemjgziob5pgzr6o0x.png" alt="Flex-direction defines how flex-box items are ordered"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4.Flex Wrap
&lt;/h2&gt;

&lt;p&gt;For Flex-wrap stick by-default inline, flex-wrap is also flexible like others property. You can change that and allow the items to wrap as needed with its property. Value example and use case:&lt;br&gt;
&lt;strong&gt;nowrap:&lt;/strong&gt; all flexf items will be on one line&lt;br&gt;
&lt;strong&gt;wrap:&lt;/strong&gt; flex items will wrap onto multiple lines, fro&lt;br&gt;
&lt;strong&gt;wrap-reverse:&lt;/strong&gt; flex items will wrap into multiple lines, from bottom to top &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fquo6i0pxhhqa3frvjxyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fquo6i0pxhhqa3frvjxyi.png" alt="For Flex-wrap stick by-default inline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5.Flex Shrink
&lt;/h2&gt;

&lt;p&gt;Flex-shrink is just opposite of flex grow. It only comes into play if the elements must shrink to fit into their container(when the container is just too small).&lt;br&gt;
By-default every item has flex-shrink of 1 which means it will shrink as the box contracts. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotmijgqjszarhl90oy3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fotmijgqjszarhl90oy3w.png" alt="Flex-shrink is just opposite of flex grow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6.Flex Flow
&lt;/h2&gt;

&lt;p&gt;CSS This is short-hand for the flex-direction and flex-wrap properties, simultaneously they define flex containers main and cross axis. The default value is row and nowrap.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83kqcbf8ku3fxqcbyxmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83kqcbf8ku3fxqcbyxmm.png" alt="CSS This is short-hand for the flex-direction and flex-wrap properties"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7.Flex Basis
&lt;/h2&gt;

&lt;p&gt;This defines the default size of an element before the remaining space is distributed. It could be a length with unit or keyword like auto, content flex-basis default value is “auto”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F646ems4udq1fcwdmklix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F646ems4udq1fcwdmklix.png" alt="This defines the default size of an element before the remaining space is distributed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8.Justify Content
&lt;/h2&gt;

&lt;p&gt;This properties define alignment of flex item along with ‘x’ axis or main axis. Justify-content’s default value is “flex-start”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;flex-start:&lt;/strong&gt; item will appear at the starting of the flex-container along with ‘x’ axis.&lt;br&gt;
&lt;strong&gt;flex-end:&lt;/strong&gt; item will appear at the end of the flex-container along with ‘x’ axis. &lt;br&gt;
&lt;strong&gt;space-between:&lt;/strong&gt; items get space between those mainly left and right side when they appear along with ‘x’ axis.&lt;br&gt;
&lt;strong&gt;space-around:&lt;/strong&gt;  items get space combinedly mainly left and right side along with ‘x’ axis.&lt;br&gt;
&lt;strong&gt;center:&lt;/strong&gt; items will align center along with ‘x’ axis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvh8fpxyoj5ppwispyvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvh8fpxyoj5ppwispyvm.png" alt="This properties define alignment of flex item along with ‘x’ axis or main axis."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9.Flex
&lt;/h2&gt;

&lt;p&gt;Flex properties determine short-hand of flex-grow, flex-shrink and flex-basis combined. The second and third property are optional. The default is ‘0 1 auto’ but if you set it with a single number value it’s like ‘1 0’;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv079nrvvng1z74yc8t7k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv079nrvvng1z74yc8t7k.png" alt="Flex properties determine short-hand of flex-grow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  10.Align Items
&lt;/h2&gt;

&lt;p&gt;Align-items properties defines the default behavior for how flex items are aligned or laid out along with ‘y’ or cross axis.&lt;br&gt;
&lt;strong&gt;flex-start:&lt;/strong&gt; item will appear at the starting of the flex-container along with ‘y’ axis.&lt;br&gt;
&lt;strong&gt;flex-end:&lt;/strong&gt; item will appear at the end of the flex-container along with ‘y’ axis.&lt;br&gt;
&lt;strong&gt;center:&lt;/strong&gt; item will appear at the center point of the flex-container along with ‘y’ axis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7m8pvhas2ivuhc1d4ip.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc7m8pvhas2ivuhc1d4ip.png" alt="Align-items properties defines the default behavior for how flex items are aligned or laid out along with ‘y’ or cross axis."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  11.Align Self
&lt;/h2&gt;

&lt;p&gt;For This allows the default alignment, to be overridden for individual flex items. We can overridden align-items properties only for any individuals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fza62sv71yide9feaob37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fza62sv71yide9feaob37.png" alt="For This allows the default alignment, to be overridden for individual flex items."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  12.Align Content
&lt;/h2&gt;

&lt;p&gt;This property define flex container’s lines within when there is extra space in the ‘y’ axis, similar to how justify-content aligns individuals items within  the man the main-axis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxwao7c7ozslqvie2j85g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxwao7c7ozslqvie2j85g.png" alt="This property define flex container’s lines within when there is extra space in the ‘y’ axis"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On this article I tried to cover all CSS3 flex-box properties with example and also include &lt;a href="https://css3-flexbox.netlify.app/" rel="noopener noreferrer"&gt;live example&lt;/a&gt; with&lt;a href="https://github.com/menomanabdulla/all-css3-flex-property" rel="noopener noreferrer"&gt; github source code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you enjoyed it, please let me know your words. If you want to deep drive with CSS3 coding guidelines and front-end web development best practices please &lt;a href="https://dev.to/menomanabdulla/15-css3-best-practices-of-for-beginners-to-pro-253d"&gt;check it&lt;/a&gt;. Also you can check my 15 Best practices of HTML5 for beginners for give your markup good shape from &lt;a href="https://dev.to/menomanabdulla/15-html5-best-practices-for-beginners-to-master-47fb"&gt;here&lt;/a&gt;. If you find any errors or mistakes then do let me know. Thanks for this journey  &amp;amp; Happy Coding.&lt;/p&gt;

</description>
      <category>css</category>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>15 CSS3 Best practices of  for beginners to pro.</title>
      <dc:creator>menomanabdulla</dc:creator>
      <pubDate>Fri, 16 Jul 2021 04:12:32 +0000</pubDate>
      <link>https://forem.com/menomanabdulla/15-css3-best-practices-of-for-beginners-to-pro-253d</link>
      <guid>https://forem.com/menomanabdulla/15-css3-best-practices-of-for-beginners-to-pro-253d</guid>
      <description>&lt;p&gt;Whether you are a beginner or an expert in Frontend Development it is important to follow some best practices in order to keep your cascading style-sheet (CSS) optimized and organized. &lt;/p&gt;

&lt;p&gt;CSS guy is an artist, as an artist you should have some unique working strategy that’s make your action while working more enjoyable and fun. Here is some tips I share, you could follow and write your style as pro. Wow! let’s get started:&lt;/p&gt;

&lt;h3&gt;
  
  
  01. Don't put everything in to one CSS file
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Case-01:&lt;/strong&gt; One large CSS file leads to fewer HTTP requests, &lt;br&gt;
which can improve performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Case-02:&lt;/strong&gt; Several smaller file leads to easier organization &lt;br&gt;
which will make development and maintenance cheaper and easier.&lt;/p&gt;

&lt;p&gt;Now what should our strategy for both scenarios? That’s a million &lt;br&gt;
dollars question. Okay let me clear your confusion; we can follow &lt;br&gt;
the win-win rules. &lt;/p&gt;

&lt;p&gt;“We could use multiple style sheets to keep things better &lt;br&gt;
organized, and then compress them into one file before putting &lt;br&gt;
them on the site, to improve performance.”&lt;/p&gt;

&lt;h3&gt;
  
  
  02. Follow top-down approach for organize your stylesheet
&lt;/h3&gt;

&lt;p&gt;You can follow your HTML elements hierarchy in your stylesheet. I called it top-down approach, that will help you to write more structured and organized code. You will find top-down approach very handy to find your expected code block form the entire stylesheet. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0x2sop2trqb0xa4sev0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl0x2sop2trqb0xa4sev0.png" alt="Follow top-down approach for organize your stylesheet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  03. Make UI components
&lt;/h3&gt;

&lt;p&gt;Tried to make some prebuild UI component that you may use in future just simply plug a class name and have some properties.&lt;/p&gt;

&lt;h3&gt;
  
  
  04. Comment your CSS
&lt;/h3&gt;

&lt;p&gt;For better readability and organized coding, code commenting play insane role. Code commenting helps code refactor in future and helps other developer to understand the project codebase. Code commenting is always good practice. Those developer who write code with proper commenting, have huge market value. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcs333jmtr7bzb5a300r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcs333jmtr7bzb5a300r.png" alt="Comment your CSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  05. How to write consistent CSS
&lt;/h3&gt;

&lt;p&gt;Consistent CSS is important for team collaboration as well as in large project. At the beginning part of the project you can set some rules for maintain throughout to your entire stylesheet. It will help you to write consistent CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  06 CSS namespacing
&lt;/h3&gt;

&lt;p&gt;CSS namespacing helps you to create a structure that governs how CSS properties get written. If you follow the convention, you’ll be able to write CSS without being afraid of side effects. &lt;br&gt;
Here’s a list of namespaces I use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;.l-: layouts&lt;/li&gt;
&lt;li&gt;.o-: objects&lt;/li&gt;
&lt;li&gt;.c-: components&lt;/li&gt;
&lt;li&gt;.js: JavaScript hooks&lt;/li&gt;
&lt;li&gt;.is-|.has-: state classes&lt;/li&gt;
&lt;li&gt;.t1|.s1: typography sizes&lt;/li&gt;
&lt;li&gt;.u-: utility classes&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  07. Use BEM or Block elements modifier
&lt;/h3&gt;

&lt;p&gt;Have you worked on large websites that spans more than a few pages? If you did, you probably realized the horrors of not conforming to a robust CSS architecture. You probably would also have researched on ways to write maintainable CSS.&lt;/p&gt;

&lt;p&gt;BEM convention is the good choice for well-maintained CSS architecture. If you’ve never heard of BEM before, it stands for block, element and modifier. It looks incredibly ugly when you first feast your eyes on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yjsyzehh85suhy88jos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yjsyzehh85suhy88jos.png" alt="Use BEM or Block elements modifier"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hated BEM to a point where I didn’t even give it a chance when I first got to know about it. I can’t remember what made me try BEM, but I realized how powerful it is to work with it.&lt;/p&gt;

&lt;h3&gt;
  
  
  08. CSS class nesting or complex selectors
&lt;/h3&gt;

&lt;p&gt;Logically there is no problem with CSS class selector nesting but future will make sense. When you want to modify existing rules this will be a bit complex.There another main reason is when you use complex selectors browser takes more time fir match selectors.&lt;/p&gt;

&lt;p&gt;Let me clear how browser trying to interpret selector and decide which element it matches. Lets related with an example. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyobwont8uhr2jq74elg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmyobwont8uhr2jq74elg.png" alt="CSS class nesting or complex selectors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Browser start with the a tag, it will trying to match all the a tags then trying to match next selector then so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fodoea18q8pt8j4e2emnn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fodoea18q8pt8j4e2emnn.png" alt="CSS class nesting or complex selectors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's not good practice to using tags as CSS selectors because it will try to match for every tag. Try to use more specific selector and reduce complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  09. Use CSS preprocessor like SCSS, SASS and LESS
&lt;/h3&gt;

&lt;p&gt;For keeping your CSS DRY(Don’t repeat yourself), use CSS preprocessor like SCSS,SASS or LESS. The biggest benefit to using these preprocessor is that you can define your re-usable code at the top and reuse it by @ include and @ extend throughout all of your CSS.&lt;/p&gt;

&lt;p&gt;CSS preprocessor will make your life easier to write modular based CSS, it’s helps to write more organized and more consistent  cascading stylesheet. BEM naming convention with CSS namespacing and CSS preprocessor is perfect combo for robust CSS architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Reduce redundancy
&lt;/h3&gt;

&lt;p&gt;Reduce redundancy a bit tough, you will not find both case are exact same. In my suggestion if find 70%-80% style match then you could use different class to outsource rest of 30%-20% style. I hope it will make sense.&lt;/p&gt;

&lt;h3&gt;
  
  
  11. Vertically align any elements using only CSS
&lt;/h3&gt;

&lt;p&gt;For vertically align any elements modern CSS introduce CSS flex and grid system. Those are awesome tolls for dynamically centered any elements.&lt;/p&gt;

&lt;p&gt;By Flex: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9qza6ttnhll2xno83y7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9qza6ttnhll2xno83y7.png" alt="Vertically align any elements using only CSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By Grid: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xotv1wt9vgow0146hux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xotv1wt9vgow0146hux.png" alt="Vertically align any elements using only CSS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Try to use shorthand CSS properties
&lt;/h3&gt;

&lt;p&gt;There is lots of way, you can ménage your style but try to stick with best approach. Always try to use CSS shorthand, it will reduce your code as well as give your stylesheet a nice and good looking shape. &lt;/p&gt;

&lt;p&gt;Bad Practice: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsozcg8pukc06lfv4bc5r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsozcg8pukc06lfv4bc5r.png" alt="Try to use shorthand CSS properties"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good Practice: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6gy5crc21eq9m295qxgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6gy5crc21eq9m295qxgb.png" alt="Try to use shorthand CSS properties"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Use rem’s or em’s
&lt;/h3&gt;

&lt;p&gt;Using rem’s or em’s is more dynamic way instead of using pixels. Try to use rem’s or em’s rather than pixels.&lt;/p&gt;

&lt;h3&gt;
  
  
  14. Avoid !important
&lt;/h3&gt;

&lt;p&gt;For avoid code collusion and if you don’t want to break normal flow of browser behavior with your CSS don’t ever use !important. It’s really hard to find-out conflict within !important and refactor the whole codebase in large scale application.&lt;/p&gt;

&lt;h3&gt;
  
  
  15. Use mobile first development approach
&lt;/h3&gt;

&lt;p&gt;A mobile-first approach to styling means that styles are applied first to mobile devices.&lt;br&gt;
Concern with: &lt;br&gt;
1.Min-Width Media Queries&lt;br&gt;
2.Progressive Enhancement (CSS &amp;amp; javaScript)&lt;br&gt;
3.Content (Not Device Width) Determines Breakpoints&lt;/p&gt;

&lt;h3&gt;
  
  
  Last Words
&lt;/h3&gt;

&lt;p&gt;I hope you like my CSS3 coding guidelines and front end web development best practices. You can check my &lt;a href="https://dev.to/menomanabdulla/15-html5-best-practices-for-beginners-to-master-47fb"&gt;15 Best practices of HTML5 for beginners&lt;/a&gt; for give your markup good shape. If you appreciate it or find any errors let me know in comments. Thanks for this journey &amp;amp; Happy Coding.&lt;/p&gt;

</description>
      <category>css</category>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>html</category>
    </item>
    <item>
      <title>15 HTML5 best practices for beginners to master.</title>
      <dc:creator>menomanabdulla</dc:creator>
      <pubDate>Sun, 11 Jul 2021 16:42:34 +0000</pubDate>
      <link>https://forem.com/menomanabdulla/15-html5-best-practices-for-beginners-to-master-47fb</link>
      <guid>https://forem.com/menomanabdulla/15-html5-best-practices-for-beginners-to-master-47fb</guid>
      <description>&lt;p&gt;Whether you are a beginner or an expert in Hyper Text Markup Language (HTML) it is important to follow some best practices in order to keep your HTML documents consistent and organized. &lt;/p&gt;

&lt;p&gt;HTML5 has been around for many years now and has been stable and supported at least partially supported by most major browsers since 2014. Here I present list of best coding practices regarding HTML5 markup. Let’s get started: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  File Structure
&lt;/h3&gt;

&lt;p&gt;Be concerned to the project file structure from day one. It’s extremely important for mid to large scale application for batter maintenance.  &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Declare correct Doctype
&lt;/h3&gt;

&lt;p&gt;If correct Doctype  is not declared new HTML5-specific tags will not interpreted by the browser.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkknbrm0ri9ehirr6bg7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkknbrm0ri9ehirr6bg7.png" alt="Declare correct Doctype"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Write w3c valid markup
&lt;/h3&gt;

&lt;p&gt;Use validator like w3c validator to check your markup and write error free more structured code. Validator  will suggest you some best practice of  HTML5 coding standard. I strongly recommend you to valid your code by w3c validator.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  HTML5 semantic elements
&lt;/h3&gt;

&lt;p&gt;Make sure correct use of the HTML5 semantic elements like: ,,,.  It’s will help you to write more structured piece of code.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqt2pzl01rto12ppy2zge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqt2pzl01rto12ppy2zge.png" alt="HTML5 semantic elements"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Meaningful img alt attribute
&lt;/h3&gt;

&lt;p&gt;Always try to use “alt” attribute with meaningful text in img tag. It’s also best practice for SEO purpose.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhj1dihftv0qbmpm1n28i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhj1dihftv0qbmpm1n28i.png" alt="Meaningful img alt attribute"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Kebab-case class naming
&lt;/h3&gt;

&lt;p&gt;Use “kebab-case” while class naming. If you don’t use any structured naming convention like,  BEM convention.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjde7gjd4a28bnjep2w0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjde7gjd4a28bnjep2w0.png" alt="Kebab-case class naming"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Relevant selector naming
&lt;/h3&gt;

&lt;p&gt;Tried to use meaningful class naming relevant to your block of –code .&lt;br&gt;
Tricks: Tried to use “.noun-adjective” format.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgowlujz2oe7w805fp3c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgowlujz2oe7w805fp3c.png" alt="Relevant selector naming"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Type attribute with link and script
&lt;/h3&gt;

&lt;p&gt;Don’t need to use “type” attribute for external styleSheet and script linking in HTML5 structure.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkur7637iz98osq9c6phy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkur7637iz98osq9c6phy.png" alt="Type attribute with link and script"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Atomic Class
&lt;/h3&gt;

&lt;p&gt;Use specific class or atomic class when needed, try to use short meaningful class name.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F824axbvkmd8celpvdy8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F824axbvkmd8celpvdy8u.png" alt="Atomic Class"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Variant class  in parent element
&lt;/h3&gt;

&lt;p&gt;Tried to added class in parent element if need give another style to the same block or need same block different style.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba8ncgllour69jl8e16h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fba8ncgllour69jl8e16h.png" alt="Variant class  in parent element"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Complex wrapping
&lt;/h3&gt;

&lt;p&gt;For better performance please tried to avoid unnecessary wrapping. It will create unnecessary node in your HTML tree and reduce performance too.&lt;br&gt;
Bad Practice&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz27yk65402ey9xb983zs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz27yk65402ey9xb983zs.png" alt="Complex wrapping bad practice"&gt;&lt;/a&gt;&lt;br&gt;
Good Practice&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8gqrfun6ht7nxusf10b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8gqrfun6ht7nxusf10b.png" alt="Complex wrapping good Practice"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Closing tag
&lt;/h3&gt;

&lt;p&gt;It is best practice to always concern with closing starting tag even if it is self-closing tag.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybo8ge44alvph0nm5d57.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybo8ge44alvph0nm5d57.png" alt="Closing tag"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Injecting external stylesheet
&lt;/h3&gt;

&lt;p&gt;External stylesheet always injects in  tag. Because The HTML5 specification stated a  element must have a “rel” attribute and if the “rel” attribute us used, the element is restricted to the head element.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjn26vh6h03pemsc6wb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmjn26vh6h03pemsc6wb2.png" alt="Injecting external styleSheet"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Injecting external script
&lt;/h3&gt;

&lt;p&gt;External script always injects at end of the body tag. &lt;br&gt;
As we know that HTML is loaded and execute line by line. So, when the browser encounters a script tag, it loads and executes the JavaScript code on the spot. This may low down the page rendering also JavaScript is often user to manipulate DOM and add new functionality to the webpage if script tag not added at end of the body tag, DOM may not be ready by that time this leading to unknown behavior. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8a5wyckoh66kycbl1dv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe8a5wyckoh66kycbl1dv.png" alt="HTML5 Injecting external script"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Code Comments
&lt;/h3&gt;

&lt;p&gt;It’s best practice to write human-readable code. Tried to comment your block of code. It will help you or any other developer to refactor the piece of code blocks.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa2940ff5gcsiyzmsmk9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa2940ff5gcsiyzmsmk9.png" alt="HTML5 Code Comments"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Last Words
&lt;/h3&gt;

&lt;p&gt;I hope you enjoy this article html5 coding guidelines and front end web development best practices. If you appreciate it or find any errors let me know in comments. Thanks for this journey  &amp;amp; Happy Coding.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
