Why Table Bgcolor Is No Longer Valid Code (And What To ... - HTML
Có thể bạn quan tâm
Skip to content HTML / Create An HTML Table Quickly & Easily With Our Code Example / Why Table Bgcolor Is No Longer Valid Code (And What To Use Instead)Deprecated in HTML5. Do not use.Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn moreAttribute ofCreate An HTML Table Quickly & Easily With Our Code ExampleWhat does Why Table Bgcolor Is No Longer Valid Code (And What To Use Instead) do?Was used to set the background color of an HTML table. This attribute has been deprecated. Use CSS to style tables.
Adam WoodAdam is a technical writer who specializes in developer documentation and tutorials.
Code Example
<table bgcolor="#ccccff"> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> </table>| First column | Second column | Third column |
| First column | Second column | Third column |
| First column | Second column | Third column |
Styling Table Background Colors
The bgcolor was once the correct way to specify the color to be applied to the background of a table. However, this attribute has been deprecated in favor or using CSS to style tables. The attribute does still work in most browsers and can accept color names, hex color codes, and rgb values. To set the background of a table with CSS, use the background-color property instead of the bgcolor HTML attribute.
<style> table.example-table { background-color: #ccccff; } </style> <table class="example-table"> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> <tr><td>First column</td><td>Second column</td><td>Third column</td></tr> </table> table.example-table{background-color: #ccccff;}| First column | Second column | Third column |
| First column | Second column | Third column |
| First column | Second column | Third column |
Post navigation
How To Use In HTML<td nowrap>Search HTML.com
Search for:Most Popular
- <var> HTML Tag651 views
- What Is Doxing? (And Why Is It So Scary?): An Infographic67 views
- <meter> HTML Tag65 views
- The Web Worker's Stress Busting Toolbox: 50 Tips to Improve Your Life65 views
- <rp> HTML Tag29 views
Từ khóa » Html Table Bgcolor Rgba
-
How To Make Background Of Table Cell Transparent - Stack Overflow
-
HTML Table Styling - W3Schools
-
How To Make Table Background Transparent - Concrete5
-
How To Make A Box Semi-transparent - Learn Web Development | MDN
-
Background-color - CSS: Cascading Style Sheets - MDN Web Docs
-
HTML Table Background - CopyProgramming
-
How To Add & Change Background Color In HTML - HubSpot Blog
-
HTML Email Background Color: The Best Way To Code Them - Litmus
-
Table-striped Background Color Will Not Print — DataTables Forums
-
HTML |
Bgcolor Attribute - GeeksforGeeks
Background Color - Tailwind CSS
"rgba" | Can I Use... Support Tables For HTML5, CSS3, Etc - CanIUse
Color Enumeration And ColorFade, ColorValue, And RGBA Functions ...
HTML And CSS Tutorial - Nanyang Technological University
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu