Tutorial Proper Tags for Displaying Content Edits

by in , 0

The proper way to mark up changes to an HTML document, when you wish to retain the old content while displaying the new.

I <del>hate</del> <ins>LOVE</ins> my new iPod nano.

The browser defaults are usually a strikeout/cross-through of del, and an underline for ins.

Cách tạo sitemap cho blogspot

by in 0

1. Đăng nhập vào Google Webmaster Tools với tài khoản Google của bạn.
2. Tại tab bên trái bảng điều khiển => Tối ưu hóa => Sơ đồ trang web (Xem hình dưới) để cài site map.
3.Bấm nút Thêm/Kiểm tra sơ đồ trang web góc trái
create site map blogspot
4.Một của sổ Popup xuất hiện bạn dán đoạn code lấy theo RSS của Google vào:
atom.xml?redirect=false&start-index=1&max-results=500
Sau đó bấm chọn gửi sơ đồ trang web
create site map blogspot
Như thế là xong gửi sitemap blogspot cho google rồi


Tóm lại địa chỉ sitemap của bạn sẽ là http://youruser.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=500

Tutorial Post Data to an iframe

by in , 0

Doesn't take any JavaScript or anything. You just have the form's target attribute match the iframe's name attribute.

<form action="iframe.php" target="my-iframe" method="post">
			
  <label for="text">Some text:</label>
  <input type="text" name="text" id="text">
			
  <input type="submit" value="post">
			
</form>
		
<iframe name="my-iframe" src="iframe.php"></iframe>

The outer page doesn't even reload. But it might appear to at first glance since many browsers run the page-loading spinner in the tab when an iframe reloads.

Reference URL

Tutorial Open Link in a New Window

by in , 0

HTML attribute (valid in HTML5 now):

<a href="http://chriscoyier.net" target="_blank">This link will open in new window/tab</a>

Inline JavaScript way:

<a href="http://chriscoyier.net"  onkeypress="window.open(this.href); return false;">This link will open in new window/tab</a>

With jQuery:

See here

Tutorial Multiple File Input

by in , 0

File inputs can have an attribute of "multiple" which then allows multiple files to be selected in the file section dialog box. Firefox 3.6+ and WebKit browsers only are supporting it so far. Unfortunately the "multiple files" need to be within the same folder, as there is no interface for selecting one, moving folders, and selecting another.

<form method="post" action="upload.php" enctype="multipart/form-data">
  <input name='uploads[]' type="file" multiple>
  <input type="submit" value="Send">
</form>

Note that the "name" of the file input has brackets at the end of it. This isn't required per the spec but is required to process the multiple files.

In PHP, you can then loop through the data as an array:

foreach ($_FILES['uploads']['name'] as $filename) {
    echo '<li>' . $filename . '</li>';
}

Reference URL

Tutorial Meta Tag to Prevent Search Engine Bots

by in , 0

To prevent all search bots from indexing a page:

<meta name="robots" content="noindex">

To prevent just Google:

<meta name="googlebot" content="noindex">

If you have control over it, you probably want to add nofollow to links that point to that page as well:

<a href="privatepage.html" rel="nofollow">Link to private page</a>

Theoretically that's not needed for Google, which claims to drop all pages with noindex from their directory. But there are more search engines out there and it doesn't hurt.

Reference URL

Tutorial Meta Tag For Forcing IE 8 to Behave Like IE 7

by in , 0

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Source: Microsoft

Some reports that IE 8 in IE 7 mode doesn't quite behave like either one.