<?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>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;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;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;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>
