You are on page 1of 7

Tag name tag syntax description notes

h1 <h1></h1> for heading - block


- use h1 one
time only for
seo sake

<p> closing tag / for paragraph

<br> open tag - br for - many br


<hr> horizontal makes more
space space
- Hr for - Spaces are
horizontal line recognized by
browser
- Spaces are
recognized by
browser

<img> open tag attributes :


- src=””
- Alt=””
- Title=””

Use ../ in src value


means go up of the
folder of html index

<a> closing tag / - href=””


- Target=”_blan
k”
- Target=”_self”
- _parent -
Opens the
linked
document in
the parent
frame
- _top - Opens
the linked
document in
the full body
of the window

- framename -
Opens the
linked
document in a
named frame

You can use


#idname in href to go
to specific portion of
the page ( bookmark)

html structure <!DOCTYPE html>


<html>
<head>
</head>

<body>
</body>

</html>

Head tags - <meta <noscript>Sorry, your


charset=”utf-8”> browser does not
- <meta support
name=”descripti JavaScript!</noscript>
on”
content=”mypag
e” >
- <meta
name="viewport
"
content="width=
device-width,
initial-scale=1.0"
>

- <title></title>
- <style></style>
- <link
rel=”stylesheet”
href=”style.css”
>
- <script></script
>

comment <!-- comment --> conditional


comments make
some html tags to be
excuted only by IE

<!--[if IE 9]>

<![endif]-->

inline tags - img


- a
- Span
- Table
- q

block tags - p
- h1-h6
- Div
- Form

lists <ul> nested lists : dt = defention term


<li> first </li> Dd = definiton
<li> second </li> <ul> description
<li> first </li> Dl = definiton list
</ul> <li> first </li>

------------- <li> javascript


<ul>
<ol type=”A” ​type=”I” <li> jquery </li>
start=”15” ​reversed​> <li> react </li>
<li> first </li> </ul>
</li>
</ol> </ul>

------------------

<dl>

<dt>Html </dt>
<dd> good </dd>
<dd> easy </dd>
<dd> awesome </dd>

dt>css </dt>
<dd> good </dd>
<dd> easy </dd>
<dd> awesome </dd>

</dl>

text formatting - <i></i> italic em = emphazise you can put <ins>


- <bold> bold Strong = semantic after <del> tag as
- <small> small Em = semantic inserted words after
- <strong> bold Blockquote = long deleted ones .
- <em> italic quote
- <blockquote> q = short quote Browsers indent
- <q> blockquote tag by
- Mark Browser put double using cite=”” attribute
- Del quotes before and in first tag of
- Ins after <q> <blockquote>
- Sup
- Sub mark = highlight text
Ins= underline text
Sup = rising text
Sub = lower text

tables <table> caption = name table Tfoot place doesnt


Th = tableheading matter because
<caption> table </caption> Tr = table row browser place it in
<thead> Td = table data the end
<tr>
<th colspan=”2”> <colgroup>
Firstname</th> <col span=”1” > Colgroup must be put
<th </colgroup> after caption tag
colspan=”3”>Lastname</t
h> Colgroup enable u
<th>Age</th> select any specific
</tr> column you want to
</thead> give it style

</tbody> Colspan merge two


<tr> td or more together
<td
rowspan=”2”>Jill</td> Rowspan merge two
<td>Smith</td> tr or more together
<td>50</td>
</tr>
</tbody>

</tfoot>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
</tfoot>

</table>

Forms <form> attributes of form tag: attributes of input :


- name=”” - Type=””
<label>Usernam</label> - Action=”get.ph - Name=””
<input type=”text”> p” - Vaue=””
<input type=”button”> - Method=”post - Placeholder=”
<textarea> </textarea> or get “ ”
</form> - Maxlength=”9
<textarea rows=”5” ”
cols=”10” readonly>

</textarea> Type :
- text
- Password
--------- - Submit
<legend> legend is - Button
heading of fieldset. - Checkbox
</legend> - Reset
- File
- Radio
<fieldset> - Hidden
Group your form - Img
lapels and input into
nice div with border Img type should
</fieldset> follwed by src=””

--------
You can select one
<select> radio button if you
<option> want to check many
Now radio buttons give the
</option> radio input different
<option> name
Tomorrow Ex : name=”phone”
</option>

</select> Optgroup group


many options you like
Attributes of select : in menu and label
- name=”” attribute in it give it
- Disabled name heading
- Multiple
- Size=”2”

Attributes of option :
- disabled
- Selected
- Value=”2”

Value in option are


sent to database

<optgroup
label=”one”>

<option> </option>

</optgroup>

iframe <iframe name=”” - name is


src=”” important to
Scrolling=””> specify name
of iframe if
other iframes
</iframe> are existed in
page
- Scrolling is
not supported
in html5 and
is to hide
scrolling
- Scrolling
values are :
no , yes ,
auto.

additional tags ● <pre> </pre> pre defined kbd - represent user


● <cite><cite> pre-formatted text input such as
● <address><addr and it preserve keypords or voice .
ess> spaces and line
● <kbd><kbd> breaks . Samp - represent
● <samp><samp> output from program
● <code><code> Cite defines the title or software
● <var> <var> of a work
Code - represent
Address defines compute code
contact information
for author Var - represents
variable

entites ● &nbs; you can write entity entity begin with &
name or entity and end with ;
number in case name
wasnot available Entity names are
case sensitive

image map <img src="planets.gif"


alt="Planets"
usemap="#planetmap"
style="width:145px;height:
126px;">

<map
name="planetmap">
<area shape="rect"
coords="0,0,82,126"
alt="Sun" href="sun.htm">
<area shape="circle"
coords="90,58,3"
alt="Mercury"
href="mercur.htm">
<area shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.htm">
</map>

You might also like