<?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: Omid Pishkar</title>
    <description>The latest articles on DEV Community by Omid Pishkar (@omidpishkar).</description>
    <link>https://dev.to/omidpishkar</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%2F843150%2F102900d8-40f3-499c-877e-ca249fac6f0c.jpeg</url>
      <title>DEV Community: Omid Pishkar</title>
      <link>https://dev.to/omidpishkar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omidpishkar"/>
    <language>en</language>
    <item>
      <title>Top Attributes or tags in HTML5</title>
      <dc:creator>Omid Pishkar</dc:creator>
      <pubDate>Mon, 11 Apr 2022 17:54:10 +0000</pubDate>
      <link>https://dev.to/omidpishkar/top-attributes-or-tags-in-html5-1n02</link>
      <guid>https://dev.to/omidpishkar/top-attributes-or-tags-in-html5-1n02</guid>
      <description>&lt;p&gt;In this post i want introduce to you some top attribute and element in html5.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. type='color' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this attribute you can allow the user to select a color.&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="color"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;2. 'dfn' element&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this element you can put a description for the text or content inside dfn.&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;p&amp;gt;&amp;lt;dfn&amp;gt;Omid Pishkar&amp;lt;/dfn&amp;gt;author&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;3. 'contenteditable' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;whit this attribute in any element you are able to specify whether the content is viewable or not.&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;p contenteditable='true'&amp;gt;I'm a front end developer&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;4. 'spellcheck' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This attribute corrects the content of your element in terms of spelling.&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;textarea spellcheck='true'&amp;gt;hollo&amp;lt;/textarea&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;5. 'download' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the user clicks on an element that has this attribute, the user can download it.&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;img src='./img/img1.png' download&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;6. 'accept' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This attribute specifies the content that the user can upload.&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='file' accept='image/*'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;7. 'translate' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Allow to translate texts of this element&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;p translate='true'&amp;gt;سلام&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;8. 'poster' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, you can put a poster on it before the video plays.&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;video controls poster'./img/img_2.jpg'&amp;gt;
    &amp;lt;source src'movie.mp4' type='Video/mp4'&amp;gt;
&amp;lt;/video&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;9. 'pattern' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can set a pattern based on the input value.&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;form&amp;gt;
   &amp;lt;input type='text' pattern='[A-Za-z]{4}'&amp;gt;
   &amp;lt;button type='submit'&amp;gt;Submit&amp;lt;/button&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;10. 'autocomplete' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Complete based on previous entries.&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='text' autocomplete='off'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;11. 'autofocus' attribute&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Focus on the desired element after the page is fully loaded.&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='text' autofocus&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>html</category>
    </item>
  </channel>
</rss>
