Snippets

#1001 HTML Document Structure

1
2
3
4
5
6
7
8
9
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Title comes here</title>
</head>
<body>
</body>
</html>

#1003 Image

1
<img src="path-to-image" id="image-id" class="class-name" />

#1004 Form Tag

1
2
3
<form action="action-file" method="post">
form content here
</from>

#1005 Text Field Input

1
<input type="text" name="field-name" placeholder="Place Holder Content" id="id-name" class="class-name">

Display

#1006 Select Field Input

1
2
3
4
5
6
<select name="field-name" id="id-name" class="class-name">
  <option value="" selected>Select</option>
  <option value="red">Red</option>
  <option value="blue">Blue</option>
  <option value="green">Green</option>
</select> 

Display

#1007 Textarea Field Input

1
<textarea name="field-name" rows="5" cols="30" id="id-name" class="class-name">Field content</textarea>

Display

#1008 Checkbox Field Input

1
<input type="checkbox" name="field-name" value="accept" id="id-name" class="class-name"> I accept

Display

I accept

#1009 Radio Group Field Input

1
2
3
  <input type="radio" name="gender" value="male"> Male<br>
  <input type="radio" name="gender" value="female"> Female<br>
  <input type="radio" name="gender" value="other"> Other

Display

Male
Female
Other

#1010 Button Field

1
  <input type="button" name="field-name" id="id-name" class="class-name" value="Click Me">

Display

#1020 Jquery Post Method

1
2
3
4
$.post( "file.php", { name: "Audu", time: "2pm" })
  .done(function( data ) {
    alert( "Data Loaded: " + data );
});