HTML | Bgcolor Attribute - GeeksforGeeks
Trang chủ » Html Th Colors
» HTML |
Bgcolor Attribute - GeeksforGeeks
Có thể bạn quan tâm
Skip to content - Courses
- DSA to Development
- Machine Learning & Data Science
- Generative AI & ChatGPT
- Become AWS Certified
- DSA Courses
- Data Structure & Algorithm(C++/JAVA)
- Data Structure & Algorithm(Python)
- Data Structure & Algorithm(JavaScript)
- Programming Languages
- CPP
- Java
- Python
- JavaScript
- C
- All Courses
- Tutorials
- Python Tutorial
- Taking Input in Python
- Python Operators
- Python Data Types
- Python Loops and Control Flow
- Python Conditional Statements
- Python Loops
- Python Functions
- Python OOPS Concept
- Python Data Structures
- Python Exception Handling
- Python File Handling
- Python Exercises
- Java
- Learn Java Programming Language
- Java Collections
- Java 8 Tutorial
- Java Programs
- Java Interview Questions
- Java Interview Questions
- Core Java Interview Questions-Freshers
- Java Multithreading Interview Questions
- OOPs Interview Questions and Answers
- Java Exercises
- Java Quiz
- Java Quiz
- Core Java MCQ
- Java Projects
- Advance Java
- Spring Tutorial
- Spring Boot Tutorial
- Spring Boot Interview Questions
- Spring MVC Tutorial
- Spring MVC Interview Questions
- Hibernate Tutorial
- Hibernate Interview Questions
- Programming Languages
- JavaScript
- C++
- R Tutorial
- SQL
- PHP
- C#
- C
- Scala
- Perl
- Go Language
- Kotlin
- System Design
- System Design Tutorial
- Software Design Patterns
- System Design Roadmap
- Top 10 System Design Interview Questions and Answers
- Interview Corner
- Company Preparation
- Top Topics
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Multiple Choice Quizzes
- Aptitude for Placements
- Computer Science Subjects
- Operating System
- DBMS
- Computer Networks
- Engineering Mathematics
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- DevOps
- GIT
- AWS
- Docker
- Kubernetes
- Microsoft Azure Tutorial
- Google Cloud Platform
- Linux
- Linux Tutorial
- Linux Commands A-Z
- Linux Commands Cheatsheet
- File Permission Commands
- Linux System Administration
- Linux File System
- Linux Shell Scripting
- Linux Networking
- Linux Interview Questions
- Software Testing
- Software Testing Tutorial
- Software Engineering Tutorial
- Testing Interview Questions
- Jira
- Databases
- DBMS Tutorial
- SQL Tutorial
- PostgreSQL Tutorial
- MongoDB Tutorial
- SQL Interview Questions
- MySQL Interview Questions
- PL/SQL Interview Questions
- Android
- Android Tutorial
- Android Studio Tutorial
- Kotlin For Android
- Android Projects
- Android Interview Questions
- 6 Weeks of Android App Development
- Excel
- MS Excel Tutorial
- Introduction to MS Excel
- Data Analysis in Excel
- Basic Excel Formulas & Functions
- Data Analysis in Advanced Excel
- Workbooks
- Statistical Functions
- Data Visualization in Excel
- Pivot Tables in Excel
- Excel Spreadsheets in Python
- Basic Excel Shortcuts
- Mathematics
- Number System
- Algebra
- Linear Algebra
- Trigonometry
- Set Theory
- Statistics
- Probability
- Geometry
- Mensuration
- Logarithms
- Calculus
- DSA
- Data Structures
- Arrays
- Matrix
- Strings
- Linked List
- Stack
- Queue
- Tree
- Heap
- Hashing
- Graph
- Set Data Structure
- Map Data Structure
- Advanced Data Structure
- Data Structures Tutorial
- Algorithms
- Analysis of Algorithms
- Design and Analysis of Algorithms
- Asymptotic Analysis
- Asymptotic Notations
- Worst, Average and Best Cases
- Searching Algorithms
- Linear Search
- Binary Search
- Searching Algorithms Tutorial
- Sorting Algorithms
- Selection Sort
- Bubble Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Counting Sort
- Radix Sort
- Bucket Sort
- Sorting Algorithms Tutorial
- Greedy Algorithms
- Dynamic Programming
- Graph Algorithms
- Pattern Searching
- Recursion
- Backtracking
- Divide and Conquer
- Mathematical Algorithms
- Geometric Algorithms
- Bitwise Algorithms
- Randomized Algorithms
- Branch and Bound
- Algorithms Tutorial
- DSA Tutorial
- Practice
- All DSA Problems
- Problem of the Day
- Company Wise Coding Practice
- Amazon
- Microsoft
- Flipkart
- Explore All
- GfG SDE Sheet
- Practice Problems Difficulty Wise
- School
- Basic
- Easy
- Medium
- Hard
- Language Wise Coding Practice
- CPP
- Java
- Python
- Curated DSA Lists
- Beginner's DSA Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 DP Problems
- Top 50 Graph Problems
- Top 50 Tree Problems
- Competitive Programming
- Company Wise SDE Sheets
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- DSA Cheat Sheets
- SDE Sheet
- DSA Sheet for Beginners
- FAANG Coding Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Top Interview Questions
- Puzzles
- All Puzzles
- Top 100 Puzzles Asked In Interviews
- Top 20 Puzzles Commonly Asked During SDE Interviews
- Data Science
- Python Tutorial
- R Tutorial
- Machine Learning
- Data Science using Python
- Data Science using R
- Data Science Packages
- Pandas Tutorial
- NumPy Tutorial
- Data Visualization
- Python Data Visualization Tutorial
- Data Visualization with R
- Data Analysis
- Data Analysis with Python
- Data Analysis with R
- Deep Learning
- NLP Tutorial
- Web Tech
- HTML Tutorial
- CSS Tutorial
- JavaScript Tutorial
- PHP Tutorial
- ReactJS Tutorial
- NodeJS Tutorial
- Bootstrap Tutorial
- Typescript
- Web Development Using Python
- Django
- Django Tutorial
- Django Projects
- Django Interview Questions
- Flask
- Flask Tutorial
- Flask Projects
- Flask Interview Questions
- Postman
- Github
- Cheat Sheets
- HTML Cheat Sheet
- CSS Cheat Sheet
- JavaScript Cheat Sheet
- React Cheat Sheet
- Angular Cheat Sheet
- jQuery Cheat Sheet
- Bootstrap Cheat Sheet
- Learn Complete Web Development
- HTML Tutorial
- HTML Exercises
- HTML Tags
- HTML Attributes
- Global Attributes
- Event Attributes
- HTML Interview Questions
- HTML DOM
- DOM Audio/Video
- HTML 5
- HTML Examples
- Color Picker
- A to Z Guide
- HTML Formatter
▲ Open In App HTML <th> bgcolor Attribute Last Updated : 10 Jan, 2024 Summarize Comments Improve Suggest changes Like Article Like Save Share Report Follow The bgcolor attribute in the HTML<th> (table header) tag is used to set the background color of a table header cell. You can specify colors using color names, hexadecimal codes, or RGB values.
Note: It is not supported by HTML5.
Syntax:
<th bgcolor="color_name | hex_number | rgb_number"> Attribute Values:
Attribute Values
Description
color_name
It sets the background color by using the color name. For example “red”.
hex_number
It sets the background color by using the color hex code. For example “#0000ff”.
rgb_number
It sets the background color by using the rgb code. For example: “RGB(0, 153, 0)” .
Example 1: Implementation of HTML the tag bgcolor attribute
html
<!DOCTYPE html> <html> <head> <title> HTML th bgcolor Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML th bgcolor Attribute</h2> <table width="500" border="1"> <tr> <th bgcolor="green">Name</th> <th bgcolor="yellow">Expenses</th> </tr> <tr> <td>BITTU</td> <td>2500.00</td> </tr> <tr> <td>RAKESH</td> <td>1400.00</td> </tr> </table> </body> </html>
Output:
Example 2: Implementation of HTML the tag bgcolor attribute
HTML
<!DOCTYPE html> <html> <head> <title> HTML th bgcolor Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML th bgcolor Attribute</h2> <table width="500" border="1"> <tr> <!-- Using Hex Number --> <th bgcolor="#00FF00">Name</th> <!-- Using RGB Number --> <th bgcolor="rgba(255, 255, 0)">Expenses</th> </tr> <tr> <td>BITTU</td> <td>2500.00</td> </tr> <tr> <td>RAKESH</td> <td>1400.00</td> </tr> </table> </body> </html>
Output:
Supported Browsers:
- Google Chrome 1
- Edge 12
- Firefox 1
- Safari 12.1
- Opera 3
jit_t Follow Improve Previous Article HTML | <th> height Attribute Next Article Similar Reads
HTML | <table> bgcolor Attribute The HTML <table> bgcolor Attribute is use to specify the background color of a table.Syntax: <table bgcolor="color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red".hex_number: It sets the text color by using the color hex code. For example "#0000ff".rgb_numb 1 min read HTML | Marquee bgcolor attribute The Marquee bgcolor attribute in HTML is used to set the backgroundcolor of marquee. Note: This attribute is no longer supported in HTML5. Syntax: <marquee bgcolor="colorname" > Attribute value: color name: Define the background color of the marquee. Example: C/C++ Code <!DOCTYPE html> <html> <head> <title>HTML Marquee 1 min read HTML | thead bgcolor Attribute The HTML thead bgcolor Attribute is used to specify the background color of a table head. It is not supported by HTML 5. Syntax: <thead bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the color hex code 1 min read HTML | <colgroup> bgcolor Attribute The HTML <colgroup> bgcolor attribute is used to specify the background color of a colgroup element. It is not supported by HTML 5. Syntax: <colgroup bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by usin 1 min read HTML | <tfoot> bgcolor Attribute The HTML <tfoot> bgcolor Attribute is used to specify the background color of a foot of the table. It is not supported by HTML 5. Syntax: <tfoot bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the 1 min read HTML | <tbody> bgcolor Attribute The HTML tbody bgcolor Attribute is used to specify the background color of a table body(tbody). It is not supported by HTML 5. Syntax: <tbody bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the color h 1 min read HTML <td> bgcolor Attribute The HTML <td> bgcolor attribute is used to specify the background color of a table cell. It basically, Specify the background color with a hexadecimal code for precise coloring and offers limited color choices compared to modern CSS styling. Note: It is not supported by HTML5. Syntax:<td bgcolor= "color_name | hex_number | rgb_number"> 2 min read HTML <tr> bgcolor Attribute The HTML <tr> bgcolor Attribute is used to specify the background color of a table row. This attribute accepts color values such as color names, hex codes, or RGB values, allowing for easy customization of the background color for individual rows in an HTML table. Note: It is not supported by HTML 5. Syntax:<tr bgcolor= "color_name | hex_n 2 min read HTML <col> bgcolor Attribute The HTML <col> element bgcolor attribute was used in HTML to set background colors for table columns. It is deprecated in HTML 4.01 and not supported in HTML5. Instead, CSS should be used to style table columns with the background-color property. Syntax: <col bgcolor= "color_name | hex_number | rgb_number">Attribute Values: Attribute na 2 min read HTML bgcolor Attribute HTML bgcolor attribute is used to set the background color of an HTML element. Bgcolor is one of those attributes that has become deprecated with the implementation of Cascading Style Sheets (see CSS Backgrounds). It accepts color names, hexadecimal color codes, or RGB values to customize the background appearance of the specified element. In moder 3 min read HTML <body> bgcolor Attribute The HTML bgcolor attribute sets background colors for elements like <body>, <table>, <td>, and <tr>. While it accepts color names, hex, or RGB values, it is deprecated in HTML5. CSS's background-color property is now preferred for styling backgrounds. Note: It is not supported by HTML5 Syntax: <body bgcolor="color_name | 2 min read HTML DOM Marquee bgColor Property The HTML DOM Marquee bgColor property is used to set or return the value of the bgcolor attribute of the <marquee> tag. SyntaxIt returns the marquee bgColor property. marqueeObject.bgColor;It sets the marquee bgColor Property. marqueeObject.bgColor="colorname/hex_number"Property valuescolor_name: It sets the background color by using the colo 2 min read Web API HTMLBodyElement.bgColor property The HTML BodyElement.bgColor property is used to returns a DOMString that represents the background color for the document. Syntax: BodyElement.bgColor Return Value: This property returns a DOMString that represents the background color for the document. Example 1: C/C++ Code <!DOCTYPE html> <html> <!-- body tag starts here --> 1 min read How href attribute is different from src attribute in HTML ? In HTML5, the href and src attributes play distinct roles in defining paths or URLs, each associated with specific HTML elements. The href attribute, commonly found in an anchor (<a>) elements, points to the destination of hyperlinks, facilitating navigation. The src attribute, used with elements like <img> and <script>, specifies 1 min read When to use the class attribute and the id attribute ? The class attribute is used when multiple HTML elements share a common style or behaviour, allowing the application of a shared style to several elements. It promotes code reusability and is suitable for elements with similar characteristics. The id attribute is utilized when a unique identifier is needed for a specific HTML element. This identifie 1 min read How to use the target attribute and the rel attribute in the <a> Tag ? The target and rel attributes in the <a> (anchor) tag is used to control the behaviour of hyperlinks, specifying how the linked content should be opened and establishing relationships between the current and linked documents. Here's how to use these attributes: target Attribute:The target attribute determines where the linked content will be 2 min read HTML | <html> xmlns Attribute The HTML <html> xmlns Attribute is used to specify the xml namespace for a document. Important Note: This attribute is mainly required in XHTML, not valid in HTML 4.01, and optional in HTML 5. Syntax: <html xmlns="http://www.w3.org/1999/xhtml"> Attribute Values: https://www.geeksforgeeks.org/ It defines the namespace to use (for XHTML d 1 min read HTML | scoped Attribute The HTML scoped attribute is a boolean attribute that is used to specify that the styles only apply to this element's parent element and that element's child elements (not the entire document).Note : It is a deprecated attribute and it is not supported by HTML5. Supported tag: style Example: C/C++ Code <!DOCTYPE html> <html> <head 1 min read HTML | <th> valign Attribute The HTML <th> valign Attribute is used to specify the vertical alignment of text content in a header cell. It is not supported by HTML 5. Syntax: <th valign="top | middle | bottom | baseline"> Attribute Value: top: It sets the table header content to top-align. middle: It sets the table header content to middle-align. bottom: It sets th 1 min read HTML | <col> align Attribute The HTML <col> align Attribute is used to set the horizontal alignment of text content inside the col element. It is not supported by HTML 5. Syntax: <col align="left | right | center | justify | char"> Attribute Values: left: It sets the text left-align. right: It sets the text right-align. center: It sets the text center-align. justif 1 min read HTML | poster Attribute The HTML poster Attribute is used to display the image while video downloading or when the user clicks the play button. If this image not set then it will take the first frame of video as a poster image.Applicable: It is mainly used in <video> element. Syntax: <video poster="URL"> Attribute Values: It contains a single value URL which s 1 min read HTML | <area> target Attribute The HTML <area> target Attribute is used to specify where to open the linked document. It works only when href attribute is present in the area elements. Syntax: <area target="_blank|_self|_parent|_top|framename"> Attribute Values: _blank: It opens the link in a new window._self: It is the default value. It opens the linked document in 1 min read HTML | <select> autocomplete Attribute The HTML <select> autocomplete attribute is used to specify that the form has autocompleted on or off. When the autocomplete attribute is set to on the browser will automatically complete the values based on which the user entered before. Syntax: <select autocomplete="on | off"> Attribute Values: on: It is the default value. When the au 1 min read HTML | srcdoc Attribute The HTML srcdoc attribute is used to specify the HTML content of the page to show in the inline frame. This attribute is anticipated to be used beside the sandbox and seamless attributes. If a browser supports the srcdoc attribute, it'll override the content laid out in the src attribute (if present). If a browser doesn't support the srcdoc attribu 1 min read HTML <video> crossorigin Attribute The HTML crossorigin attribute is used in the <video> element that supports a CORS request when we tried to fetch out the video files from the third-party servers or from another domain. Syntax: <video crossorigin="anonymous | use-credentials"> Attribute Values: anonymous: It has a default value. It defines a CORS request that will be s 1 min read HTML | Marquee truespeed attribute If the scrolldelay value less then 60 and truespeed mode is on then the value of scrolldelay is not effecting the scrolling. If the scrolldelay value more then 60 and truespeed mode is on then the truespeed is not effecting the scrolling. So, basically it is used to set scrollDelay attribute should be taken as an exact value or not.Syntax: <marq 1 min read What is the significance of adding autocomplete attribute in HTML Form ? The HTML <form> autocomplete attribute is used to specify that the form has autocompleted on or off value. When the autocomplete attribute is set to "on", the browser will automatically complete the values based on which the user entered before. Syntax: <form autocomplete="on|off"> Attribute values: on: It has a default value. When the 1 min read HTML | <td> abbr Attribute The HTML <td> abbr attribute is used to specify the shorter version of the content. This attribute is not supported by HTML 5. It does not describe any visual effect but it is used by screen readers. Syntax: <td abbr="text"> Attribute Values: text: It contains the short description of cell content. Note : This attribute is not supported 1 min read HTML reversed Attribute It is a Boolean Attribute and is used to order the list in Descending Order(9, 8, 7, 6 .....) instead of ascending order(1, 2, 3 ....). Syntax: <ol reversed> <li> Content... </li> <li> Content... </li> ... <li> Content... </li></ol>Applicable: <ol> Attributes: It includes single attributes rever 1 min read HTML onsearch Event Attribute This onsearch attribute works when a user presses the ENTER button or clicks on the x button. This event works with <input> element. Supported Tags: <input type="search">Syntax: <element onsearch="script">Attribute: This event contains single attribute script which contains the script to be run when event call. Example: C/C++ Code 1 min read Article Tags : - HTML
- Web Technologies
- HTML-Attributes
Like Explore More We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy Got It ! Improvement Suggest changes Suggest Changes Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal. Create Improvement Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all. Suggest Changes min 4 words, max CharLimit:2000 What kind of Experience do you want to share?
Interview Experiences Admission Experiences Career Journeys Work Experiences Campus Experiences Competitive Exam Experiences
Từ khóa » Html Th Colors
-
HTML Th Tag - W3Schools
-
HTML Table Background Color
-
Unable To Create Text Color Within Tag In Html And CSS
-
Table Background Color
-
Table Colors & Background : MGA - Web Development Tutorials
-
Coloring CSS Tables - HTML
-
HTML Table Basics
-
Tables - Bootstrap
-
HTML Th Bgcolor Attribute - W3Schools
-
Applying Color To HTML Elements Using CSS - MDN Web Docs
-
CSS: Even And Odd Rules - W3C
-
How To Change The Background Color Of An HTML Table - ThoughtCo
-
CSS/Table Styles/table Background Color - TAG Index
Liên Hệ
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Địa Chỉ: 58 Hàm Nghi - Đà Nẵng
Phone: 0904961917
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu
Trang chủ » Html Th Colors » HTML |
Có thể bạn quan tâm
- Courses
- DSA to Development
- Machine Learning & Data Science
- Generative AI & ChatGPT
- Become AWS Certified
- DSA Courses
- Data Structure & Algorithm(C++/JAVA)
- Data Structure & Algorithm(Python)
- Data Structure & Algorithm(JavaScript)
- Programming Languages
- CPP
- Java
- Python
- JavaScript
- C
- All Courses
- Tutorials
- Python Tutorial
- Taking Input in Python
- Python Operators
- Python Data Types
- Python Loops and Control Flow
- Python Conditional Statements
- Python Loops
- Python Functions
- Python OOPS Concept
- Python Data Structures
- Python Exception Handling
- Python File Handling
- Python Exercises
- Java
- Learn Java Programming Language
- Java Collections
- Java 8 Tutorial
- Java Programs
- Java Interview Questions
- Java Interview Questions
- Core Java Interview Questions-Freshers
- Java Multithreading Interview Questions
- OOPs Interview Questions and Answers
- Java Exercises
- Java Quiz
- Java Quiz
- Core Java MCQ
- Java Projects
- Advance Java
- Spring Tutorial
- Spring Boot Tutorial
- Spring Boot Interview Questions
- Spring MVC Tutorial
- Spring MVC Interview Questions
- Hibernate Tutorial
- Hibernate Interview Questions
- Programming Languages
- JavaScript
- C++
- R Tutorial
- SQL
- PHP
- C#
- C
- Scala
- Perl
- Go Language
- Kotlin
- System Design
- System Design Tutorial
- Software Design Patterns
- System Design Roadmap
- Top 10 System Design Interview Questions and Answers
- Interview Corner
- Company Preparation
- Top Topics
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Multiple Choice Quizzes
- Aptitude for Placements
- Computer Science Subjects
- Operating System
- DBMS
- Computer Networks
- Engineering Mathematics
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- DevOps
- GIT
- AWS
- Docker
- Kubernetes
- Microsoft Azure Tutorial
- Google Cloud Platform
- Linux
- Linux Tutorial
- Linux Commands A-Z
- Linux Commands Cheatsheet
- File Permission Commands
- Linux System Administration
- Linux File System
- Linux Shell Scripting
- Linux Networking
- Linux Interview Questions
- Software Testing
- Software Testing Tutorial
- Software Engineering Tutorial
- Testing Interview Questions
- Jira
- Databases
- DBMS Tutorial
- SQL Tutorial
- PostgreSQL Tutorial
- MongoDB Tutorial
- SQL Interview Questions
- MySQL Interview Questions
- PL/SQL Interview Questions
- Android
- Android Tutorial
- Android Studio Tutorial
- Kotlin For Android
- Android Projects
- Android Interview Questions
- 6 Weeks of Android App Development
- Excel
- MS Excel Tutorial
- Introduction to MS Excel
- Data Analysis in Excel
- Basic Excel Formulas & Functions
- Data Analysis in Advanced Excel
- Workbooks
- Statistical Functions
- Data Visualization in Excel
- Pivot Tables in Excel
- Excel Spreadsheets in Python
- Basic Excel Shortcuts
- Mathematics
- Number System
- Algebra
- Linear Algebra
- Trigonometry
- Set Theory
- Statistics
- Probability
- Geometry
- Mensuration
- Logarithms
- Calculus
- Python Tutorial
- DSA
- Data Structures
- Arrays
- Matrix
- Strings
- Linked List
- Stack
- Queue
- Tree
- Heap
- Hashing
- Graph
- Set Data Structure
- Map Data Structure
- Advanced Data Structure
- Data Structures Tutorial
- Algorithms
- Analysis of Algorithms
- Design and Analysis of Algorithms
- Asymptotic Analysis
- Asymptotic Notations
- Worst, Average and Best Cases
- Searching Algorithms
- Linear Search
- Binary Search
- Searching Algorithms Tutorial
- Sorting Algorithms
- Selection Sort
- Bubble Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
- Counting Sort
- Radix Sort
- Bucket Sort
- Sorting Algorithms Tutorial
- Greedy Algorithms
- Dynamic Programming
- Graph Algorithms
- Pattern Searching
- Recursion
- Backtracking
- Divide and Conquer
- Mathematical Algorithms
- Geometric Algorithms
- Bitwise Algorithms
- Randomized Algorithms
- Branch and Bound
- Algorithms Tutorial
- Analysis of Algorithms
- DSA Tutorial
- Practice
- All DSA Problems
- Problem of the Day
- Company Wise Coding Practice
- Amazon
- Microsoft
- Flipkart
- Explore All
- GfG SDE Sheet
- Practice Problems Difficulty Wise
- School
- Basic
- Easy
- Medium
- Hard
- Language Wise Coding Practice
- CPP
- Java
- Python
- Curated DSA Lists
- Beginner's DSA Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 DP Problems
- Top 50 Graph Problems
- Top 50 Tree Problems
- Competitive Programming
- Company Wise SDE Sheets
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- DSA Cheat Sheets
- SDE Sheet
- DSA Sheet for Beginners
- FAANG Coding Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Top Interview Questions
- Puzzles
- All Puzzles
- Top 100 Puzzles Asked In Interviews
- Top 20 Puzzles Commonly Asked During SDE Interviews
- Data Structures
- Data Science
- Python Tutorial
- R Tutorial
- Machine Learning
- Data Science using Python
- Data Science using R
- Data Science Packages
- Pandas Tutorial
- NumPy Tutorial
- Data Visualization
- Python Data Visualization Tutorial
- Data Visualization with R
- Data Analysis
- Data Analysis with Python
- Data Analysis with R
- Deep Learning
- NLP Tutorial
- Web Tech
- HTML Tutorial
- CSS Tutorial
- JavaScript Tutorial
- PHP Tutorial
- ReactJS Tutorial
- NodeJS Tutorial
- Bootstrap Tutorial
- Typescript
- Web Development Using Python
- Django
- Django Tutorial
- Django Projects
- Django Interview Questions
- Flask
- Flask Tutorial
- Flask Projects
- Flask Interview Questions
- Postman
- Github
- Django
- Cheat Sheets
- HTML Cheat Sheet
- CSS Cheat Sheet
- JavaScript Cheat Sheet
- React Cheat Sheet
- Angular Cheat Sheet
- jQuery Cheat Sheet
- Bootstrap Cheat Sheet
- Learn Complete Web Development
- HTML Tutorial
- HTML Exercises
- HTML Tags
- HTML Attributes
- Global Attributes
- Event Attributes
- HTML Interview Questions
- HTML DOM
- DOM Audio/Video
- HTML 5
- HTML Examples
- Color Picker
- A to Z Guide
- HTML Formatter
The bgcolor attribute in the HTML<th> (table header) tag is used to set the background color of a table header cell. You can specify colors using color names, hexadecimal codes, or RGB values.
Note: It is not supported by HTML5.
Syntax:
<th bgcolor="color_name | hex_number | rgb_number">Attribute Values:
Attribute Values | Description |
---|---|
color_name | It sets the background color by using the color name. For example “red”. |
hex_number | It sets the background color by using the color hex code. For example “#0000ff”. |
rgb_number | It sets the background color by using the rgb code. For example: “RGB(0, 153, 0)” . |
Example 1: Implementation of HTML the tag bgcolor attribute
html
<!DOCTYPE html> <html> <head> <title> HTML th bgcolor Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML th bgcolor Attribute</h2> <table width="500" border="1"> <tr> <th bgcolor="green">Name</th> <th bgcolor="yellow">Expenses</th> </tr> <tr> <td>BITTU</td> <td>2500.00</td> </tr> <tr> <td>RAKESH</td> <td>1400.00</td> </tr> </table> </body> </html> |
Output:
Example 2: Implementation of HTML the tag bgcolor attribute
HTML
<!DOCTYPE html> <html> <head> <title> HTML th bgcolor Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML th bgcolor Attribute</h2> <table width="500" border="1"> <tr> <!-- Using Hex Number --> <th bgcolor="#00FF00">Name</th> <!-- Using RGB Number --> <th bgcolor="rgba(255, 255, 0)">Expenses</th> </tr> <tr> <td>BITTU</td> <td>2500.00</td> </tr> <tr> <td>RAKESH</td> <td>1400.00</td> </tr> </table> </body> </html> |
Output:
Supported Browsers:
- Google Chrome 1
- Edge 12
- Firefox 1
- Safari 12.1
- Opera 3
Similar Reads
HTML | <table> bgcolor Attribute The HTML <table> bgcolor Attribute is use to specify the background color of a table.Syntax: <table bgcolor="color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red".hex_number: It sets the text color by using the color hex code. For example "#0000ff".rgb_numb 1 min read HTML | Marquee bgcolor attribute The Marquee bgcolor attribute in HTML is used to set the backgroundcolor of marquee. Note: This attribute is no longer supported in HTML5. Syntax: <marquee bgcolor="colorname" > Attribute value: color name: Define the background color of the marquee. Example: C/C++ Code <!DOCTYPE html> <html> <head> <title>HTML Marquee 1 min read HTML | thead bgcolor Attribute The HTML thead bgcolor Attribute is used to specify the background color of a table head. It is not supported by HTML 5. Syntax: <thead bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the color hex code 1 min read HTML | <colgroup> bgcolor Attribute The HTML <colgroup> bgcolor attribute is used to specify the background color of a colgroup element. It is not supported by HTML 5. Syntax: <colgroup bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by usin 1 min read HTML | <tfoot> bgcolor Attribute The HTML <tfoot> bgcolor Attribute is used to specify the background color of a foot of the table. It is not supported by HTML 5. Syntax: <tfoot bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the 1 min read HTML | <tbody> bgcolor Attribute The HTML tbody bgcolor Attribute is used to specify the background color of a table body(tbody). It is not supported by HTML 5. Syntax: <tbody bgcolor= "color_name | hex_number | rgb_number"> Attribute Values: color_name: It sets the text color by using the color name. For example "red". hex_number: It sets the text color by using the color h 1 min read HTML <td> bgcolor Attribute The HTML <td> bgcolor attribute is used to specify the background color of a table cell. It basically, Specify the background color with a hexadecimal code for precise coloring and offers limited color choices compared to modern CSS styling. Note: It is not supported by HTML5. Syntax:<td bgcolor= "color_name | hex_number | rgb_number"> 2 min read HTML <tr> bgcolor Attribute The HTML <tr> bgcolor Attribute is used to specify the background color of a table row. This attribute accepts color values such as color names, hex codes, or RGB values, allowing for easy customization of the background color for individual rows in an HTML table. Note: It is not supported by HTML 5. Syntax:<tr bgcolor= "color_name | hex_n 2 min read HTML <col> bgcolor Attribute The HTML <col> element bgcolor attribute was used in HTML to set background colors for table columns. It is deprecated in HTML 4.01 and not supported in HTML5. Instead, CSS should be used to style table columns with the background-color property. Syntax: <col bgcolor= "color_name | hex_number | rgb_number">Attribute Values: Attribute na 2 min read HTML bgcolor Attribute HTML bgcolor attribute is used to set the background color of an HTML element. Bgcolor is one of those attributes that has become deprecated with the implementation of Cascading Style Sheets (see CSS Backgrounds). It accepts color names, hexadecimal color codes, or RGB values to customize the background appearance of the specified element. In moder 3 min read HTML <body> bgcolor Attribute The HTML bgcolor attribute sets background colors for elements like <body>, <table>, <td>, and <tr>. While it accepts color names, hex, or RGB values, it is deprecated in HTML5. CSS's background-color property is now preferred for styling backgrounds. Note: It is not supported by HTML5 Syntax: <body bgcolor="color_name | 2 min read HTML DOM Marquee bgColor Property The HTML DOM Marquee bgColor property is used to set or return the value of the bgcolor attribute of the <marquee> tag. SyntaxIt returns the marquee bgColor property. marqueeObject.bgColor;It sets the marquee bgColor Property. marqueeObject.bgColor="colorname/hex_number"Property valuescolor_name: It sets the background color by using the colo 2 min read Web API HTMLBodyElement.bgColor property The HTML BodyElement.bgColor property is used to returns a DOMString that represents the background color for the document. Syntax: BodyElement.bgColor Return Value: This property returns a DOMString that represents the background color for the document. Example 1: C/C++ Code <!DOCTYPE html> <html> <!-- body tag starts here --> 1 min read How href attribute is different from src attribute in HTML ? In HTML5, the href and src attributes play distinct roles in defining paths or URLs, each associated with specific HTML elements. The href attribute, commonly found in an anchor (<a>) elements, points to the destination of hyperlinks, facilitating navigation. The src attribute, used with elements like <img> and <script>, specifies 1 min read When to use the class attribute and the id attribute ? The class attribute is used when multiple HTML elements share a common style or behaviour, allowing the application of a shared style to several elements. It promotes code reusability and is suitable for elements with similar characteristics. The id attribute is utilized when a unique identifier is needed for a specific HTML element. This identifie 1 min read How to use the target attribute and the rel attribute in the <a> Tag ? The target and rel attributes in the <a> (anchor) tag is used to control the behaviour of hyperlinks, specifying how the linked content should be opened and establishing relationships between the current and linked documents. Here's how to use these attributes: target Attribute:The target attribute determines where the linked content will be 2 min read HTML | <html> xmlns Attribute The HTML <html> xmlns Attribute is used to specify the xml namespace for a document. Important Note: This attribute is mainly required in XHTML, not valid in HTML 4.01, and optional in HTML 5. Syntax: <html xmlns="http://www.w3.org/1999/xhtml"> Attribute Values: https://www.geeksforgeeks.org/ It defines the namespace to use (for XHTML d 1 min read HTML | scoped Attribute The HTML scoped attribute is a boolean attribute that is used to specify that the styles only apply to this element's parent element and that element's child elements (not the entire document).Note : It is a deprecated attribute and it is not supported by HTML5. Supported tag: style Example: C/C++ Code <!DOCTYPE html> <html> <head 1 min read HTML | <th> valign Attribute The HTML <th> valign Attribute is used to specify the vertical alignment of text content in a header cell. It is not supported by HTML 5. Syntax: <th valign="top | middle | bottom | baseline"> Attribute Value: top: It sets the table header content to top-align. middle: It sets the table header content to middle-align. bottom: It sets th 1 min read HTML | <col> align Attribute The HTML <col> align Attribute is used to set the horizontal alignment of text content inside the col element. It is not supported by HTML 5. Syntax: <col align="left | right | center | justify | char"> Attribute Values: left: It sets the text left-align. right: It sets the text right-align. center: It sets the text center-align. justif 1 min read HTML | poster Attribute The HTML poster Attribute is used to display the image while video downloading or when the user clicks the play button. If this image not set then it will take the first frame of video as a poster image.Applicable: It is mainly used in <video> element. Syntax: <video poster="URL"> Attribute Values: It contains a single value URL which s 1 min read HTML | <area> target Attribute The HTML <area> target Attribute is used to specify where to open the linked document. It works only when href attribute is present in the area elements. Syntax: <area target="_blank|_self|_parent|_top|framename"> Attribute Values: _blank: It opens the link in a new window._self: It is the default value. It opens the linked document in 1 min read HTML | <select> autocomplete Attribute The HTML <select> autocomplete attribute is used to specify that the form has autocompleted on or off. When the autocomplete attribute is set to on the browser will automatically complete the values based on which the user entered before. Syntax: <select autocomplete="on | off"> Attribute Values: on: It is the default value. When the au 1 min read HTML | srcdoc Attribute The HTML srcdoc attribute is used to specify the HTML content of the page to show in the inline frame. This attribute is anticipated to be used beside the sandbox and seamless attributes. If a browser supports the srcdoc attribute, it'll override the content laid out in the src attribute (if present). If a browser doesn't support the srcdoc attribu 1 min read HTML <video> crossorigin Attribute The HTML crossorigin attribute is used in the <video> element that supports a CORS request when we tried to fetch out the video files from the third-party servers or from another domain. Syntax: <video crossorigin="anonymous | use-credentials"> Attribute Values: anonymous: It has a default value. It defines a CORS request that will be s 1 min read HTML | Marquee truespeed attribute If the scrolldelay value less then 60 and truespeed mode is on then the value of scrolldelay is not effecting the scrolling. If the scrolldelay value more then 60 and truespeed mode is on then the truespeed is not effecting the scrolling. So, basically it is used to set scrollDelay attribute should be taken as an exact value or not.Syntax: <marq 1 min read What is the significance of adding autocomplete attribute in HTML Form ? The HTML <form> autocomplete attribute is used to specify that the form has autocompleted on or off value. When the autocomplete attribute is set to "on", the browser will automatically complete the values based on which the user entered before. Syntax: <form autocomplete="on|off"> Attribute values: on: It has a default value. When the 1 min read HTML | <td> abbr Attribute The HTML <td> abbr attribute is used to specify the shorter version of the content. This attribute is not supported by HTML 5. It does not describe any visual effect but it is used by screen readers. Syntax: <td abbr="text"> Attribute Values: text: It contains the short description of cell content. Note : This attribute is not supported 1 min read HTML reversed Attribute It is a Boolean Attribute and is used to order the list in Descending Order(9, 8, 7, 6 .....) instead of ascending order(1, 2, 3 ....). Syntax: <ol reversed> <li> Content... </li> <li> Content... </li> ... <li> Content... </li></ol>Applicable: <ol> Attributes: It includes single attributes rever 1 min read HTML onsearch Event Attribute This onsearch attribute works when a user presses the ENTER button or clicks on the x button. This event works with <input> element. Supported Tags: <input type="search">Syntax: <element onsearch="script">Attribute: This event contains single attribute script which contains the script to be run when event call. Example: C/C++ Code 1 min read Article Tags :- HTML
- Web Technologies
- HTML-Attributes
What kind of Experience do you want to share?
Interview Experiences Admission Experiences Career Journeys Work Experiences Campus Experiences Competitive Exam ExperiencesTừ khóa » Html Th Colors
-
HTML Th Tag - W3Schools
-
HTML Table Background Color
-
Unable To Create Text Color Within
Tag In Html And CSS Table Background Color
Table Colors & Background : MGA - Web Development Tutorials
Coloring CSS Tables - HTML
HTML Table Basics
Tables - Bootstrap
HTML Th Bgcolor Attribute - W3Schools
Applying Color To HTML Elements Using CSS - MDN Web Docs
CSS: Even And Odd Rules - W3C
How To Change The Background Color Of An HTML Table - ThoughtCo
CSS/Table Styles/table Background Color - TAG Index
Liên Hệ
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Địa Chỉ: 58 Hàm Nghi - Đà Nẵng
Phone: 0904961917
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu