Computer Science, asked by karanmahto096, 7 months ago

what is the use of align attribute. write an example of HTML code​

Answers

Answered by happy7878Y
0

Answer:

The purpose of the HTML align attribute is to specify the alignment of data and the justification of text in a cell of a table. HTML align attribute supports col, colgroup, tbody, td, tfoot, th, thead, tr elements. Usage of align attribute for any other HTML elements is deprecated. You must use CSS for those.

HOPE IT HELPS :)

Answered by Orangejuice101
0

Answer:

The align attribute is used to specify the alignment of the data. We use to justify text.  (left, right, centre)

Explanation: example- <!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Example of HTML align attribute with col, colgroup, tbody, td, tfoot, th, thead, tr </title>

</head>

<body>

<table border="1">

<colgroup>

<col><col align="char" char=".">

<thead>

<tr><th>Student Code</th><th>% of marks</th></tr>

<tbody>

<tr><td>S001</td><td>86.79</td></tr>

<tr><td>S002</td><td>78.98</td></tr>

<tr><td>S003</td><td>83.59</td></tr>

</tbody>

</table>

</body>

</html>

Similar questions