Colspan in Table | Tables
ਸੈੱਲਾਂ ਨੂੰ ਮਰਜ ਕਰਨਾ (Merging Cells):
ਸੈੱਲਾਂ ਨੂੰ ਮਰਜ ਕਰਨ ਦਾ ਮਤਲਬ ਦੋ ਜਾਂ ਦੋ ਤੋਂ ਵੱਧ ਸੈੱਲਾਂ ਨੂੰ ਜੋੜ ਕੇ ਇੱਕ ਸੈੱਲ ਬਣਾਉਣਾ ਹੈ। HTML ਟੇਬਲ ਵਿੱਚ Colspan ਅਤੇ Rowspan ਐਟਰੀਬਿਊਟਸ ਦੀ ਮਦਦ ਨਾਲ ਸੈੱਲਾਂ ਨੂੰ ਮਰਜ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ। ਇਹ ਐਟਰੀਬਿਊਟਸ <td> ਜਾਂ <th> ਟੈਗਜ਼ ਲਈ ਵਰਤੇ ਜਾਂਦੇ ਹਨ।
Colspan (ਕੋਲਸਪੈਨ): ਜੇ ਅਸੀਂ ਦੋ ਜਾਂ ਵਧੇਰੇ ਕਾਲਮਾਂ ਦੇ ਸੈੱਲਾਂ ਨੂੰ ਜੋੜ ਕੇ ਇੱਕ ਸਿੰਗਲ ਸੈੱਲ ਬਨਾਉਣਾ ਚਾਹੁੰਦੇ ਹਾਂ, ਤਾਂ ਅਸੀਂ colspan ਐਟਰੀਬਿਊਟ ਦੀ ਵਰਤੋਂ ਕਰਾਂਗੇ, ਜਿਵੇਂ ਕਿ ਚਿੱਤਰ 3.11 ਵਿੱਚ ਦਿਖਾਇਆ ਗਿਆ ਹੈ| Colspan ਐਟਰੀਬਿਊਟ ਦਾ ਘੱਟੋ ਘੱਟ ਮੁੱਲ 2 ਹੁੰਦਾ ਹੈ।
ਉਦਾਹਰਣ ਲਈ; <td colspan="3">
<!DOCTYPE html>
<html>
<head>
<title>Colspan in Table</title>
</head>
<body>
<h2>Colspan in Table</h2>
<table width="90%" border="1" cellspacing="5" cellpadding="5">
<tr><th colspan="2">Social Media Accounts</th></tr>
<tr>
<Td>https://www.youtube.com/GSSSKHOKHAR</Td>
<Td>https://www.facebook.com/GSSSSKHOKHAR</Td>
</tr>
<tr>
<Td>https://www.facebook.com/gss.khokhar.mks/</Td>
<Td>https://www.instagram.com/gssskhokhar/</Td>
</tr>
</table>
</body>
</html>