You are on page 1of 2

1

HTML TAGS

Name TAG USE Notes

Hyperlink <a href = > <a href="http://www.w3schools.com">This is a link</a>


</a>

Image <img src= /> <img src="w3schools.jpg" width="104" height="142">

<img src="w3schools.jpg" alt="W3Schools.com"


width="104" height="142">

Image <p> The image can float to the right or to the left of a
Floating <img src="smiley.gif" alt="Smiley face" text
style="float:right;width:42px;height:42px;">
The image will float to the right of the text.
</p>
The HTML style attribute has the following
Background <body style= > <body style="background-color:lightgrey"> syntax:
colour
style="property:value"

Font This placed in <h1 style="font-family:verdana">This is a heading</h1> The font-family property defines the font to be
an existing tag used for an HTML element:
<p style="font-family:courier">This is a paragraph.</p>

Font color This placed in <h1 style="color:blue">This is a heading</h1> The font-family property defines the font to be
an existing tag used for an HTML element:
<p style="color:red">This is a paragraph.</p>

Font size This placed in <h1 style="font-size:300%">This is a heading</h1> The font-size property defines the text size to be
an existing tag used for an HTML element:
<p style="font-size:160%">This is a paragraph.</p>
2

Name TAG USE Notes

<form> Example using text:


Forms . HTML forms are used to collect user input.
form elements <form>
. First name:<br> The <form> element defines an HTML form
</form> <input type="text" name="firstname">
<br>
Last name:<br>
<input type="text" name="lastname"> The <input> element is the most important
</form> form element.

Example using radio: The <input> element has many variations,


depending on the type attribute.
<form>
<input type="radio" name="sex" value="male" Here are the types used:
checked>Male
<br> Type Description
<input type="radio" name="sex" value="female">Female
</form>
text Defines normal text input
- the default width of a text field
See more form examples:
is 20 characters
http://www.w3schools.com/html/html_forms.asp Defines radio button input (for
radio
selecting one of many choices)

submit Defines a submit button (for


submitting the form)

You might also like