Let's start with some basic HTML
Basic HTML | |||
---|---|---|---|
Name | Syntax | Purpose | Notes |
Opening | <!DOCTYPE HTML> | Used in the begining of an HTML document to let the browser know what language is being used | Must use when making an HTML doc. It should be the VERY first thing on the page. |
Making a comment | <!- - Comment - -> | This will not be coded. Instead, it can be used to write a note to whoever is reading the code | .. |
Title | <Head> <Title>Hello</Title> </Head> | Used to put a title in the tab on the browser. | Can only be used between <Head></Head> |
Link | <a href=“url”>Link text</a> | Used to put a link on a page | |
Link to same page | <a href=“#IDtag”>Link text</a> | Used to link to a specific area on a the same page | This is linked using an ID tag |
Image, w/description | <img src=“url” alt=“Image description” > | Used to put an image on a site. The alt tag allows screen readers to identify the image | One MUST use an image description |
Image Link | <a href=“url”> <mg src=“img url”> </a> | Used to make an image a link | Useful to break up monotony |
HTML Tables | |||
---|---|---|---|
Name | Syntax | Purpose | Notes |
Table Base | <table> <tr><tr> </table> |
This sets up the base of the table. Each <tr>, Table row, creates a row in the table. The <table> and <tr> are required. | Without Table Date and information this code will not display any information. |
Table Data | <table> <td>This in info in a sinlge column </td> </table> |
This is what holds the information in your table. This also determines the number of columns in the row. | The Table Data itself will not show any information till you put information in. Essentially, the plain HTml will show a blank space. |
Table Heading | <table> <tr> <th> </th> </tr> </table> |
Use <th> instead of <td> for headings on the table. Include scope="row/col" todesignate which it is heading. | Always include the scope |
Colspan/Rowspan | coslpan="2" | Makes a cell go across multiple row or comments depending on how it is tagged. | .. |