<?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: Youn</title>
    <description>The latest articles on DEV Community by Youn (@code1).</description>
    <link>https://dev.to/code1</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4084193%2Ff0149310-cfee-4663-9685-04d3a079ba6f.png</url>
      <title>DEV Community: Youn</title>
      <link>https://dev.to/code1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/code1"/>
    <language>en</language>
    <item>
      <title>HTML &lt;details&gt; Tag</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Thu, 10 Sep 2026 01:59:42 +0000</pubDate>
      <link>https://dev.to/code1/html-tag-3182</link>
      <guid>https://dev.to/code1/html-tag-3182</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-details-tag/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The &amp;lt;details&amp;gt; tag defines content that users can choose to open or close.&lt;br&gt;
It is typically used to provide additional information or details. According to the specification, it represents a disclosure widget that allows users to access extra information or controls.&lt;br&gt;
The &amp;lt;details&amp;gt; tag is commonly used to create interactive widgets, such as accordions, that users can expand or collapse.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Example
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;Summary content&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
    Additional information or details.
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Usage Notes
&lt;/h2&gt;

&lt;p&gt;To use the &amp;lt;details&amp;gt; tag effectively, you need to understand the &amp;lt;summary&amp;gt; tag.&lt;br&gt;
By default, the &lt;a href="https://coding.courses/html-summary-tag/" rel="noopener noreferrer"&gt;&amp;lt;summary&amp;gt;&lt;/a&gt; tag displays a marker shaped like a ► arrow.&lt;/p&gt;
&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;

&lt;p&gt;You can include any type of content inside the &amp;lt;details&amp;gt; tag, but using the &amp;lt;summary&amp;gt; tag indicates the title (summary content). If the &amp;lt;summary&amp;gt; tag is omitted, the user agent (such as a browser) provides its own default title (e.g., "Details").&lt;/p&gt;
&lt;h4&gt;
  
  
  Example with the &amp;lt;summary&amp;gt; Tag
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;Summary content&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- The &amp;lt;summary&amp;gt; tag represents the title --&amp;gt;&lt;/span&gt;
    Additional information or details.
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  Example without the &amp;lt;summary&amp;gt; Tag
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
    Additional information or details.
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  The open Attribute
&lt;/h3&gt;

&lt;p&gt;The open attribute is a boolean attribute.&lt;br&gt;
When this attribute is present, both the summary and the additional content are visible to the user. If the attribute is omitted, only the summary is shown.&lt;br&gt;
By default, the widget is collapsed. When it is expanded, the content becomes visible. If desired, the open attribute can be used to keep the widget open by default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;details&lt;/span&gt; &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- The widget is open by default when the open attribute is present --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;Summary content&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
    Additional information or details.
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-details-tag/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-details-tag/" rel="noopener noreferrer" class="c-link"&gt;
            HTML &amp;lt;details&amp;gt; Tag – The Details Disclosure Element - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The details tag defines content that users can choose to open or close. It is commonly used to provide additional or detailed information. This article also covers the open attribute used with the details tag.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>html</category>
      <category>details</category>
    </item>
    <item>
      <title>HTML &lt;link rel="preload"&gt;</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Tue, 08 Sep 2026 05:07:09 +0000</pubDate>
      <link>https://dev.to/code1/html-5ddb</link>
      <guid>https://dev.to/code1/html-5ddb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-link-relpreload/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The rel="preload" attribute of the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; tag specifies that the browser should preemptively fetch the resource specified by the href attribute and store it in the cache to preload it. It is used within the &lt;a href="https://coding.courses/html-head-tag/" rel="noopener noreferrer"&gt;&amp;lt;head&amp;gt;&lt;/a&gt; tag and is mainly used to preload resources needed by the current page, such as web fonts, images, and CSS files.&lt;br&gt;
This tag must be the first child element of the root &amp;lt;html&amp;gt; element, and the second child element of &amp;lt;html&amp;gt; is the &amp;lt;body&amp;gt; element.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Example
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Character encoding --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;The title of this page&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Document title --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"description"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"A short description of this page."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Document description --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"style.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Stylesheet --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"script.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt; &lt;span class="c"&gt;&amp;lt;!-- Script --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- The document's content --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&amp;lt;!DOCTYPE html&amp;gt;: This part declares the document type and serves to ensure that the browser follows the latest web standards and renders the document correctly. It is not an HTML element.&lt;/li&gt;
&lt;li&gt;&amp;lt;html&amp;gt;: The root element, which is the top-level element of an HTML document. All HTML elements must be contained within the &amp;lt;html&amp;gt; element.&lt;/li&gt;
&lt;li&gt;&amp;lt;head&amp;gt;: This part defines the metadata and header information of the HTML document. It provides information about the document to the browser and can be used to link external stylesheets, JavaScript files, and more.&lt;/li&gt;
&lt;li&gt;&amp;lt;body&amp;gt;: This part defines the body content of the HTML document. The content that is actually displayed on the web page is written in this section, and various elements such as text, images, links, tables, and forms can be included.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Technical Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &amp;lt;head&amp;gt; tag is a required tag that is essential for the basic structure of HTML.&lt;/li&gt;
&lt;li&gt;A standards-compliant HTML document must contain only one &amp;lt;head&amp;gt; tag.&lt;/li&gt;
&lt;li&gt;The &amp;lt;head&amp;gt; tag must be the first child element of the &amp;lt;html&amp;gt; element.&lt;/li&gt;
&lt;li&gt;The &amp;lt;head&amp;gt; tag must have the &amp;lt;body&amp;gt; element as a sibling element. In this structure, the &amp;lt;body&amp;gt; element must be positioned second.&lt;/li&gt;
&lt;li&gt;The &amp;lt;head&amp;gt; tag must contain a &amp;lt;title&amp;gt; element as a child element, unless the title information is provided by a parent document (such as an &amp;lt;iframe&amp;gt;) or by a higher-level protocol (such as the subject line of an HTML email). This element provides the title of the HTML document.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-link-relpreload/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-link-relpreload/" rel="noopener noreferrer" class="c-link"&gt;
            HTML &amp;lt;link rel="preload"&amp;gt; – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The rel="preload" attribute of the link tag specifies that the browser should preemptively fetch the resource specified by the href attribute and store it in the cache to preload it.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>html</category>
      <category>link</category>
      <category>preload</category>
    </item>
    <item>
      <title>HTML &lt;link rel="preconnect"&gt;</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Thu, 03 Sep 2026 03:10:29 +0000</pubDate>
      <link>https://dev.to/code1/html-219m</link>
      <guid>https://dev.to/code1/html-219m</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-link-relpreconnect/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The rel="preconnect" attribute of the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; tag specifies that the browser should preemptively establish a connection to the external domain specified by the href attribute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://another-domain.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This allows the browser to reduce the time required to establish a connection to an external domain, making it faster to load resources from that domain (such as images, scripts, and fonts).&lt;/p&gt;

&lt;p&gt;Before requesting resources from an external domain, the browser performs several connection steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It looks up the domain name to find the server's IP address. This is called a DNS (Domain Name System) lookup.&lt;/li&gt;
&lt;li&gt;After confirming the IP address, it establishes a connection to exchange data with the server. This is called a TCP (Transmission Control Protocol) connection.&lt;/li&gt;
&lt;li&gt;If a secure connection such as HTTPS is required, the browser establishes a secure connection via a TLS (Transport Layer Security) handshake.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These connection processes can vary depending on network conditions and may introduce a certain amount of latency when the browser first requests resources from an external domain.&lt;/p&gt;
&lt;h2&gt;
  
  
  Preconnecting to External Domains
&lt;/h2&gt;

&lt;p&gt;The &amp;lt;link&amp;gt; tag's rel="preconnect" attribute allows the browser to establish a connection in advance to the external domain specified by the href attribute. This allows the browser to reduce the time required to establish a connection to an external domain, making it faster to load resources from that domain.&lt;/p&gt;

&lt;p&gt;The simplest way to preconnect to an external domain is to add the &amp;lt;link&amp;gt; tag to the document's &lt;a href="https://coding.courses/html-head-tag/" rel="noopener noreferrer"&gt;&amp;lt;head&amp;gt;&lt;/a&gt; tag.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    ...
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preconnect"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css2?family=Roboto+Mono:ital@0;1&amp;amp;display=swap"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The example above connects a stylesheet provided by Google to use Google Web Fonts.&lt;/p&gt;

&lt;p&gt;The URL (&lt;a href="https://fonts.googleapis.com" rel="noopener noreferrer"&gt;https://fonts.googleapis.com&lt;/a&gt;) of the stylesheet provided by Google is an external domain. In the example above, the rel="preconnect" attribute of the &amp;lt;link&amp;gt; tag is used to specify that the browser should establish a connection in advance to the &lt;a href="https://fonts.googleapis.com" rel="noopener noreferrer"&gt;https://fonts.googleapis.com&lt;/a&gt; domain.&lt;/p&gt;

&lt;p&gt;By specifying the external domain to preconnect to with the rel="preconnect" attribute of the &amp;lt;link&amp;gt; tag before requesting external resources, the browser prepares a connection to that domain in advance, reducing the time required to load resources afterward. You can repeat the above code for each external domain you want to preconnect to.&lt;/p&gt;
&lt;h2&gt;
  
  
  Important Considerations
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Apply Only to Necessary External Domains
&lt;/h3&gt;

&lt;p&gt;The rel="preconnect" attribute of the &amp;lt;link&amp;gt; tag is quite useful, but applying it to every external domain can be counterproductive. This is because it can create unnecessary overhead for the browser and reduce the actual benefits of preconnecting. Be careful not to preconnect to too many external domains.&lt;/p&gt;

&lt;p&gt;If you need to preconnect to many external domains, using the rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag is recommended.&lt;/p&gt;

&lt;p&gt;The rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag can reduce DNS lookup time by allowing the browser to perform the DNS lookup, which is the first step in connecting to an external domain, in advance. Therefore, compared to the rel="preconnect" attribute of the &amp;lt;link&amp;gt; tag, it requires fewer connection-related tasks from the browser and can reduce the negative impact (such as performance degradation) on initial loading performance when used for multiple external domains.&lt;/p&gt;
&lt;h3&gt;
  
  
  # No Effect on the Same Domain
&lt;/h3&gt;

&lt;p&gt;The rel="preconnect" attribute of the &amp;lt;link&amp;gt; tag saves the time required to establish a connection to an external domain. Because the same domain is already connected, preconnecting to it has no effect.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-link-relpreconnect/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-link-relpreconnect/" rel="noopener noreferrer" class="c-link"&gt;
            HTML &amp;lt;link rel="preconnect"&amp;gt; – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The rel="preconnect" attribute of the link tag specifies that the browser should preemptively establish a connection to the external domain specified by the href attribute.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>preconnect</category>
      <category>html</category>
      <category>rel</category>
    </item>
    <item>
      <title>HTML &lt;link rel="dns-prefetch"&gt;</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Tue, 01 Sep 2026 02:13:33 +0000</pubDate>
      <link>https://dev.to/code1/html-3ofd</link>
      <guid>https://dev.to/code1/html-3ofd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-link-reldns-prefetch/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The rel="dns-prefetch" attribute of the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; tag specifies that the browser should preemptively perform DNS resolution for the external domain specified by the href attribute and cache IP address and other information required for connection.&lt;br&gt;
This reduces latency when the browser connects to that domain, thereby improving connection speed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"dns-prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://another-domain.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag is used to improve connection speed when the current web page needs to connect to external domains.&lt;br&gt;
There are many cases where a web page needs to connect to external domains.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When connecting to Google's service domain to use web fonts provided by Google&lt;/li&gt;
&lt;li&gt;When connecting to the corresponding domain to add external libraries or scripts to a web page&lt;/li&gt;
&lt;li&gt;When using externally hosted images or media on a web page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In these cases, using &amp;lt;link rel="dns-prefetch"&amp;gt;&lt;br&gt;
can improve page loading speed by allowing the page to connect to the corresponding external domains more quickly.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage Notes
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # DNS Resolution for a Domain
&lt;/h3&gt;

&lt;p&gt;Users remember websites by domain names, but servers identify them by IP addresses.&lt;br&gt;
This is why DNS (Domain Name System) exists.&lt;br&gt;
Browsers use DNS to convert a domain name into its corresponding IP address. This process is performed first when connecting to a domain. For example, suppose you link a CSS file provided by Google to use web fonts on your page. This file is located at an external domain path, &lt;a href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital@0;1&amp;amp;display=swap" rel="noopener noreferrer"&gt;https://fonts.googleapis.com/css2?family=Roboto+Mono:ital@0;1&amp;amp;display=swap&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    ...
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css2?family=Roboto+Mono:ital@0;1&amp;amp;display=swap"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Using &amp;lt;link rel="dns-prefetch"&amp;gt;&lt;br&gt;
performs DNS resolution for the linked domain in advance and caches IP address and other information required for connection, saving DNS resolution time for the domain.&lt;/p&gt;
&lt;h3&gt;
  
  
  # How to Implement
&lt;/h3&gt;

&lt;p&gt;The simplest way to implement rel="dns-prefetch" with the &amp;lt;link&amp;gt; tag is to add the &amp;lt;link&amp;gt; tag to the document's &amp;lt;head&amp;gt; tag.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    ...
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"dns-prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://fonts.googleapis.com/css2?family=Roboto+Mono:ital@0;1&amp;amp;display=swap"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This allows the browser to perform DNS resolution required to load Google web fonts in advance, which can improve page loading speed.&lt;br&gt;
You can repeat the above code for each external domain you want to connect to.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Important Considerations
&lt;/h3&gt;
&lt;h4&gt;
  
  
  - Not Supported by All Browser
&lt;/h4&gt;

&lt;p&gt;The rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag is supported by many modern browsers, but it may not be supported by older browsers or some browsers.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Do Not Overuse
&lt;/h4&gt;

&lt;p&gt;Using the rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag for all external domains is not recommended. It should only be used when necessary. Excessive DNS lookups can consume unnecessary resources. This unnecessary resource consumption can cause the browser to operate inefficiently. In general, you should try not to perform more than 10 DNS lookups.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Do Not Apply to Unused External Domains
&lt;/h4&gt;

&lt;p&gt;Do not use it for external domains that are not even used on the current page.&lt;br&gt;
This is simply wasteful and only causes unnecessary resource consumption by performing DNS lookups for domains that are not actually needed. This can cause the browser to operate inefficiently.&lt;/p&gt;
&lt;h4&gt;
  
  
  - rel="dns-prefetch" Can Only Be Used With the &amp;lt;link&amp;gt; Tag
&lt;/h4&gt;

&lt;p&gt;The rel="dns-prefetch" attribute can only be used with the &amp;lt;link&amp;gt; tag.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Performance Improvement May Be Minimal.
&lt;/h4&gt;

&lt;p&gt;The rel="dns-prefetch" attribute of the &amp;lt;link&amp;gt; tag can help improve web page loading speed, but the actual perceived speed improvement may be minimal. In particular, the effect may not be significant when the user's internet connection speed is slow or when the web page size is large.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-link-reldns-prefetch/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-link-reldns-prefetch/" rel="noopener noreferrer" class="c-link"&gt;
            HTML &amp;lt;link rel="dns-prefetch"&amp;gt; – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The rel="dns-prefetch" attribute of the link tag specifies that the browser should preemptively perform DNS resolution for the external domain specified by the href attribute and cache IP address and other information required for connection.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>prefetch</category>
      <category>rel</category>
      <category>html</category>
    </item>
    <item>
      <title>HTML &lt;link rel="prefetch"&gt;</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Fri, 28 Aug 2026 03:23:33 +0000</pubDate>
      <link>https://dev.to/code1/html-4j2n</link>
      <guid>https://dev.to/code1/html-4j2n</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-relprefetch/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The rel="prefetch" attribute of the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; tag specifies that the browser should preemptively fetch the resource specified by the href attribute and store it in the cache. It is used to prefetch and cache pages that the user is likely to navigate to next from the current page, or resources loaded after the page has finished loading (such as scripts, images, and CSS files).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/app/module.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;By doing this, resources expected to be used in the future are cached in advance.&lt;br&gt;
When these resources are used later after the web page has loaded, there is no need to load them over the network from scratch, which saves loading time.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage Notes
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Prefetch
&lt;/h3&gt;

&lt;p&gt;Understanding the term "prefetch" makes it easier to understand &amp;lt;link rel="prefetch"&amp;gt; and helps you better figure out how to use it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"&lt;strong&gt;prefetch&lt;/strong&gt;" refers to
caching necessary data (or resources) in advance before they are needed, and then immediately using the cached version when needed. This helps speed up the loading and use of data and resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &amp;lt;link rel="prefetch"&amp;gt; is the way this prefetching concept is applied in HTML.&lt;/p&gt;
&lt;h3&gt;
  
  
  # How to Implement
&lt;/h3&gt;

&lt;p&gt;The simplest way to implement rel="prefetch" with the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; tag is to add the &amp;lt;link&amp;gt; tag to the document's &lt;a href="https://coding.courses/html-head-tag/" rel="noopener noreferrer"&gt;&amp;lt;head&amp;gt;&lt;/a&gt; tag.&lt;/p&gt;

&lt;p&gt;Specify the resource path as the value of the href attribute.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    ...
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/app/module.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/app/module.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can use multiple &amp;lt;link&amp;gt; tags with rel="prefetch" in a single document.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Important Considerations
&lt;/h3&gt;

&lt;p&gt;There are several important considerations when using the rel="prefetch" attribute of the &amp;lt;link&amp;gt; tag.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Apply Only to Resources Needed Later
&lt;/h4&gt;

&lt;p&gt;&amp;lt;link rel="prefetch"&amp;gt; does not directly improve the loading speed of resources when applied to resources loaded along with the current web page.&lt;/p&gt;

&lt;p&gt;Instead, &amp;lt;link rel="prefetch"&amp;gt; fetches pages that the user is likely to visit later, or resources needed after the page has finished loading, and stores them in the browser's cache. This can potentially speed up page loading when those resources are needed later, since they are already stored in the local cache.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Distinguishing Between Same-Origin and Cross-Origin Resources
&lt;/h4&gt;

&lt;p&gt;&amp;lt;link rel="prefetch"&amp;gt; is primarily used to prefetch resources or documents from the same origin.&lt;br&gt;
Cross-origin resources can also be fetched, but they may be restricted depending on the browser's security policies (such as CORS, Cross-Origin Resource Sharing) or privacy policies (such as third-party cookie restrictions).&lt;/p&gt;

&lt;p&gt;For example, assume that the URL of a web page is &lt;a href="https://example.com/page-1.html" rel="noopener noreferrer"&gt;https://example.com/page-1.html&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In addition to &lt;a href="https://example.com/styles.css" rel="noopener noreferrer"&gt;https://example.com/styles.css&lt;/a&gt; from the same domain, resources from an external domain, such as &lt;a href="https://other-domain.com/image.png" rel="noopener noreferrer"&gt;https://other-domain.com/image.png&lt;/a&gt;, can also be prefetched using . However, when fetching resources from an external domain, appropriate CORS configuration is required depending on the browser's security policies.&lt;/p&gt;
&lt;h4&gt;
  
  
  - rel="prefetch" Can Only Be Used With the &amp;lt;link&amp;gt; Tag
&lt;/h4&gt;

&lt;p&gt;The rel="prefetch" attribute can only be used with the &amp;lt;link&amp;gt; tag.&lt;br&gt;
Using this attribute with tags other than the &amp;lt;link&amp;gt; tag, such as &amp;lt;a&amp;gt;, &amp;lt;img&amp;gt;, &amp;lt;video&amp;gt;, and &lt;a href="https://coding.courses/html-meta-tag/" rel="noopener noreferrer"&gt;&amp;lt;meta&amp;gt;&lt;/a&gt; tags, has no effect.&lt;/p&gt;
&lt;h4&gt;
  
  
  - Avoid Using Multiple &amp;lt;link rel="prefetch"&amp;gt; Tags for the Same Resource
&lt;/h4&gt;

&lt;p&gt;Using multiple &amp;lt;link rel="prefetch"&amp;gt; tags for the same resource is not efficient and may put an unnecessary burden on the browser. If multiple prefetch requests occur at the same time, they can result in unnecessary network traffic and inefficient use of the browser's cache memory.&lt;/p&gt;
&lt;h4&gt;
  
  
  - &amp;lt;link rel="prefetch"&amp;gt; Does Not Affect JavaScript's onload Event
&lt;/h4&gt;

&lt;p&gt;The JavaScript onload event occurs after all page resources have been loaded and the DOM tree has been fully constructed. The onload event is designed to occur after the DOM tree has been fully constructed and all resources have been loaded.&lt;/p&gt;

&lt;p&gt;Resources prefetched using &amp;lt;link rel="prefetch"&amp;gt; do not affect DOM tree construction or the loading of other resources, so they do not affect when the onload event is triggered.&lt;/p&gt;

&lt;p&gt;Therefore, when using the onload event to determine whether page loading has completed, there is no need to consider resources prefetched using &amp;lt;link rel="prefetch"&amp;gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  - &amp;lt;link rel="prefetch"&amp;gt; Does Not Work Recursively
&lt;/h4&gt;

&lt;p&gt;&amp;lt;link rel="prefetch"&amp;gt; is used to instruct the browser to prefetch a specific resource. However, it does not automatically prefetch &lt;strong&gt;other resources included in that resource&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Practical Examples
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Prefetching the Next Page
&lt;/h3&gt;

&lt;p&gt;While the user is visiting the current page, required resources for the next page can be prefetched to minimize the time required to navigate to that page.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Prefetching the Next Page&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"next-page.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Current Page&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"next-page.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Go to the next page&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Optimizing Asynchronous Component Loading
&lt;/h3&gt;

&lt;p&gt;In web applications, asynchronously loaded components can be prefetched to minimize loading delays when users request those features.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Optimizing Asynchronous Component Loading&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Prefetch an asynchronously loaded component --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"prefetch"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"async-component.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Current Page&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
            To load the asynchronous component,
            click &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"load-component"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;here&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;.
        &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;btn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;load-component&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="nx"&gt;btn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// Load the component asynchronously&lt;/span&gt;
                &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;async-component.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;module&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="c1"&gt;// Use the loaded component&lt;/span&gt;
                &lt;span class="p"&gt;});&lt;/span&gt;
            &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-relprefetch/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-relprefetch/" rel="noopener noreferrer" class="c-link"&gt;
            HTML &amp;lt;link rel="prefetch"&amp;gt; – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The rel="prefetch" attribute of the link tag specifies that the browser should preemptively fetch the resource specified by the href attribute and store it in the cache.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>prefetch</category>
      <category>rel</category>
      <category>html</category>
    </item>
    <item>
      <title>HTML hidden Attribute</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Mon, 24 Aug 2026 05:34:37 +0000</pubDate>
      <link>https://dev.to/code1/html-hidden-attribute-259i</link>
      <guid>https://dev.to/code1/html-hidden-attribute-259i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-hidden-attribute/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The hidden attribute indicates that an element is hidden, meaning it is not visually rendered and is not accessible to screen readers.&lt;br&gt;
Use this attribute when the element's content should not be presented to the user.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The hidden attribute is a global attribute that can be used on any HTML element.&lt;/li&gt;
&lt;li&gt;It is a Boolean attribute, meaning you only need to include the attribute name without specifying a value.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Basic Example
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#cdcd4c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;beige&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
    This content is important and should be read right away.
    &lt;span class="nt"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;
    I'm really glad you found it! 😃
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!--
    As a Boolean attribute,
    only the attribute name is included
    without specifying a value.
--&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;hidden&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    This content is not currently relevant to this page and should not be displayed.
    &lt;span class="nt"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;
    There's nothing to see here. 😥
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;They are not displayed on the screen.&lt;/li&gt;
&lt;li&gt;They do not take up any space in the layout.&lt;/li&gt;
&lt;li&gt;They are hidden from all forms of presentation, including screen readers and other assistive technologies.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The Difference Between Using the HTML hidden Attribute and CSS display: none
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # HTML hidden
&lt;/h3&gt;

&lt;p&gt;Used to explicitly define in the HTML that the content is currently irrelevant and should not be presented to the user.&lt;br&gt;
(Semantic Importance)&lt;/p&gt;
&lt;h3&gt;
  
  
  # CSS display: none
&lt;/h3&gt;

&lt;p&gt;Used primarily to hide an element visually as a matter of styling.&lt;br&gt;
(Presentational Importance)&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-hidden-attribute/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-hidden-attribute/" rel="noopener noreferrer" class="c-link"&gt;
            HTML hidden Attribute – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The hidden attribute indicates that an element is hidden, meaning it is not visually rendered and is not accessible to screen readers. Use this attribute when the element's content should not be presented to the user.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>hidden</category>
      <category>html</category>
      <category>attribute</category>
    </item>
    <item>
      <title>HTML title Attribute</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Fri, 21 Aug 2026 03:58:31 +0000</pubDate>
      <link>https://dev.to/code1/html-title-attribute-1pcp</link>
      <guid>https://dev.to/code1/html-title-attribute-1pcp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-title-attribute/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The title attribute represents advisory information about the element, such as guidance or descriptive notes.&lt;br&gt;
In some desktop browsers, this information is displayed as a tooltip. The value of the attribute is text.&lt;br&gt;
The title attribute is a global attribute that can be applied to any HTML element.&lt;/p&gt;
&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;On links, it can serve as a title or provide a description of the target resource.&lt;/li&gt;
&lt;li&gt;On images, it can provide image credits or supplementary information about the image.&lt;/li&gt;
&lt;li&gt;On paragraphs, it can serve as a footnote or commentary on the text.&lt;/li&gt;
&lt;li&gt;On interactive content, it can provide a label or instructions for using the element.&lt;/li&gt;
&lt;li&gt;It provides advisory information to enhance accessibility of other web content.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Practical Examples
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Usage on Links
&lt;/h3&gt;

&lt;p&gt;On links, the title attribute can provide additional description or a title for the target resource.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://www.example.com"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Go to the official website"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Example Website&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Usage on Images
&lt;/h3&gt;

&lt;p&gt;For images represented with the &amp;lt;img&amp;gt; tag, the title attribute can provide important supplementary information or image credits.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"example.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Example image"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Additional information about this example image"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Usage on Paragraphs
&lt;/h3&gt;

&lt;p&gt;On paragraphs, the title attribute can provide footnotes or commentary on the text.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Let's learn &lt;span class="nt"&gt;&amp;lt;abbr&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Hypertext Markup Language"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;HTML&lt;span class="nt"&gt;&amp;lt;/abbr&amp;gt;&lt;/span&gt; in a fun and easy way!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Usage on Interactive Content
&lt;/h3&gt;

&lt;p&gt;For interactive elements, the title attribute can provide a label or instructions for using the element.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Click this button to confirm."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Confirm&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Advisory Information for Accessible Content
&lt;/h3&gt;

&lt;p&gt;It also provides advisory information to enhance accessibility, helping users understand and interact with web content via screen readers or other assistive technologies.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"This section is important."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This part of the page contains key content.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Wikipedia page about HTML language"&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://en.wikipedia.org/wiki/HTML"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Purpose of the title Attribute
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Using Tooltips
&lt;/h3&gt;

&lt;p&gt;The title attribute is often used to provide a tooltip for an element. When a user hovers their mouse over the element, the browser displays the text specified in the title attribute as a tooltip, providing additional information or explanation about the element.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Improving Web Accessibility
&lt;/h3&gt;

&lt;p&gt;The title attribute can help improve the accessibility of a web page. Users with visual or functional limitations, particularly those using screen readers, can obtain information about elements through the title attribute.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Providing Additional Information
&lt;/h3&gt;

&lt;p&gt;The title attribute can provide supplementary information for various elements, such as image credits, link destinations, paragraph footnotes, citation sources, or button actions.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-title-attribute/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-title-attribute/" rel="noopener noreferrer" class="c-link"&gt;
            HTML title Attribute – Proper Understanding and Usage - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The title attribute represents advisory information about the element, such as guidance or descriptive notes.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>title</category>
      <category>attribute</category>
      <category>html</category>
    </item>
    <item>
      <title>HTML contenteditable Attribute</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Fri, 21 Aug 2026 03:16:19 +0000</pubDate>
      <link>https://dev.to/code1/html-contenteditable-attribute-2fhe</link>
      <guid>https://dev.to/code1/html-contenteditable-attribute-2fhe</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-contenteditable-attribute/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The contenteditable attribute specifies whether the content of an element is editable.&lt;br&gt;
When set to true, the content of the element can be edited. When set to false, the content cannot be edited.&lt;br&gt;
The contenteditable attribute is one of the global HTML attributes that allows users to directly edit the text or content inside the element.&lt;br&gt;
Using this attribute enables simple text editing on a web page. Combined with JavaScript, it is possible to build inline text editors.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Example
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;contenteditable=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding: 15px; background: #eee; border-radius: 5px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Try editing this content directly.
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;element&lt;/span&gt; &lt;span class="na"&gt;contenteditable=&lt;/span&gt;&lt;span class="s"&gt;"true|false|plaintext-only"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Values
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;true&lt;/b&gt; : Enables the content of the element to be editable by the user. When the user clicks or focuses on the element, they can modify the text.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;"" (empty string)&lt;/b&gt; : Treated the same as true. An empty string value makes the content editable.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;false&lt;/b&gt; : Disables editing of the element's content. The user cannot click or modify the text inside the element.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;plaintext-only&lt;/b&gt; : Editing is limited to plain text. Formatting such as HTML tags, CSS styles, and JavaScript code will not take effect.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Things to Keep in Mind
&lt;/h2&gt;

&lt;p&gt;As you can see from the allowed values, the contenteditable attribute is not a boolean attribute. It is an enumerated attribute.&lt;br&gt;
If no value is provided, it is treated as an empty string (""), which is equivalent to true.&lt;/p&gt;
&lt;h2&gt;
  
  
  Elements Where the contenteditable Attribute Does Not Apply
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&amp;lt;input&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;textarea&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-contenteditable-attribute/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-contenteditable-attribute/" rel="noopener noreferrer" class="c-link"&gt;
            HTML contenteditable Attribute – Making HTML Elements Editable - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The contenteditable attribute specifies whether the content of an element is editable. When set to true, the content becomes editable. When set to false, editing is disabled.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>html</category>
      <category>contenteditable</category>
      <category>attribute</category>
    </item>
    <item>
      <title>Most Commonly Used Kaomoji List</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Wed, 19 Aug 2026 06:58:07 +0000</pubDate>
      <link>https://dev.to/code1/most-commonly-used-kaomoji-list-2j4a</link>
      <guid>https://dev.to/code1/most-commonly-used-kaomoji-list-2j4a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://codingeverybody.jp/kaomojis/" rel="noopener noreferrer"&gt;codingeverybody.jp&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Kaomoji List by Emotion and Situation
&lt;/h2&gt;

&lt;p&gt;Here is a list of the most commonly used kaomojis (Japanese text emoticons), organized by emotion and situation.&lt;/p&gt;

&lt;h4&gt;
  
  
  # Retro and Minimalist
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;;)
^_~
;-)
:)
^_^
^_____^
:-)
:D
^0^
:-D
:(
:-(
U_U
OwO
O.O
^o^
^3^
X_X
T_T
+_+
O_O
¬_¬
=.=
^_+
^.^
*_*
^^;
^_-
-_-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Happiness
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ヾ(≧▽≦*)o
φ(*￣0￣)
q(≧▽≦q)
ψ(｀∇´)ψ
（￣︶￣）↗
*^____^*
(～￣▽￣)～
( •̀ ω •́ )✧
[]~(￣▽￣)~*
φ(゜▽゜*)♪
o(*^＠^*)o
O(∩_∩)O
(✿◡‿◡)
(*^▽^*)
（*＾-＾*）
(*^_^*)
(❁´◡`❁)
(≧∇≦)ﾉ
(●ˇ∀ˇ●)
\^o^/
(‾◡◝)
╰(*°▽°*)╯
o(*￣▽￣*)ブ
(^_-)db(-_^)
♪(^∇^*)
(≧∀≦)ゞ
o(*￣︶￣*)o
( $ _ $ )
(☆▽☆)
ㄟ(≧◇≦)ㄏ
( *︾▽︾)
ƪ(˘⌣˘)ʃ
o(*￣▽￣*)o
♪(´▽｀)
(^0^* )
(≧∇≦)/
ヽ(○･▽･○)ﾉ♪
♪(´▽｀)ノ
\(^o^)/
(ﾉ^o^)ﾉ
ヽ(°〇°)ﾉ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Greetings
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ヾ(•ω•`)o
\(￣︶￣*\))
(* ￣3)(ε￣ *)
－O－
(*￣3￣)╭
( ´･･)ﾉ(._.`)
(｡･∀･)ﾉﾞ
o(*￣▽￣*)ブ
(_　_)。゜zｚＺ
(ToT)/~~~
(∪.∪ )...zzz
!(*￣(￣　*)
(￣o￣) . z Z
(づ￣ 3￣)づ
（＾∀＾●）ﾉｼ
（づ￣3￣）づ╭❤～
\(@^0^@)/
ヾ(^▽^*)))
(～﹃～)~zZ
☆⌒(*＾-゜)v
(￣o￣) . z Z
(*￣;(￣ *)
||ヽ(*￣▽￣*)ノミ|Ю
☆⌒(*＾-゜)v
(＾Ｕ＾)ノ~ＹＯ
o(*°▽°*)o
ヾ(￣▽￣) Bye~Bye~
( ﾟдﾟ)つ Bye
(๑•̀ㅂ•́)و✧
(o゜▽゜)o☆
(ﾉ◕ヮ◕)ﾉ*:･ﾟ✧
(∩^o^)⊃━☆
✪ ω ✪
d=====(￣▽￣*)b
o(*￣▽￣*)o
(╹ڡ╹ )
(u‿ฺu✿ฺ)
♪(´▽｀)
(╯▽╰ )
ヽ(✿ﾟ▽ﾟ)ノ
( •̀ .̫ •́ )✧
Ψ(￣∀￣)Ψ
o(≧∀≦)o
b(￣▽￣)d
o(^▽^)o
(¬‿¬)
(•_•)
(⌐■_■)
( ﾉ ﾟｰﾟ)ﾉ
(^◡^)
( ´ ▽ ` )ﾉ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Acting Cute
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(￣y▽,￣)╭
(o|o)
(^人^)
§(*￣▽￣*)§
ψ(._. )&amp;gt;
(/▽＼)
(o′┏▽┓｀o)
(*≧︶≦))(￣▽￣* )ゞ
(　o=^•ェ•)o　┏━┓
◑﹏◐
(○｀ 3′○)
(ಥ _ ಥ)
(⓿_⓿)
(❤´艸｀❤)
(ง •_•)ง
ผ(•̀_•́ผ)
（〃｀ 3′〃）
(●'◡'●)
(. ❛ ᴗ ❛.)
ლ(╹◡╹ლ)
o(〃＾▽＾〃)o
(。・ω・。)
(✿◠‿◠)
(ﾉ*ФωФ)ﾉ
ˋ( ° ▽、° )
(*/ω＼*)
=￣ω￣=
ο(=•ω＜=)ρ⌒☆
(✿◕‿◕✿)
(◔◡◔)
(★‿★)
╰(￣ω￣ｏ)
~(￣▽￣)~*
〜(￣▽￣〜)
(〜￣▽￣)〜
(～o￣3￣)～
(っ´Ι`)っ
ԅ(¯﹃¯ԅ)
(￣﹃￣)
(❤ ω ❤)
(°°)～
（￣。。￣）
( ఠൠఠ )ﾉ
ฅʕ•̫͡•ʔฅ
(￣(工)￣)
(ʘ ͟ʖ ʘ)
( ͡~ ͜ʖ ͡°)
¯\_( ͡° ͜ʖ ͡°)_/¯
(ʘᴥʘ)
¯\_(ツ)_/¯
(▰˘◡˘▰)
₍ᐢ.ˬ.ᐢ₎
(≧◡≦)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  # Sadness
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/_ \
（；´д｀）ゞ
(￣ ‘i ￣;)
( *^-^)ρ(*╯^╰)
(ノへ￣、)
（＞人＜；）
(#｀-_ゝ-)
≡(▔﹏▔)≡
⊙﹏⊙∥
╯︿╰
(┬┬﹏┬┬)
(´。＿。｀)
(˘･_･˘)
(；′⌒`)
〒▽〒
(T_T)
(≧﹏ ≦)
o(TヘTo)
X﹏X
( ͡o╭╮ ͡o)
(╯︵╰,)o)
(╥ᆺ╥；)
o(╥﹏╥)o
(╥_╥)
(╥╯θ╰╥)
(｡╯︵╰｡)
(╯︵╰)
(◞‸◟)
(个_个)
(×﹏×)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Things to Keep in Mind When Using Kaomoji
&lt;/h2&gt;

&lt;p&gt;The key considerations when using Kaomoji are text encoding issues (character corruption) and automatic line breaks.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Text Corruption and Automatic Line Breaks
&lt;/h3&gt;

&lt;p&gt;Kaomoji often include uncommon special characters, such as Greek letters, Cyrillic characters, and Chinese character radicals.&lt;br&gt;
To prevent characters from missing or text from becoming corrupted, you should choose Kaomoji that use only Unicode characters, which are the globally standardized character set.&lt;/p&gt;

&lt;p&gt;The Kaomoji introduced here are selected with this in mind whenever possible. If you plan to use them on a web page, double-check that the font specified in the CSS font-family property supports those Kaomoji characters.&lt;/p&gt;

&lt;p&gt;In addition, on narrow smartphone screens or when text wraps automatically, parts of a Kaomoji may be split across lines due to font size or line-width constraints, making the shape difficult to recognize.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://codingeverybody.jp/kaomojis/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcodingeverybody.jp%2Fwp-content%2Fthemes%2Fcodingeverybody-jp%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://codingeverybody.jp/kaomojis/" rel="noopener noreferrer" class="c-link"&gt;
            よく使われる人気の顔文字（Kaomoji）一覧：感情・シーン別まとめ - codingEverybody
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            よく使われる人気の顔文字を、感情やシーン別にまとめました。気になる顔文字を見つけて、そのままコピーしてご活用ください。
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcodingeverybody.jp%2Fwp-content%2Fuploads%2Fcropped-favicon-wp-32x32.png" width="32" height="32"&gt;
          codingeverybody.jp
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>kaomoji</category>
    </item>
    <item>
      <title>HTML crossorigin Attribute : CORS Request Modes</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Wed, 19 Aug 2026 06:51:30 +0000</pubDate>
      <link>https://dev.to/code1/html-crossorigin-attribute-cors-request-modes-27pi</link>
      <guid>https://dev.to/code1/html-crossorigin-attribute-cors-request-modes-27pi</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/html-crossorigin-attribute/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The crossorigin attribute specifies the CORS (Cross-Origin Resource Sharing) request mode used when fetching resources linked to an element from an external origin.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  CORS (Cross-Origin Resource Sharing)
&lt;/h4&gt;

&lt;p&gt;CORS is a web standard mechanism that allows web browsers to request and access external resources that might otherwise be blocked for security reasons.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using the crossorigin attribute allows you to safely use external resources (e.g., external images, fonts, and scripts) according to web standards by specifying the CORS request mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage Notes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  # Understanding the Interaction Between Resources from External Origins and the Current Web Page
&lt;/h3&gt;

&lt;h4&gt;
  
  
  - Same-Origin Policy (SOP)
&lt;/h4&gt;

&lt;p&gt;Browsers implement a core security mechanism called the Same-Origin Policy (SOP). This policy restricts how documents or scripts loaded from the current origin can interact with resources from an external origin.&lt;/p&gt;

&lt;p&gt;When resources from an external origin are linked to a web page, browsers restrict interactions with those resources for security reasons. This security rule is called the Same-Origin Policy (SOP).&lt;/p&gt;

&lt;h4&gt;
  
  
  - Cases Where the Same-Origin Policy Allows Access to Resources from an External Origin
&lt;/h4&gt;

&lt;p&gt;The Same-Origin Policy does not unconditionally restrict access to resources from an external origin.&lt;br&gt;
It allows limited access to resources from external origins. A prime example is when resources are simply embedded into the current web page.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;External script files embedded using &amp;lt;script src="…"&amp;gt;&amp;lt;/script&amp;gt;&lt;/li&gt;
&lt;li&gt;External CSS files linked using &amp;lt;link rel="stylesheet" href="…"&amp;gt;&lt;/li&gt;
&lt;li&gt;Media played using &amp;lt;video&amp;gt;and &amp;lt;audio&amp;gt;&lt;/li&gt;
&lt;li&gt;Images displayed using &amp;lt;img&amp;gt; and &amp;lt;picture&amp;gt;&lt;/li&gt;
&lt;li&gt;Content embedded using &amp;lt;iframe&amp;gt;&lt;/li&gt;
&lt;li&gt;External resources embedded using &amp;lt;object&amp;gt; and &amp;lt;embed&amp;gt;&lt;/li&gt;
&lt;li&gt;Fonts applied using the CSS @font-face rule (some browsers may require the same origin)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  - Cases Where the Same-Origin Policy Restricts Access to Resources from an External Origin
&lt;/h4&gt;

&lt;p&gt;Simply embedding resources from an external origin does not generally restrict access.&lt;br&gt;
However, when the current web page interacts with resources from an external origin, access is restricted because it may affect security.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data communication: When the current web page communicates with resources from an external origin (e.g., fetching data through an AJAX request)&lt;/li&gt;
&lt;li&gt;Access to cookies and stored information: When resources from an external origin attempt to access information from the current web page (e.g., attempting to access user cookies)&lt;/li&gt;
&lt;li&gt;External origin resources within simply embedded resources from an external origin: When resources from an external origin exist within simply embedded resources from another external origin, access may be restricted to maintain security.&lt;/li&gt;
&lt;li&gt;Script execution: When attempting to execute scripts from external origin resources on the current web page, or when external origin resources attempt to call script APIs of the current web page (certain specific APIs may be allowed).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  # CORS (Cross-Origin Resource Sharing)
&lt;/h3&gt;

&lt;p&gt;CORS (Cross-Origin Resource Sharing) is a web standard mechanism that allows interactions between the current origin, which is restricted by the Same-Origin Policy, and resources from an external origin.&lt;/p&gt;

&lt;p&gt;This mechanism can be broadly divided into two approaches: specifying the CORS request mode using the HTML crossorigin attribute, and configuring CORS policies on the server to allow interactions with resources from an external origin.&lt;/p&gt;

&lt;p&gt;This article covers how to specify the CORS request mode applied when fetching resources from an external origin using the crossorigin attribute.&lt;/p&gt;
&lt;h2&gt;
  
  
  Specifying CORS Request Modes for External Origin Resources Using the crossorigin Attribute
&lt;/h2&gt;

&lt;p&gt;The crossorigin attribute is used for requests to resources from an external origin, such as those made by the &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt;, &amp;lt;img&amp;gt;, &amp;lt;script&amp;gt;, &amp;lt;video&amp;gt;, and &amp;lt;audio&amp;gt; elements. It specifies the CORS request mode applied when fetching external origin resources linked to the element.&lt;/p&gt;

&lt;p&gt;The crossorigin attribute value specifies the CORS request mode applied when fetching resources from an external origin. This value determines how the CORS request is processed.&lt;/p&gt;
&lt;h3&gt;
  
  
  # Things to Keep in Mind
&lt;/h3&gt;

&lt;p&gt;Unlike general resources, web fonts are loaded into web pages using the CSS @font-face rule. During this process, browsers may perform CORS requests in the background. Therefore, even for same-origin web font resources, when preloading them using &lt;a href="https://coding.courses/html-link-tag/" rel="noopener noreferrer"&gt;&amp;lt;link&amp;gt;&lt;/a&gt; with rel="preload", it is recommended to use crossorigin="anonymous" as well to ensure that the same CORS request mode is used as the actual font loading request.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/html-crossorigin-attribute/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/html-crossorigin-attribute/" rel="noopener noreferrer" class="c-link"&gt;
            HTML crossorigin Attribute – Specifying CORS Request Modes - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The crossorigin attribute specifies the CORS (Cross-Origin Resource Sharing) request mode used when fetching resources linked to an element from an external origin.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>crossorigin</category>
      <category>html</category>
      <category>cors</category>
    </item>
    <item>
      <title>JavaScript getElementById() Function</title>
      <dc:creator>Youn</dc:creator>
      <pubDate>Wed, 19 Aug 2026 03:35:57 +0000</pubDate>
      <link>https://dev.to/code1/javascript-getelementbyid-function-a-complete-guide-4g39</link>
      <guid>https://dev.to/code1/javascript-getelementbyid-function-a-complete-guide-4g39</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😄 This post is based on the content from &lt;a href="https://coding.courses/javascript-getelementbyid-function/" rel="noopener noreferrer"&gt;coding.courses&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Definition and Usage
&lt;/h2&gt;

&lt;p&gt;The getElementById() function returns the Element object whose HTML id attribute value matches the specified string. If no matching element exists, it returns null.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;getElementById() Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"hello"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Welcome! Nice to meet you!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;changeColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;newColor&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Finds the element with id="hello".&lt;/span&gt;
                &lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;newColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"changeColor('red');"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Change to Red&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"changeColor('blue');"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Change to Blue&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Return Value
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Returns the element (Element) object whose HTML id attribute value matches the specified string.&lt;/li&gt;
&lt;li&gt;Returns null if no matching element exists.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Things to Keep in Mind
&lt;/h2&gt;
&lt;h3&gt;
  
  
  # Preventing Errors When the Target Element Does Not Exist
&lt;/h3&gt;

&lt;p&gt;The getElementById() function returns null if the element to find does not exist.&lt;/p&gt;
&lt;h3&gt;
  
  
  # The Value of the Target Element's id Attribute Is Case-Sensitive
&lt;/h3&gt;

&lt;p&gt;The id parameter of the getElementById(id) function is a case-sensitive string.&lt;/p&gt;
&lt;h3&gt;
  
  
  # getElementById() Is Only a Method of the document Object
&lt;/h3&gt;

&lt;p&gt;The getElementById() function is a document-only method used to find elements based on the entire HTML document.&lt;br&gt;
Therefore, it cannot be used on Element objects accessed through properties such as parentNode and parentElement.&lt;/p&gt;
&lt;h2&gt;
  
  
  References
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://coding.courses/javascript-getelementbyid-function/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fthemes%2Fcodingeverybody-en%2Fassets%2Fimages%2Fbranding%2Fsocial-share_img.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://coding.courses/javascript-getelementbyid-function/" rel="noopener noreferrer" class="c-link"&gt;
            JavaScript getElementById() Function – A Complete Guide - codingCourses
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The getElementById() function returns the Element object whose HTML id attribute value matches the specified string. If no matching element exists, it returns null.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcoding.courses%2Fwp-content%2Fuploads%2Ffavicon-wp-300x300.png" width="300" height="300"&gt;
          coding.courses
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



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