<?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: Anton Nikiforov</title>
    <description>The latest articles on DEV Community by Anton Nikiforov (@invulner).</description>
    <link>https://dev.to/invulner</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%2F1036201%2F93cc87e5-5430-430a-bc17-f3285d08e786.jpeg</url>
      <title>DEV Community: Anton Nikiforov</title>
      <link>https://dev.to/invulner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/invulner"/>
    <language>en</language>
    <item>
      <title>Did you know in HTML ...</title>
      <dc:creator>Anton Nikiforov</dc:creator>
      <pubDate>Thu, 02 Mar 2023 18:05:02 +0000</pubDate>
      <link>https://dev.to/invulner/did-you-know-in-html--11j1</link>
      <guid>https://dev.to/invulner/did-you-know-in-html--11j1</guid>
      <description>&lt;p&gt;HTML is a powerful markup language that has been used for years to build websites and web applications. Despite its widespread use, there are several fascinating and lesser-known features of HTML that developers can use to create more interactive web pages. I want to share with you some interesting features of HTML that you may not have known before. Let's explore some of the hidden gems of HTML together!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oaBAuh0R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dizyd2iz6tnpse7x2o3i.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oaBAuh0R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dizyd2iz6tnpse7x2o3i.jpeg" alt="Try to surprise me HTML" width="577" height="433"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;1) Did you know in HTML, you can use the &lt;code&gt;download&lt;/code&gt; attribute to prompt the user to download a file when they click on a link?&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;a href="file.pdf" download&amp;gt;Download PDF&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Furthermore, by setting a value to this attribute, you can specify the name of the file that will be downloaded.&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;a href="file.pdf" download="custom-file-name"&amp;gt;Download PDF&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2) Did you know in HTML, you can use the &lt;code&gt;autofocus&lt;/code&gt; attribute to automatically set focus on an input field when the page loads?&lt;br&gt;
For example:&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;



&lt;p&gt;automatically sets focus on the input field.&lt;/p&gt;

&lt;p&gt;3) Did you know in HTML, you can use the &lt;code&gt;contenteditable&lt;/code&gt; attribute to make any element editable?&lt;br&gt;
For example:&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;This text is editable!&amp;lt;/p&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;allows the user to modify the text within the paragraph.&lt;/p&gt;

&lt;p&gt;4) Did you know in HTML, you can use the &lt;code&gt;details&lt;/code&gt; and &lt;code&gt;summary&lt;/code&gt; elements to create expandable sections?&lt;br&gt;
For example:&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;details&amp;gt;
  &amp;lt;summary&amp;gt;Click me to expand&amp;lt;/summary&amp;gt;
  Content goes here
&amp;lt;/details&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;shows the summary as a clickable element that expands to show the content.&lt;/p&gt;

&lt;p&gt;5) Did you know in HTML, you can use the &lt;code&gt;ping&lt;/code&gt; attribute to send a pingback request to a specified URL when a link is clicked?&lt;br&gt;
For example:&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;a
  href="https://example.com" 
  ping="https://analytics.example.com"
&amp;gt;
  Link
&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sends a brief HTTP POST request to the indicated URL, making it beneficial for monitoring or tracking purposes.&lt;/p&gt;

&lt;p&gt;6) Did you know in HTML, you can use the &lt;code&gt;translate&lt;/code&gt; attribute to specify if the content of an element should be translated? For example:&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="no"&amp;gt;This text should not be translated&amp;lt;/p&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;prevents the text from being translated by the browser.&lt;/p&gt;

&lt;p&gt;7) Did you know in HTML, you can use the &lt;code&gt;hidden&lt;/code&gt; attribute to hide elements from the page?&lt;br&gt;
For example:&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;This text is visible.&amp;lt;/p&amp;gt;
&amp;lt;p hidden&amp;gt;This text is hidden.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8) Did you know in HTML, you can use the &lt;code&gt;srcdoc&lt;/code&gt; attribute to embed an HTML document within another HTML document?&lt;br&gt;
For example:&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;iframe srcdoc="&amp;lt;h1&amp;gt;Hello, world!&amp;lt;/h1&amp;gt;"&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;9) Did you know in HTML, you can use the &lt;code&gt;spellcheck&lt;/code&gt; attribute to disable spell checking on a specific element?&lt;br&gt;
For example:&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="false" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;10) Did you know in HTML, the &lt;code&gt;bdo&lt;/code&gt; element can be used to specify the direction of text, such as for languages that are read from right to left?&lt;br&gt;
For example:&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;
  This text will display left-to-right.
  &amp;lt;bdo dir="rtl"&amp;gt;But this right-to-left.&amp;lt;/bdo&amp;gt;
&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  It's been real, it's been fun, but now it's done
&lt;/h2&gt;

&lt;p&gt;This article may not cover all the lesser-known features of HTML, but it's likely introduced you to some new and exciting possibilities. Perhaps some of the facts presented were already known to you, but hopefully, you discovered something surprising and useful. If any of these facts caught your attention or if you have additional tips or tricks, which impressed you, please leave a comment! Keep exploring and discovering new ways to enhance your web development skills!&lt;/p&gt;

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