

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set the number of columns to span in HTML
Use the span attribute to set the number of columns to span in HTML. You can try to run the following code to implement span attribute −
Example
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <table> <colgroup> <col span = "1" style = "background-color:grey"> </colgroup> <tr> <th>S.NO</th> <th>Name</th> </tr> <tr> <td>1</td> <td>Amit</td> </tr> </table> </body> </html>
- Related Questions & Answers
- How to specify the number of columns a table cell should span in HTML?
- How to set the number of rows a table cell should span in HTML?
- Set how many columns an element should span across with CSS
- Set how many columns an element should span across with JavaScript.
- How to set the color of a textView span in android?
- HTML DOM Span object
- How to set the color of TextView span in Android using Kotlin?
- HTML DOM Column span Property
- HTML DOM ColumnGroup span Property
- How do we style HTML elements using the span tag <span>?
- Generate a Vandermonde matrix and set the number of columns in the output in Numpy
- How to set a certain number of rows and columns of a Tkinter grid?
- Set the shape of the area in HTML
- Set the width of the element in HTML
- Set the size of the icons in HTML
Advertisements