Skip to content
CodeWorth
CodeWorth

Code worths when shared

Primary Navigation Menu
Menu
  • BLOG
    • DataBase
    • Programming
    • Mobile
    • Multimedia
    • OS Tips
    • Others
    • Web Development
  • Products
    • Utilities
    • Games
    • JsGenLib
      • PlugIns
      • Core Functions
      • Helper & ShortHands
  • About

HTML Quick Reference

On September 7, 2009
In Web Development
Tagged HTML, Web
With 0 Comments

HTML Basic Document

<html>
    <head>
        <title>Document name goes here</title>
    </head>
    <body>
        Visible text goes here
    </body>
</html>

Heading Elements

<h1>Largest size heading</h1>
<h2>Large size heading</h2>
<h3>Medium Size heading</h3>
<h4>Average size heading</h4>
<h5>Small Size heading</h5>
<h6>Smallest heading</h6>

Text Elements

<p>This is a paragraph</p>
<br /> - line break
<hr /> (horizontal rule)

Logical Styles

<em>This text is emphasized</em>
<strong>This text is strong</strong>
<code>This is some computer code</code>

Physical Styles

<b>This text is bold</b>
<i>This text is italic</i>

Links and Anchors

<a href="http://www.example.com/">This is a Link</a>
<a href="http://www.example.com/"><img src="URL" alt="Alternate Text" /></a>
<a href="mailto:webmaster@example.com">Send e-mail</a>
A named anchor:
<a name="tips">Useful Tips Section</a>
A referenced anchor:
<a href="#tips">Jump to the Useful Tips Section</a>

Lists

Unordered List
<ul>
    <li>First item</li>
    <li>Next item</li>
</ul>
Ordered list
<ol>
    <li>First item</li>
    <li>Next item</li>
</ol>
Definition list
<dl>
    <dt>First term</dt>
    <dd>Definition</dd>
    <dt>Next term</dt>
    <dd>Definition</dd>
</dl>

Tables

<table border='1'>
    <tr>
        <th>Header for column 1</th>
        <th>Header for column 2</th>
    </tr>
    <tr>
        <td>sometext</td>
        <td>sometext</td>
    </tr>
</table>

Frames

<frameset cols="25%,75%">
    <frame src="page1.htm">
    <frame src="page2.htm">
</frameset>

Forms & Input Elements

<form action="some page to get post content" method="post orget">
    Some Input Elements
</form>

Simple text box
<input type="text" name="lastname" value="Nixon" size="30" maxlength="50" />

Password entry field
<input type="password" />

Checkbox
<input type="checkbox" checked="checked" name="sports" />Cricket
<input type="checkbox" name="sports" />Football
<input type="checkbox" name="sports" />volleyball

Radio button or Option box
<input type="radio" checked="checked" name="sex" value="1" />Male
<input type="radio" name="sex" value="2" />Female

Submit button
<input type="submit" />

Reset button
<input type="reset" />

Hidden Element
<input type="hidden" />

Dropdown or Select control
<select name="fruits">
    <option>Apples
    <option selected>Bananas
    <option>Cherries
</select>

Textarea
<textarea name="Comment" rows="60" cols="20"></textarea>

Entities

&lt; is the same as <
&gt; is the same as >
&nbsp; is non breakable space
&copy; copyright symbol
&regd; Registered symbol

Other Elements

<!-- This is a comment -->
<blockquote>
    Text quoted from some source.
</blockquote>

<address>
    Name<br>
    House No<br>
    City<br>
    Pincode<br>
</address>
2009-09-07

Subscribe

Enter your email address to receive notifications about new posts via email.

Join 634 other subscribers

Google

Designed using Chromatic WordPress Theme. Powered by WordPress.