HTML | Scope Attribute - GeeksforGeeks

Skip to content geeksforgeeks
  • Courses
    • DSA Courses
    • Programming Languages
  • Tutorials
    • Python Tutorial
      • Python Loops and Control Flow
    • Java
      • Java Interview Questions
      • Java Quiz
      • Advance Java
    • Programming Languages
    • System Design
    • Interview Corner
    • Computer Science Subjects
    • DevOps
    • Linux
    • Software Testing
    • Databases
    • Android
    • Excel
    • Mathematics
  • DSA
    • Data Structures
    • 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
  • 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 Summarize Comments Improve Suggest changes Like Article Like Save Share Report Follow

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
Comment More info Next Article HTML | <td> scope Attribute author jit_t Follow Improve

Similar Reads

  • HTML | <th> scope Attribute 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 1 min read
  • HTML | <td> scope Attribute The HTML <td> 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: <td scope="col | row | 1 min read
  • HTML | <th> nowrap Attribute The HTML <th> nowrap Attribute is used to specify that the content present inside the header cell should not wrap. It contains the Boolean value. It is not supported by HTML 5. Syntax: <th nowrap> Example: <!DOCTYPE html> <html> <head> <title> HTML th nowrap Attri 1 min read
  • HTML | <pre> width Attribute The HTML <pre> width Attribute is used to specify the maximum number of characters per line. Note: The width Attribute is not supported by HTML5 Syntax: <pre width="number"> Attribute Values: number: It is used to set the maximum number of characters. Example: <!DOCTYPE html> <h 1 min read
  • HTML | <a> shape Attribute The shape attribute is used with the coords attribute to describe the size, shape, and placement of a link in an <object> or <img> element. It is not supported by HTML 5.Syntax: <a shape="value"> Attribute Values: default: It is used to specify the entire region.rect: It is used to 1 min read
  • HTML <td> width Attribute The HTML <td> width attribute was traditionally used to specify the width of a table cell. If this attribute is not set, the cell automatically adjusts its width based on the content it contains. This attribute provides flexibility as it accepts values in both pixels and percentages, allowing 3 min read
  • HTML | <source> srcset Attribute The HTML srcset attribute is used to specifies the URL of an image to use in different situations. when <source> is used in <picture> it is requiredSyntax: <source srcset="URL"> Attribute Values URL: It specifies the URL of image Example: C/C++ Code <!DOCTYPE html> <html 1 min read
  • HTML <style> type Attribute HTML <style> type Attribute is used to specify the MIME type of the <style> Tag. The attribute is used to identify the type of content contained by the <style> Tag. The default value is "text/css" which indicates that the content is CSS.  Syntax: <style type="media_type"> Not 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 <th> element. Syntax: <th scope="col | row | 1 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 <th> Element. Syntax: <th scope="col | row | colg 1 min read
  • HTML | <object> type Attribute The HTML <object> type Attribute is used to specify the Internet type of MIME type of the Object. Syntax: <object type="media_type"> Attribute Values media_type It is used to specify the Internet media type of the embedded file. Example: C/C++ Code &lt;!DOCTYPE html&gt; &lt;h 1 min read
  • HTML <a> type Attribute The HTML <a> type attribute specifies the MIME type of the linked document. It is not widely used, the type attribute can help browsers to understand the type of content that is being linked. It can be beneficial for certain applications and optimizations. Syntax<a type="media_type">Attr 1 min read
  • HTML | <th> abbr Attribute The HTML <th> abbr Attribute is used to specify the shorter version of content in header cell. It does not describe any visual effect but it is used by screen readers. Syntax: <th abbr="text"> Attribute Values: text: It contains the short description of header cell content. Example: C/C+ 1 min read
  • HTML <th> char Attribute The HTML <th> char attribute is used to specify the alignment to the character of content in a table header cell. It only contains the char align attribute. Its default value is a decimal point for page language. Note: It is not supported by HTML5. Syntax: <th char="character"> Attribute 1 min read
  • HTML | <th> axis Attribute The HTML <th> axis attribute is used to categorize the header cell content. It is used for group related information. This attribute does not display visual effect on the web browser but it is used by screen readers. It is not supported by HTML 5. Syntax: <th axis="category_name"> Attrib 1 min read
  • HTML <img> src Attribute The <img> src attribute is used to specify the URL of the source image. It points to the location of the image file that the browser should display on the webpage. Syntax:<img src="URL">Attribute Values: It contains a single-value URL that specifies the link to the source image. There ar 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++ C 1 min read
  • HTML <a> rev Attribute The HTML <a> rev attribute is used to define the relationship between the linked document and the current document. This attribute is reversed of HTML rel attribute. It is not supported in HTML5. Syntax: <a rev="value"> Attribute values: alternate: It defines an alternative version of th 2 min read
  • HTML | <a> rel Attribute The rel attribute is used to specify the relationship between the current and the linked document. It is used only when the href attribute is present. Syntax: <a rel="value"> Attribute Values: alternate: It defines an alternate version of the document i.e. print page, translated, or mirror.aut 1 min read
Article Tags :
  • HTML
  • Web Technologies
  • HTML-Attributes
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 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. 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 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 Colgroup Scope