HTML | Scope Attribute - GeeksforGeeks

Skip to content geeksforgeeks
  • Tutorials
    • Python Tutorial
      • Python Data Types
      • Python Loops and Control Flow
      • Python Data Structures
      • Python Exercises
    • Java
      • Java Programming Language
        • OOPs Concepts
      • Java Collections
      • Java Programs
      • Java Interview Questions
      • Java Quiz
      • Advance Java
    • Programming Languages
    • System Design
      • System Design Tutorial
    • Interview Corner
    • Computer Science Subjects
    • DevOps
    • Linux
    • Software Testing
    • Databases
    • Android
    • Excel
    • Mathematics
  • DSA
    • Data Structures
      • Linked List
      • Tree
    • Algorithms
      • Analysis of Algorithms
      • Searching Algorithms
      • Sorting Algorithms
    • Practice
      • Company Wise Coding Practice
      • Practice Problems Difficulty Wise
      • Language Wise Coding Practice
      • Curated DSA Lists
    • Company Wise SDE Sheets
    • DSA Cheat Sheets
    • Puzzles
  • Data Science
    • Data Science Packages
    • Data Visualization
    • Data Analysis
  • Web Tech
    • Web Development Using Python
      • Django
      • Flask
    • Cheat Sheets
  • Courses
    • DSA Courses
    • Programming Languages
  • 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> scope Attribute Last Updated : 01 Aug, 2022 Improve Improve Like Article Like Save Share Report

The HTML <th> scope Attribute is used to specify the header cell is used for header row, column, colgroup or rowgroup. This attribute does not display any visual effect on the browser but it is used for screen readers.

Syntax:

<th scope="col | row | colgroup | rowgroup">

Attribute Values:

  • col: It specifies that the header cell is used for column.
  • row: It specifies that the header cell is used for row.
  • colgroup: It specifies that the header cell is used for group of column.
  • rowgroup: It specifies that the header cell is used for group of row.

Example:

html

<!DOCTYPE html> <html> <head> <title> HTML th scope Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML th scope Attribute</h2> <table border="1" width="500"> <tr> <th scope="col">NAME</th> <th scope="col">AGE</th> <th scope="col">BRANCH</th> </tr> <tr> <td>BITTU</td> <td>22</td> <td>CSE</td> </tr> <tr> <td>RAKESH</td> <td>25</td> <td>EC</td> </tr> </table> </body> </html>

Output:

Supported Browsers: The browser supported by HTML <th> scope attribute are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer
  • Firefox 1
  • Safari
  • Opera
author jit_t Follow Improve Next Article HTML | <td> scope Attribute

Please Login to comment...

Similar Reads

Explain Scope and Scope Chain in JavaScript In this article, we will try to understand what is the scope of a variable as well as its function (or method). We will see what is a Scope Chain with the help of certain coding examples. ScopeScope in JavaScript determines the accessibility of variables and functions at various parts of one's code or program.In other words, Scope will help us to d 5 min read HTML | scope Attribute The HTML scope Attribute is used to specify the header cell is used for the header row, column, colgroup or rowgroup. This attribute does not display any visual effect on the browser but it is used for screen readers.Uses: It is only used in &lt;th&gt; Element. Syntax: &lt;th scope="col | row | colgroup | rowgroup"&gt; Example: C/C++ Code &lt;!DOCT 1 min read HTML | &lt;td&gt; scope Attribute The HTML &lt;td&gt; scope Attribute is used to specify the cell is used for header row, column, colgroup or rowgroup. This attribute does not display any visual effect on the browser but it is used for screen readers. Note: This attribute is not supported by HTML5. Syntax: &lt;td scope="col | row | colgroup | rowgroup"&gt; Attribute Values: col: It 1 min read HTML | scope Attribute The HTML scope Attribute is used to specify the header cell that is used for the header row, column, colgroup or rowgroup. This attribute does not display any visual effect on the browser but it is used for screen readers. Uses: It can be used in &lt;th&gt; element. Syntax: &lt;th scope="col | row | colgroup | rowgroup"&gt; Example: &lt;!DOCTYPE ht 1 min read What is the use of scope Attribute in HTML Tables ? The "scope" attribute is a feature in HTML tables that allows you to specify the relationship between a header cell (th) and its associated data cells (td). This attribute provides useful information for assistive technologies, and it improves the accessibility and understanding of tabular data. Note: By using "scope", you can indicate whether a he 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 (&lt;a&gt;) elements, points to the destination of hyperlinks, facilitating navigation. The src attribute, used with elements like &lt;img&gt; and &lt;script&gt;, specifies 1 min read CSS :scope pseudo-class A scope element forms a context for a block of styles. That element provides a reference point for selectors to be matched against. A scope element is defined using the scoped attribute. Styles declared with scoped attributes will be applied to all elements inside its parent element. Syntax: :scope Example 1: C/C++ Code &lt;!DOCTYPE html&gt; &lt;ht 1 min read AngularJS | Scope Scope in AngularJS is the binding part of HTML view and JavaScript controller. When you add properties into the scope object in the JavaScript controller, only then the HTML view gets access to those properties. There are two types of Scope in AngularJS. $Scope$rootScope Scope: There is few specific features in Scope those are listed below The HTML 2 min read How to define scope in the context of variables in LESS ? Variable scope is used to specify the availability of variables in certain parts of the code. Firstly, the variables are searched from the local scope (i.e the variables which are declared within the code block of a particular selector); if they are not found, then they are searched from the parent scope by the compiler. Let's create an index.html 1 min read What is scope in AngularJS ? In this article, we will see what the scope is in AngularJS and how to use Scope, along with understanding its implementation through the examples. The Scope in AngularJS is the binding part between HTML (view) and JavaScript (controller) and it is a built-in object. It contains application data and objects. It is available for both the view and th 4 min read View More Articles Article Tags :
  • HTML-Attributes
  • HTML
  • Web Technologies
Like three90RightbarBannerImg 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 ! Lightbox Improvement Please go through our recently updated Improvement Guidelines before submitting any improvements. This article is being improved by another user right now. You can suggest the changes for now and it will be under the article's discussion tab. You will be notified via email once the article is available for improvement. Thank you for your valuable feedback! Suggest changes Please go through our recently updated Improvement Guidelines before submitting any improvements. Suggest Changes Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal. geeksforgeeks-suggest-icon Create Improvement Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all. geeksforgeeks-improvement-icon Suggest Changes Suggestion[CharLimit:2000] Create Improvement

What kind of Experience do you want to share?

Interview Experiences Admission Experiences Career Journeys Work Experiences Campus Experiences Competitive Exam Experiences Can't choose a topic to write? click here for suggested topics Write and publish your own Article

Từ khóa » Html Table Scope Col