logo

HTMLのフォントカラー属性

HTMLのフォントカラー属性 内のコンテンツのテキストの色を指定します。 鬼ごっこ 。フォントの色属性は、 色の値 テキストに適用したい色を指定すると、その色で画面に表示されます。

構文:

>

属性値:



  • 色名: 色の名前を使用して文字の色を設定します。例えば:
  • 16 進数: カラー 16 進コードを使用してテキストの色を設定します。例えば: #0000ff
  • RGB_番号: RGBコードを使用してテキストの色を設定します。例えば: rgb(0, 153, 0)

注記: color 属性はサポートされていません HTML5

HTMLでフォントの色を設定する例

使用できます 色属性 フォントタグ HTMLでフォントの色を設定します。を使用して色の値を割り当てることができます。 色の名前 16進コード 、 または RGBコード

例を挙げて理解を深めましょう:

例: この例では、3 つの異なるタイプの値を持つ color 属性を使用して、色付きのテキストを取得しています。色の名前の値、16 進数のコード値、および RGB コードの値を使用して、3 つの異なるテキスト要素のフォントの色を設定しました。

HTML
   HTML |<font>color 属性 title> head> <body> <font size='6' face='verdana' color='green'>techcodeview.com!フォント> <br> <font size='6' face='arial' color='#008000'>techcodeview.com!フォント> <br> <font size='6' color='rgb(128, 128, 0)'>techcodeview.com!フォント>本文>html>>></pre> </code> <p dir='ltr'>  <b>  <strong>出力:</strong>  </b>  </p> <p dir='ltr'> <img src='//techcodeview.com/img/html-attributes/40/html-font-color-attribute.webp' alt="カラー属性を使用したフォントの色のHTML"></p> <h3>  <b>  <strong>サポートされているブラウザ</strong>  </b>  </h3><p dir='ltr'><span>これらのブラウザを使用して、設定されたフォント色の HTML を表示できます。ブラウザはfontタグのcolor属性をサポートしており、文字色の変化を表示します。</span></p> <ul><li value='1'> <span>グーグルクローム</span> </li><li value='2'> <span>角</span> <span> </span> </li><li value='3'> <span>Firefox</span> </li><li value='4'> <span>オペラ</span> </li><li value='5'> <span>サファリ</span> </li></ul><p dir='ltr'><span>HTML は Web ページの基礎であり、Web サイトや Web アプリを構築することによって Web ページの開発に使用されます。これに従って、HTML を基礎から学ぶことができます。</span> <span>HTML チュートリアル</span> <span>そして</span> <span>HTML の例</span> <span>。</span></p>  <br></article><div class="rekl_placeholder"><script type="text/javascript">atOptions = {'key' : 'f2b09f3e7178b263531e10998e9a32fa','format' : 'iframe','height' : 250,'width' : 300,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f2b09f3e7178b263531e10998e9a32fa/invoke.js"></script></div> </article>
                         
                        </div><!--//content-->
                    </div><!--//section-inner-->                 
                </section><!--//section-->
    
            </div><!--//primary-->
            <div class="secondary col-md-4 col-sm-12 col-xs-12">
                  <aside class="info aside section">
                    <div class="section-inner">
                        <h2 class="">カテゴリ</h2>
                        <div class="content">
                            <ul class="list-unstyled">
                                <li> <a href="/cpp-map-functions/">Cpp-Map-Functions</a> </li><li> <a href="/graph-basics/">グラフの基本</a> </li><li> <a href="/red-black-tree/">レッドブラックツリー</a> </li><li> <a href="/esports-gamers/">Eスポーツゲーマー</a> </li><li> <a href="/current-gk/">現Gk</a> </li><li> <a href="/arithmetic-maq/">算術 - Maq</a> </li><li> <a href="/javascript-questions/">Javascript - 質問</a> </li><li> <a href="/data-structures/">データ構造</a> </li><li> <a href="/bootstrap-5-cat/">ブートストラップ 5</a> </li><li> <a href="/java-jsp/">Java-Jsp</a> </li>
                                
                            </ul>
                        </div><!--//content-->  
                    </div><!--//section-inner-->                 
                </aside><!--//aside-->
                
                 <aside class="testimonials aside section">
                	 <div class="section-inner">
                        <div class="content">
                            <div class="item">
  								<div class="rekl_placeholder" id="sidebar_placeholder_1"> <script type="text/javascript">atOptions = {'key' : 'f53f1abf3c3a788f849c12a956865db1','format' : 'iframe','height' : 300,'width' : 160,'params' : {}};</script><script type="text/javascript" src="//brunetteerdeplete.com/f53f1abf3c3a788f849c12a956865db1/invoke.js"></script> <br></div>                                                   
                            </div>
                        </div>
                    </div>
                   <div class="section-inner">
                        <h2 class="heading">Java の Arrays.toString() と例</h2>
                        <div class="content">
                            <div class="item">
                                 <blockquote class="quote">                                  
                                    <span> <i class="fa fa-quote-left"></i> Java で Arrays.toString() を使用して配列を文字列に変換する例を示します。 Object.toString() が配列に対して Arrays.toString() として機能しないのはなぜですか?</span>
                                </blockquote>                
                                                                                             
                            </div><!--//item-->
                            
                            <p> <a class="more-link" href="/arrays-tostring-java-with-examples"> <i class="fa fa-external-link"></i> 続きを読みます</a> </p> 
                            
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
                
               
                            
                 <aside class="languages aside section">
                    <div class="section-inner">
                        <h2 class="heading">興味深い記事</h2>
                        <div class="content">
                            <ul class="list-unstyled">
                                <li class="item">
                                    <span class="title"> <strong> <a href="/return-an-array-c">C で配列を返す</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/python-set-difference">パイソンセット |違い()</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/how-disable-an-ask-242132">方法: Ask.FM アカウントを無効にする</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/what-is-is-relationship-java">Java における Is-A-Relationship とは何ですか?</a> </strong> </span>
                                    
                                </li><!--//item--><li class="item">
                                    <span class="title"> <strong> <a href="/surface-areas-volumes">表面積と体積</a> </strong> </span>
                                    
                                </li><!--//item-->
                               
                            </ul>
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
                
              
                 <aside class="list music aside section">
                    <div class="section-inner">
                        <h2 class="heading">人気の投稿</h2>
                        <div class="content">
                            <ul class="list"> <li><a href="/c-int-string">C++の文字列への整数</a>
</li><li><a href="/structure-java-program">Javaの構造</a>
</li><li><a href="/difference-between-object">Javaのクラスとオブジェクト</a>
</li><li><a href="/arp-commands">コマンドをarpする</a>
</li><li><a href="/how-compare-two-objects-java">Javaでのオブジェクトの等価性</a>
</li><li><a href="/css-bold-text">CSSでテキストを太字にする</a>
</li> 
                                
                                
                            </ul>
                        </div><!--//content-->
                    </div><!--//section-inner-->
                </aside><!--//section-->
              
            </div><!--//secondary-->    
        </div><!--//row-->
    </div><!--//masonry-->
    
	    <footer class="footer">
        <div class="container text-center">
                <span>
Copyright ©2025 全著作権所有 |  <a href="//sk.techcodeview.com/">techcodeview.com</a> | <a href="/disclaimer" rel="nofollow noopener noreferrer" target="_blank">免責事項</a>  |  <a href="/about-us" rel="nofollow noopener noreferrer" target="_blank">私たちについて</a>  |  <a href="/privacy-policy" rel="nofollow noopener noreferrer" target="_blank">プライバシーポリシー</a>  </span>
        </div>
    </footer>
 
         
    <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="https://techcodeview.com/template/assets/plugins/bootstrap/js/bootstrap.min.js"></script>    
    

    <script type="text/javascript" src="https://techcodeview.com/template/assets/js/main.js"></script>     
	
	<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
	<script>
!function(){"use strict";let t=document.createElement("button");t.id="toTopBtn",t.innerHTML="↑";let e=`
        #toTopBtn {
            position: fixed;
            bottom: 25px;
            right: 25px;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            background-color: #213141;
            color: white;
            border: none;
            border-radius: 8px;
            width: 50px;
            height: 50px;
            font-size: 24px;
            cursor: pointer;
            transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        }
        #toTopBtn:hover {
            background-color: #555;
        }
    `,i=document.createElement("style");i.type="text/css",i.innerText=e,document.head.appendChild(i),document.body.appendChild(t),window.addEventListener("scroll",()=>{let e=window.scrollY||document.documentElement.scrollTop;e>300?(t.style.opacity="1",t.style.visibility="visible"):(t.style.opacity="0",t.style.visibility="hidden")}),t.addEventListener("click",()=>{window.scrollTo({top:0,behavior:"smooth"})})}();
</script>
</body>
</html>