Common HTML tags for fast copy-paste

Every webmaster needs some common html tags like a,table,img,div,headings or embed code for windows media player or adobe(formerly macromedia) flash very often. Mostly it is possible to save much time to just easily copy-paste empty tags instead of write them. Therefore I am trying to create a useful list with possible examples. Feel free to add suggestions with examples.

Tags:

Comments

a : link page elements (anchor)

 
	<a href="http://example.com">Example 1</a>
	
	<a name="mylink" id="mylink" href="/some/path/file.php" target="_blank" rel="noindex,nofollow">Example 2</a>
	

img : call graphic elements in a webpage

 
	<img src="example.jpg" />
	
	<img src="example.jpg" alt="Description of image" width="600" height="480" border="1" hspace="5" vspace="5" align="right"  />
	

heading titles & subtitles : h1, h2, h3, h4, h5, h6

 
	<h1>This is the largest heading, which could be the page title</h1>
	<h2>This is the second large title, could be used for categories etc</h2>
	<h3>This is the third large title (medium size)</h3>
	<h4>This is the fourth large title</h4>
	<h5>This is the fifth heading and the second smallest</h5>
	<h6>This is the smallest heading</h6>
	

This is the largest heading, which could be the page title

This is the second large title, could be used for categories etc

This is the third large title (medium size)

This is the fourth large title

This is the fifth heading and the second smallest
This is the smallest heading

ul : list elements (unordered bullets)

<ul>
	<li>PHP</li>
	<li>HTML</li>
	<li>CSS</li>
	<li>JavaScript</li>
	<li>Java</li>
	<li>ASP</li>
	<li>Perl</li>
</ul>

List of Programming Languages:

  • PHP
  • HTML
  • CSS
  • JavaScript
  • Java
  • ASP
  • Perl

ol : list elements (ordered, numeric)

<ol>
<li>Microsoft Windows XP / Vista</li>
<li>Apple Mac OS X </li>
<li>Linux Ubuntu</li>
<li>Linux Debian</li>
<li>Linux MEPIS</li>
<li>Linux openSUSE</li>
<li>Linux SUSE Enterprise Linux</li>
<li>Linux Fedora</li>
<li>Linux Red Hat Enterprise Linux</li>
<li>Linux CentOS</li>
<li>Linux Mandriva</li>
<li>Linux Xandros</li>
<li>Linux Linspire </li>
<li>Linux Gentoo</li>
<li>Linux Slackware </li>
<li>DragonFly BSD</li>
<li>OpenBSD </li>
<li>Nexenta</li>
<li>Solaris </li>
<li>Inferno</li>
<li>SkyOS</li>
<li>Digital UNIX (aka Tru64) </li>
</ol>

List of Operating System

  1. Microsoft Windows XP / Vista
  2. Apple Mac OS X
  3. Linux Ubuntu
  4. Linux Debian
  5. Linux MEPIS
  6. Linux openSUSE
  7. Linux SUSE Enterprise Linux
  8. Linux Fedora
  9. Linux Red Hat Enterprise Linux
  10. Linux CentOS
  11. Linux Mandriva
  12. Linux Xandros
  13. Linux Linspire
  14. Linux Gentoo
  15. Linux Slackware
  16. DragonFly BSD
  17. OpenBSD
  18. Nexenta
  19. Solaris
  20. Inferno
  21. SkyOS
  22. Digital UNIX (aka Tru64)

dl : Definition List

<dl>

<dt>Apache</dt>
<dd>Apache is a webserver</dd>

<dt>ZF</dt>
<dd>Zend Framework</dd>

</dl> 

Demo:

Apache
Apache is a webserver
ZF
Zend Framework

Favicon.ico

<link rel="shortcut icon" href="/themes/zen/favicon.ico" type="image/x-icon" />

swf : object embed code

Insert flash videos to your website (ie Youtube):

<object width="425" height="344">
<param name="movie" value="example.swf"></param>
<embed src="example.swf" type="application/x-shockwave-flash" width="425" height="344"></embed>
</object>
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/aZpD0btOZx8&hl=de&fs=1&"></param>
<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/aZpD0btOZx8&hl=de&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>
</object>

script : javascript code & include .js file

<script type="text/javascript" src="/external/files/javascript.js"></script>
<script type="text/javascript">
<!--
alert('Hello World!');
-->
</script>

style - css : embed code and external file

  <link type="text/css" rel="stylesheet" media="all" href="/public_files/style.css" />
<style type="text/css">
<!--

-->
</style>

object : apple quictime movie embed html code

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="260">
 <param name="src" value="/apple/quicktime/example.mov" />
 <param name="controller" value="true" />
 <object type="video/quicktime" data="/apple/quicktime/example.mov" width="320" height="260" class="mov">
  <param name="controller" value="true" />
  Error occured!
 </object>
</object>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Use <pre> all your html php come here </pre> for your code
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <b> <pre> <h1> <h2> <h3> <h4> <h5> <h6> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <div> <style><img> <br> <blockquote>
  • Lines and paragraphs break automatically.
  • You may insert videos with [video:URL]

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

CafeWebmaster.com(CW) is a free online community for webdevelopers and beginners. Anybody can share their code, articles, tips, tutorials, code-examples or other webdesign related material on the site. Newbies can submit their questions and reply to existing questions. CW does not guarantee or warrant reliability of code, data and information published on the site. Use the site on your own risk. The site takes no responsibility of direct or indirect loss or any kind of harm to its users. The site also doesn't take responsibility of infected files or source code with any kind of infection or viruses, worms, spywares, malwares, trojan horses. CW reserves the right to edit, move, or delete any of content for any reason.