Professional Documents
Culture Documents
HA Image
HA Image
HA Image
Output:
c. She is much more excited after completing the task given by
Professor Trelawney. Then she visited A wizarding bank that wants to
store some data regarding wizards and goblins. Hogwarts is a place
where almost every person knows everything the wizarding bank staff
came to know that Hermione is studying XML, so they requested her to
Create a well-formed XML for displaying the details of the wizards and
goblins of the bank and provide some additional information about the
details like gender, address, etc., and link to the CSS stylesheet.
Ans:
Wizarding.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="Wizarding.css"?>
<body>
<table>
<colgroup>
<col id='S.No' />
<col id='Name' />
<col id='Category' />
<col id='Gender' />
<col id='Address' />
</colgroup>
<thead>
<tr>
<th>S.No</th>
<th>Name</th>
<th>Category</th>
<th>Gender</th>
<th>Address</th>
</tr>
</thead>
<tbody>
<tr>
<td>01</td>
<td>Harry Potter</td>
<td>Wizard</td>
<td>Male</td>
<td>London</td>
</tr>
<tr>
<td>02</td>
<td>Ron</td>
<td>Wizard</td>
<td>Male</td>
<td>Greenwich</td>
</tr>
<tr>
<td>03</td>
<td>Dobby</td>
<td>Goblin</td>
<td>Male</td>
<td>Hogwarts</td>
</tr>
<tr>
<td>04</td>
<td>Gringott</td>
<td>Goblin</td>
<td>Male</td>
<td>Hogwarts</td>
</tr>
</tbody>
</table>
</body>
Wizarding.css
body {
display: block;
margin: 15px;
}
table {
display: table;
width: 500px;
caption-side: bottom;
border: thin solid black;
table-layout: fixed;
border-spacing: 0;
}
colgroup {
display: table-column-group;
}
col {
display: table-column;
}
thead {
display: table-header-group;
}
tbody {
display: table-row-group;
}
tr {
display: table-row;
}
th, td {
display: table-cell;
border: thin solid black;
text-align: center;
font-weight: bold;
overflow: hidden;
}
th {
background: lightgrey;
}
td {
vertical-align: top;
}
caption {
display: table-caption;
font-size: 90%;
text-align: right;
}
td, th, caption {
padding: 5px;
}
Output: