Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

HTML coding work: Heading - <h1>Heading</h1> <h2>Heading</h2>

ETC ETC.

Paragraphs - <p>paragraph</p> HTML Links <href= "link">Wordsonwhatthelinkis</a> (<a href="url">Link


text</a>) opening hyperlink new tab - (<a href=" Link " target="_blank">Visit W3Schools!</a>)

Example <html> <body> <p>This is my first paragraph.</p> </body> </html>

Body - The <body> element defines the body of the HTML document.
The element has a start tag <body> and an end tag </body>. HTML Lines - The <hr /> tag creates a horizontal line in an HTML page. HTML Comments - <!-- This is a comment -->

HTML Line Breaks - <p>This is<br />a para<br />graph with line breaks</p>
(<br />) HTML text format - <b> - Bold text <i> Italic Text <strong> or <em> means that you want the text to be rendered in a way that the user understands as "important".

HTML Style Example - Font, Color and Size


<html> <body> <h1 style="font-family:verdana;">A heading</h1> <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p> </body> </html>

Placing text in the center <html> <body> <center><h1>This is a test</h1></center> </body> </html>

HTML table <table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>

HTML Unordered Lists:


An unordered list starts with the <ul> tag.

<ul> <li>Coffee</li> <li>Milk</li> </ul> Will come out like this :


Coffee Milk

HTML Ordered lists: An ordered list starts with the <ol> tag. ----->

<ol> <li>Coffee</li> <li>Milk</li> </ol> Will come as this:

This is how it will look like:


Coffee 1. Coffee - black hot drink 2. Milk Milk - white cold drink

HTML Defenition Lists

The <dl> tag defines a definition list.

<dl> <dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl>

Radio Buttons <input type="radio" /> defines a radio button.

<form> <input type="radio" name="sex" value="male" /> Male<br /> <input type="radio" name="sex" value="female" /> Female </form> This is how it would look like -

Male

Female

Checkbox<input type="checkbox" /> defines a checkbox

<form> <input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br /> <input type="checkbox" name="vehicle" value="Car" /> I have a car </form> This is how it would look like -

I have a bike

I have a car

Submit Button <input type="submit" /> defines a submit button.

<form name="input" action="html_form_action.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> This is how it would look like Submit

Username:

You might also like