DOCTYPE html> html> <head> <ti<!doctype html> <!-- Kevin Novak CIS 444 Prompt: Create, test, and validate an HTML document that describes a table with the following contents: -The colums of the table must have the headings "Pine," "Maple," "Oak," and "Fir." -The rows must have the labels "Average Height," "Average Width," "Typical Life Span," and "Leaf Type." -You can make up the data cell values. -Add a second-level column label, "Tree," and a second-level row label, "Characteristics"--> <html lang="en"> <head> <title>Kevin's favorite trees</title> <meta charset = "utf-8" /> <style> table, tr, th, td{ border:1px solid #E6E6E6; border-radius:3px; } th { font-family:Helvetica; } tr:nth-child(even){ background-color:#CEECF5; } <!-- Change coloration on every even row--> .char { text-align:left; } #metaheader { text-align:center } table * * *:hover { background-color:#CEF6CE; } </style> </head> <body> <h1>Welcome to my tree page!</h1> <p>I like trees a lot.</p> <table style="position:fixed; top: 50%; left: 50%; margin-top: -80px; margin-left: -307px;"> <!--This style will make the table always perfectly centered --> <caption>This table contains a list of my favorite trees, and some of their most interesting characteristics.</caption> <tr> <!--Meta header --> <th rowspan="2" colspan="2"></th> <th colspan="4" id="metaheader">Tree</th> </tr> <!-- Tree types --> <tr> <th>Pine</th> <th>Maple</th> <th>Oak</th> <th>Fir</th> </tr> <!-- Characteristics --> <tr> <th rowspan="4">Characteristics</th> <th class="char">Average Height<br/>(in meters)</th> <td>15-45</td> <td>10-45</td> <td>10-25</td> <td>10-80</td> </tr> <tr> <th class="char">Average Width<br/> (diameter, in meters)</th> <td>4</td> <td>3</td> <td>5</td> <td>2</td> </tr> <tr> <th class="char">Typical Life Span<br/> (in years)</th> <td>400</td> <td>100</td> <td>200</td> <td>10</td> </tr> <tr> <th class="char">Leaf Type</th> <td>Needles</td> <td>Palmate</td> <td>Broad leaf</td> <td>Needles</td> </tr> <!-- End characteristics --> </table> </body> </html>
Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML
. You can also specify the stylesheet information in styles.css
tab and scripts information in scripts.js
tab and start coding.
HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.
<!DOCTYPE html>
<html>
and ends with </html>
<h1>
to <h6>
where <h1>
is the highest important heading and <h6>
is the least important sub-heading.<p>..</p>
tag.<a>
tag.
<a href="https://onecompiler.com/html">HTML online compiler</a>
<img>
tag, where src
attribute consists of image name.<button>..</button>
tag<ul>
for unordered/bullet list and <ol>
for ordered/number list, and the list items are defined in <li>
.<a href="https://onecompiler.com/html">HTML online compiler</a>
CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.
Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.
body{
padding: 25px;
}
.title {
color: #228B22;
font-family: Candara;
}
<table>
tag.<tr>
tag<th>
tag<td>
tag<caption>
tag<script>
is the tag used to write scripts in HTML<script src="script.js"></script>