แอตทริบิวต์ cols ใน HTML ใช้สำหรับทั้งองค์ประกอบ และ <frameset> เนื่องจาก HTML5 ไม่รองรับแท็ก <framset> ดังนั้น เราจะดำเนินการกับแอตทริบิวต์ <textarea> cols</P> <p> แอตทริบิวต์ cols ขององค์ประกอบ <textarea> ใช้เพื่อกำหนดความกว้างของ textarea cols ตั้งค่าและความกว้างสามารถมองเห็นได้ภายใต้ textarea เอง</P> <p> ต่อไปนี้เป็นไวยากรณ์ -</P> <pre><textarea cols="num"></pre> <p> ด้านบน num คือความกว้างของพื้นที่ข้อความ ค่าเริ่มต้นคือ 20</P> <p> ให้เราดูตัวอย่างการใช้แอตทริบิวต์ cols ขององค์ประกอบ <textarea> -</P> <h2>ตัวอย่าง</h2> <pre><!DOCTYPE html> <html> <body> <h2>Interview Questions</h2> <p>Why do you want go for the Editor Job Profile? (100 words)</p> <textarea rows="6" cols="70" autofocus> Write the answer in 100 words only... </textarea> <p>What are your weaknesses? (50 words)</p> <textarea rows="4" cols="70" autofocus> Write the answer in 50 words only... </textarea> </body> </html></pre> <h2>ผลลัพธ์</h2> <p> <img loading='lazy' alt='HTML cols แอตทริบิวต์ ' src="/article/uploadfiles/202203/2022033116092005.jpg" /></P> <br> </article> <div class="ad ad5"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4480737146802772" crossorigin="anonymous"></script><!-- computer.wsxdn --><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4480737146802772" data-ad-slot="4467655591" data-ad-format="auto" data-full-width-responsive="true"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <section id="turn-page" class="t-over"> <div class="f-start f-align"> <i><img loading='lazy' src="https://th.wsxdn.com/css/img/sanjiao.svg" alt=""></i> <a class='LinkPrevArticle' href='https://th.wsxdn.com/db044w/zx451s/1004064391.html' >HTML colspan Attribute </a> </div> <div class="f-start f-align"> <i><img loading='lazy' src="https://th.wsxdn.com/css/img/sanjiao.svg" alt=""></i> <a class='LinkNextArticle' href='https://th.wsxdn.com/db044w/zx451s/1004064393.html' >ผ้าใบ HTML เงาคุณสมบัติสี </a> </div> </section> <section class="box1-3"> <ol class="f-between"> <li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004065140.html" class="title"> <p class="r-over r-over-2" title="HTML หลายแอตทริบิวต์ "> HTML หลายแอตทริบิวต์ </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004065145.html" class="title"> <p class="r-over r-over-2" title="ค่า HTML คุณสมบัติ "> ค่า HTML คุณสมบัติ </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004065147.html" class="title"> <p class="r-over r-over-2" title="แอตทริบิวต์สไตล์ HTML "> แอตทริบิวต์สไตล์ HTML </p> </a> </div> </li><li class="aList-2 aList f-between f-align"> <div> <a href="https://th.wsxdn.com/db044w/zx451s/1004065150.html" class="title"> <p class="r-over r-over-2" title="แอตทริบิวต์แถว HTML "> แอตทริบิวต์แถว HTML </p> </a> </div> </li> </ol> </section> </section> <aside class="box-r"> <section class="box4-1"> <strong> HTML </strong> <ol> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004064314.html" title="HTML <q> อ้างอิงแอตทริบิวต์ "> <p class="r-over r-over-2">HTML <q> อ้างอิงแอตทริบิวต์ </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004064338.html" title="HTML <textarea> cols แอตทริบิวต์ "> <p class="r-over r-over-2">HTML <textarea> cols แอตทริบิวต์ </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004064342.html" title="HTML <textarea> ออโต้โฟกัสแอตทริบิวต์ "> <p class="r-over r-over-2">HTML <textarea> ออโต้โฟกัสแอตทริบิวต์ </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004064356.html" title="HTML <textarea> แอตทริบิวต์ตัวยึดตำแหน่ง "> <p class="r-over r-over-2">HTML <textarea> แอตทริบิวต์ตัวยึดตำแหน่ง </p> </a> </li> <li class="f-start"> <i> <img loading='lazy' src="https://th.wsxdn.com/css/img/article-lan.svg" alt=""> </i> <a href="https://th.wsxdn.com/db044w/zx451s/1004064380.html" title="HTML <textarea> แอตทริบิวต์อ่านอย่างเดียว "> <p class="r-over r-over-2">HTML <textarea> แอตทริบิวต์อ่านอย่างเดียว </p> </a> </li> </ol> </section> <ul> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004065132.html" class="i-text"><p class="r-over r-over-3">แอตทริบิวต์ HTML อ่านอย่างเดียว </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004065135.html" class="i-text"><p class="r-over r-over-3">HTML ที่เลือกแอตทริบิวต์ </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004065137.html" class="i-text"><p class="r-over r-over-3">HTML แอตทริบิวต์ที่เหมาะสมที่สุด </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004065138.html" class="i-text"><p class="r-over r-over-3">HTML เปิดแอตทริบิวต์ </p></a> </li> <li class="f-start f-align"> <a href="https://th.wsxdn.com/db044w/zx451s/1004065139.html" class="i-text"><p class="r-over r-over-3">HTML แอตทริบิวต์ต่ำ </p></a> </li> </ul> <ul class="types f-between"> <li><a class='childclass' href='https://th.wsxdn.com/db044w/hf444z/' target="_self">การเขียนโปรแกรม C</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/bz445u/' target="_self">C++</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/tr446l/' target="_self">Redis</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/rp447j/' target="_self">การเขียนโปรแกรม BASH</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/wu448o/' target="_self">Python</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/nl449f/' target="_self">Java</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ig450a/' target="_self">ฐานข้อมูล</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/zx451s/' target="_self">HTML</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ec452w/' target="_self">Javascript</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/db453v/' target="_self">การเขียนโปรแกรม</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/if454a/' target="_self">CSS</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/ge455y/' target="_self">Ruby</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/xv456p/' target="_self">SQL</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/jh457b/' target="_self">IOS</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/om458g/' target="_self">Android</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/mk459f/' target="_self">MongoDB</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/rp460j/' target="_self">MySQL</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/qn461i/' target="_self">C#</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/jh465b/' target="_self">PHP</a></li> <li><a class='childclass' href='https://th.wsxdn.com/db044w/kh471c/' target="_self">SQL Server</a></li> </ul> </aside> </section> <footer> <section class="msg f-center container"> <span class="f-start"> ลิขสิทธิ์ © <a href="https://th.wsxdn.com">https://th.wsxdn.com</a> สงวนลิขสิทธิ์ </span> </section> </footer> </body> </html>