<?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: Anshul Kumar</title>
    <description>The latest articles on DEV Community by Anshul Kumar (@hianshul07).</description>
    <link>https://dev.to/hianshul07</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%2F244646%2F601a94dc-d82b-478d-8e68-4fa18de87e43.jpg</url>
      <title>DEV Community: Anshul Kumar</title>
      <link>https://dev.to/hianshul07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hianshul07"/>
    <language>en</language>
    <item>
      <title>An introduction to CSS Selectors</title>
      <dc:creator>Anshul Kumar</dc:creator>
      <pubDate>Mon, 15 May 2023 07:01:44 +0000</pubDate>
      <link>https://dev.to/hianshul07/an-introduction-to-css-selectors-584m</link>
      <guid>https://dev.to/hianshul07/an-introduction-to-css-selectors-584m</guid>
      <description>&lt;h2&gt;
  
  
  CSS
&lt;/h2&gt;

&lt;p&gt;CSS stands for Cascading Style Sheet, CSS is used to style the webpage which is structured using HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Selectors
&lt;/h2&gt;

&lt;p&gt;While styling the HTML page we often have to select the different parts of the page, we select parts of the page by using selectors. Selectors can be of different types such as ID selector, universal selector, class selector, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Selectors
&lt;/h2&gt;

&lt;p&gt;There are many types of selectors but in this article we are going to focus only on the most used ones.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Universal selector&lt;/strong&gt;
The Universal selector targets all the elements of the HTML document. Universal selector is used using the &lt;code&gt;*&lt;/code&gt; symbol only.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
    margin: 0%;
    padding: 0%;
    box-sizing: border-box;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ID selector&lt;/strong&gt;
The ID selector can target an HTML element with the specified ID attribute, and an element with ID is selected using the &lt;code&gt;#&lt;/code&gt; symbol as a prefix. The ID selector can only be used only once in an HTML document.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#idName {
    /* this will seleect the id named idName */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Class selector&lt;/strong&gt;
The class selector can target an element with the given class attribute. The element with the class selector can be selected using the &lt;code&gt;.&lt;/code&gt; symbol.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.className {
    /* this will select the class named className */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Individual selector&lt;/strong&gt;
The Type selector targets only the selected element of the HTML document. A individual selector is used using the element name. For example -
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
    /* this will select the &amp;lt;p&amp;gt; element */
}

img {
    /* this will select the &amp;lt;img&amp;gt; element */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Now we will look at some &lt;strong&gt;CSS Combinators&lt;/strong&gt; -
&lt;/h2&gt;

&lt;p&gt;CSS Combinators are the relationship between two or more selectors which we can combine according to our requirements&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Descendant selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The descendant selector selects all the children of the specified element. This selector is represented with a single space (" ").&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Child Selector&lt;/strong&gt;
The Direct child selector selects only the direct child of the element. And it is represented with a ( &amp;gt; ) sign.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ul &amp;gt; li {
    /* this will select all the &amp;lt;li&amp;gt;
    elements which are the direct children
    of the list */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Adjacent sibling selector&lt;/strong&gt;
The sibling selector will target the immediate next element of the specified element which share the same parent. This selector is represented with a ( + ) sign
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img + p {
    /* this will select the immediate next &amp;lt;p&amp;gt;  
        element which is next to the
       &amp;lt;img&amp;gt; element  */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;General Sibling Selector&lt;/strong&gt;
This type of sibling selector will target all the next sibling elements of the specified elements, which share the same parents.
This selector is represented with a ( ~ ) sign.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img + p {
    /* this will select the all the &amp;lt;p&amp;gt;
        elements which are next to the
        &amp;lt;img&amp;gt; element  */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>CSS Grid</title>
      <dc:creator>Anshul Kumar</dc:creator>
      <pubDate>Thu, 13 Apr 2023 10:56:31 +0000</pubDate>
      <link>https://dev.to/hianshul07/css-grid-43f2</link>
      <guid>https://dev.to/hianshul07/css-grid-43f2</guid>
      <description>&lt;h2&gt;
  
  
  CSS Grid Layout
&lt;/h2&gt;

&lt;p&gt;Grid or CSS Grid is a layout system which uses rows and columns to to design the web page layout, it is also called two-dimensional layout because of the usage of rows and columns together. With grid layout system it is very easy to design the web page layouts, because before grid, the float and positioning system was used to  design web pages and that weren't doing a very good job because for example the aligning items together in center wasn't an easy job.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Grid basics
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The HTML layout used in this article.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;div class="parent"&amp;gt;
    &amp;lt;div class="child"&amp;gt;1&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;2&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;3&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;4&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;5&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;6&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;7&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;8&amp;lt;/div&amp;gt;
   &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Container&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parent div/element on which the &lt;code&gt;display: grid&lt;/code&gt; property is applied is called grid container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.parent {
    display: grid;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Item&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the direct child divs/elements of the parent grid container are called grid items. In this case all the divs with class child are grid items.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="parent"&amp;gt;
    &amp;lt;div class="child"&amp;gt;1&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;2&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;3&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;4&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;5&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;6&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;7&amp;lt;/div&amp;gt;
    &amp;lt;div class="child"&amp;gt;8&amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Gap&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The space applied between grid items is called grid gap.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; gap: 20px;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fmmzcut1mb75uebrintkd.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%2Fmmzcut1mb75uebrintkd.png" alt="Grid gap illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Rows&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The grid items aligned in the horizontal way are called grid rows.&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%2F57snuv9j0ekhuy6qerur.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%2F57snuv9j0ekhuy6qerur.png" alt="Grid rows illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Columns&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The grid items aligned in the vertical way are called grid columns.&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%2Fs2ctin9zx85nryasgvns.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%2Fs2ctin9zx85nryasgvns.png" alt="Grid columns illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Area&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The total space composed of rows and columns is called grid area.&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%2Fadn3xa8irpbjir1wylae.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%2Fadn3xa8irpbjir1wylae.png" alt="Grid area illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Grid Lines&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The dividing lines between rows and columns is called grid lines,&lt;br&gt;
the lines dividing the columns are called 1. &lt;strong&gt;The column lines&lt;/strong&gt; and the lines dividing the rows are called 2. &lt;strong&gt;The row lines.&lt;/strong&gt;&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%2Fh1c0pnlo8syqrbfhvkz9.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%2Fh1c0pnlo8syqrbfhvkz9.png" alt="Grid lines illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Grid properties
&lt;/h2&gt;

&lt;p&gt;Now let's take a look at some widely used Grid properties.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;column gap&lt;/strong&gt; - Specifies the gap between columns of grid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;row gap&lt;/strong&gt; - Specifies the gap between rows of the grid layout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-row-start&lt;/strong&gt; - Specifies the row line of a grid item's starting position.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-row-end&lt;/strong&gt; - Specifies the on which row line the grid item will end and it also used to tell how much rows an item can span. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-column-start&lt;/strong&gt; - Specifies the position of a grid item on the column line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-column-end&lt;/strong&gt; - Specifies the on which column line position the grid item will end and it also used to tell how much columns an item will span. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-area&lt;/strong&gt; - This property is a shorthand for &lt;code&gt;grid-row-start&lt;/code&gt;, &lt;code&gt;grid-row-end&lt;/code&gt;, &lt;code&gt;grid-column-start&lt;/code&gt; and &lt;code&gt;grid-column-end&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-template-columns&lt;/strong&gt; - This property tells that how many columns can be in the grid layout and also specifies the size of columns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;grid-template-rows&lt;/strong&gt; - This property tells that how many rows can be in the grid layout and also specifies the size of rows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article we learnt about the basics of the Grid system and some or the most used grid properties. But there is a lot to learn about grid than this. Hope you liked this article helpfull.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Input Elements in HTML</title>
      <dc:creator>Anshul Kumar</dc:creator>
      <pubDate>Tue, 21 Mar 2023 14:04:26 +0000</pubDate>
      <link>https://dev.to/hianshul07/input-elements-in-html-37lf</link>
      <guid>https://dev.to/hianshul07/input-elements-in-html-37lf</guid>
      <description>&lt;h2&gt;
  
  
  The Input Element
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; element in HTML is used to receive data from the user. The tag creates an area where the user can enter the data. There are several attributes which change the behavior of the input element based on the selected attribute. The input element is used with the HTML Form element. We can also use &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element with input to associate a name with the input field. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Label Element
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element is used to label the accompanying &lt;code&gt;&amp;lt;input /&amp;gt;&lt;/code&gt; element. The label is connected to the input element by using &lt;code&gt;for&lt;/code&gt; attribute of the label element which contains the id for the input element. The label element also used to work with screen readers for accessibility purposes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="name"&amp;gt;First name:&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  General Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="text" id="name"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Some frequently used attributes of the input element.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Input type text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;code&gt;type="text"&lt;/code&gt;, you gets a filed in which you can enter some text. This is the most frequently used attribute, this is generally used for user-name field. The field type text doesn't mean that you can only insert text in the field.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="txt"&amp;gt;Type text&amp;lt;/label&amp;gt;
&amp;lt;input type="text" id="txt"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6RMlTADZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/57ewcmu78svikgs5681j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6RMlTADZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/57ewcmu78svikgs5681j.png" alt="Image of text field" width="252" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input type password&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As the name suggests, this field is used to get the password from the user as an input. The difference between &lt;code&gt;type="text"&lt;/code&gt; and &lt;code&gt;type="password"&lt;/code&gt; is than when you enter your password or any text for the matter in the password field, the password is turned into star symbol or dots, depending on the browser so that others can't read your password.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="pass"&amp;gt;Type password&amp;lt;/label&amp;gt;
&amp;lt;input type="password" id="pass" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0vVNjtrd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nekqiy44rlknyxjr5ga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0vVNjtrd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nekqiy44rlknyxjr5ga.png" alt="Image of password field" width="324" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input type number&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;type="number"&lt;/code&gt;, you can enter numbers by default, in some browsers e.g. in Firefox you can also enter text into this field. You can use certain attributes to define the value entered. E.g. &lt;code&gt;step="20"&lt;/code&gt;,&lt;code&gt;min="10"&lt;/code&gt;, &lt;code&gt;max="110"&lt;/code&gt; etc. With these values the input box will take the number values from 10 to 110 with 20 numbers gap between.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="num"&amp;gt;Type number&amp;lt;/label&amp;gt;
&amp;lt;input type="number" name="" id="num" step="20" min="10" max="110"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_xLOwuQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/474wrd44od2jhsekp5a6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Q_xLOwuQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/474wrd44od2jhsekp5a6.png" alt="Image of number field" width="357" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input type checkbox&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With &lt;code&gt;type="checkbox"&lt;/code&gt; you get checkboxes which you can label with the &lt;code&gt;label&lt;/code&gt; element. The checkbox have two states, checked or unchecked. The checkbox is unchecked by default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="red"&amp;gt;Red&amp;lt;/label&amp;gt;
&amp;lt;input type="checkbox" name="" id="red"&amp;gt;

&amp;lt;label for="blue"&amp;gt;Blue&amp;lt;/label&amp;gt;
&amp;lt;input type="checkbox" name="" id="blue"&amp;gt;

&amp;lt;label for="green"&amp;gt;Green&amp;lt;/label&amp;gt;
&amp;lt;input type="checkbox" name="" id="green"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZLsgTVp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pmwmlwzvlt2j23m29rj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZLsgTVp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pmwmlwzvlt2j23m29rj.png" alt="Image checkboxes" width="436" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input type radio&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;&amp;lt;input type="radio" /&amp;gt;&lt;/code&gt;, you get radio buttons with accompanying options. The radio button have two states, selected or not selected. The checkbox is not selected by default .By default you can select any number of radio buttons you want just like the checkboxes, but you can change this behavior by giving the radio buttons with same &lt;code&gt;name&lt;/code&gt; value. In the below code I've given &lt;code&gt;name="colors"&lt;/code&gt; so I can select only one radio button at a time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="radio" name="colors" id="red" /&amp;gt;
&amp;lt;label for="red"&amp;gt;Red&amp;lt;/label&amp;gt;

&amp;lt;input type="radio" name="colors" id=blue""&amp;gt;
&amp;lt;label for="red"&amp;gt;Blue&amp;lt;/label&amp;gt;

&amp;lt;input type="radio" name="colors" id="green" /&amp;gt;
&amp;lt;label for="red"&amp;gt;Green&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--92eGnpZC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j1vfnj7sgyis2uuhisab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--92eGnpZC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j1vfnj7sgyis2uuhisab.png" alt="Image of radio buttons" width="398" height="86"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input type range&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In &lt;code&gt;&amp;lt;input type="range" /&amp;gt;&lt;/code&gt;, you get a slider, the slider have the values on it from 0 to 100. You can customize the number of steps by using the &lt;code&gt;step&lt;/code&gt; attribute, for example in the code below the slider will move 10 steps at a time, like 0-10, 10-20 and so on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="range"&amp;gt;10 step scale&amp;lt;/label&amp;gt;
&amp;lt;input type="range" step="10"&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bXelRF7e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jqv6q2aw0aw5ptnv87y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bXelRF7e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jqv6q2aw0aw5ptnv87y.png" alt="Image range slider" width="315" height="88"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There is a lot more I can write about the input element but in this article I've given you the basic introdunction of the input tag and some of the most common attributes which are used with the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; element. &lt;/p&gt;

&lt;p&gt;Hope you liked the article.&lt;/p&gt;

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