!DOCTYPE html
html
head
style
/style
/head
body
h1This is a Heading/h1
pThis is a strongparagraph/strong, with some words more
strongimportant/strong than others /p
pThis is another paragraph./p
ul
liApple/li
liOrange/li
liPear/li
/ul
table
tr
thFirstname/th
thLastname/th
/tr
tr
tdPeter/td
tdGriffin/td
/tr
tr
tdLois/td
tdGriffin/td
/tr
/table
/body
/html
Your tasks for this Critical Thinking activity are:
Hide the h1 element. It should not take up any space.
Display the list items as inline elements.
Display the strong elements as block elements.
Set the border to "2px solid green" for table, th and td
elements.
Collapse the table borders into a single border.
Set the text alignment in td elements to "right".
Code Screenshot for Indentation Reference:
Sample Output:
Program code to copy:
<!DOCTYPE html>
<html>
<head>
<style>
h1 {
display: none;
}
li {
display: inline;
}
strong {
display: block;
}
table, td, th {
border: 2px solid green;
border-collapse: collapse;
}
td {
text-align: right;
}
</style>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a
<strong>paragraph</strong>, with some words more
<strong>important</strong> than others </p>
<p>This is another
paragraph.</p>
<ul>
<li>Apple</li>
<li>Orange</li>
<li>Pear</li>
</ul>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
</body>
</html>
Get Answers For Free
Most questions answered within 1 hours.