Hướng dẫn tạo trang báo lỗi 404 đẹp cho blogspot

06:45:00 0
Ở một bài trước, mình đã hướng dẫn các bạn chuyển hướng trang bị lỗi 404 về trang chủ rồi đúng không ạ?

Nhưng bạn lại không thích như vậy. Bạn muốn sẽ có một trang báo lỗi 404 đẹp cho blog của mình?
Hôm nay Việt Blogger xin hướng dẫn các bạn tạo một trang báo lỗi theo đúng như ý của bạn.


Bước 1:

Các bạn hãy copy và chèn đoạn css này vào trước thẻ </style> trong blog của bạn
/* Error 404 Rip By Tips24h.net*/
#error-page{background-color:#e9e9e9;position:fixed!important;position:absolute;text-align:center;top:0;right:0;bottom:0;left:0;z-index:99999}
#error-404{margin:11% auto}
#error-404 .box-404{width:200px;height:200px;background:#21afa4;color:#fff;font-size:80px;line-height:200px;border-radius:10px;margin:0 auto 50px;position:relative}
#error-404 .box-404::after{content:"width:0;height:0;bottom:-8px;border-color:#21afa4 transparent transparent;border-style:solid;border-width:9px 9px 0;position:absolute;left:47%}
#error-404 h1{text-transform:uppercase}
#error-404 p{line-height:1.7em;font-size:15px;font-family:arial}


Bước 2:

Chính là bước quan trọng nhất. Bước hiển thị trang báo lỗi ra màn hình.
Ở bước này chúng ta có hai cách nhé.

Cách 1:
Chèn bộ code báo lỗi ngay trên blog của bạn.
Bạn hãy chèn đoạn code sau trước thẻ </body> trong blog của bạn:
<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<div id='error-page'>
<div id='error-404'>
<div class='box-404'>404</div>
<h1>Địa chỉ ỦL không tồn tại</h1>
<p>Có thể URL bị hỏng hoặc đã bị Admin blog gỡ bỏ</p>
<p>Trở về trang chủ <a expr:href='data:blog.homepageUrl'><data:blog.title/></a></p>
</div>
</div>
</b:if>
Cách 2:
Nhúng trang báo lỗi vào blog của bạn.
Với cách này, trước tiên chúng ta cần phải soạn thảo ra một trang báo lỗi riêng cho mình. Sau đó bạn up nó lên một host nào đó để có thể truy cập được vào tệp tin đó.
Sau khi là được những công việc đó rồi các bạn hãy dùng code này để chèn trang báo lỗi vào blog của bạn nhé. Cũng chèn trước thẻ </body> nhé
<b:if cond='data:blog.pageType == &quot;error_page&quot;'>
<div id='error-page'>
  <iframe height='100%' width='100%' src='link trang báo lỗi'/>
</div>
</b:if>
Xong rồi. Bây giờ lưu lại và ra xem kết quả nào:


DEMO: http://www.vietbg.com/trang-loi-404

Chúc các bạn có được một trang báo lỗi 404 như ý nhé!

Phải lòng Tuyết Thủy Tinh

03:24:00 0
Tuyết Thủy Tinh - Sự lạnh lùng mỏng manh! Nó không là băng, không cứng sờn, tê buốt. Nó mềm mại như hàng ngàn mảnh vỡ của một ánh sao xa, lung linh và khó thấy...

Những hạt tuyết như pha lê trong suốt, phản chiếu rất nhạy cảm với những màu sắc, dư vị và biến động của cuộc đời. Những hạt tuyết long lanh, bé nhỏ li ti, mỏng manh dễ vụn... Sẽ là buồn lắm, tiếc lắm nếu ai đó vụng tay sờ vào làm vỡ nó. Người vụn tay đáng trách hay vì tuyết quá mong manh? Không, đừng trách người kia, cũng đừng giận tuyết,vì dù sao họ cũng quyến luyến nhau.

Nhận ra vẻ đẹp của tuyết, cảm được cái sắc trong có hồn của tuyết là người đó. Đặt cả sự trân trọng chân thành và niềm cảm phục lẫn xót thương, người kia cố gắng bằng hết sự nhẹ nhàng có thể để sờ lên tuyết, để hi vọng được đặt nó ở trong tay và sưởi ấm nó ở trong lòng.Lúc ấy, tim người ta bỗng rùng lên bất giác một cảm xúc không thể nói hết thành lời của niềm vui sướng,của sự biết ơn, của tình thương đột nhiên khởi phát - Một sự gắn bó tự nhiên được kết thành đầy mãnh liệt khăng khít bất ly giữa người ta và tuyết vùng lên sống! 



Không biết tuyết có cảm nhận được điều gì tương tự như thế không? Nhưng với người kia, ngay lúc được chạm vào những hạt tuyết thủy tinh long lanh, trong suốt ấy, lòng người ta chợt nhiên đã có một phần là của tuyết. Có cái gì đó đã gắn kết họ lại với nhau như một cặp tri âm, một đôi tri kỷ "tương khí tương cầu" - thứ mà thế gian này nhiều khi muốn có, theo đuổi cả đời mà chẳng thể tìm ra lại đến với người ta chỉ trong vài khoảnh khắc. Một thứ định duyên, một sợi tơ hoặc nghĩa đã vướng sẵn chỉ chờ giây phút để họ gặp nhau như thế. Một thứ gì đó sẵn có đã tạo nên một sự "chợt nhiên" bất ngờ mà chỉ người trong cuộc mới hiểu hết được thôi.

Tuyết vì mang hơi lạnh giá ở trong mình rất cần hơi ấm. Tuyết chồng khít lên nhau thành lớp, trải kề nhau phủ ấp suốt mùa đông. Và lạnh! Nỗi lạnh bao giờ cũng tràn về những nỗi sợ của cô đơn và trống trải. Tuyết thủy tinh như mảnh lòng trong trắng, sẽ làm sao để trốn khỏi nỗi niềm cô sầu, hiu quạnh ở thâm tâm. Lóng lánh như những thước hồn nhạy cảm, dễ tổn thương, mặc dù cái khí lạnh quanh nó hay khiến người đời nhầm tưởng, đặt vội, gán cho nó cái nghĩa khó gần và lãnh đạm vô tâm để rồi tránh né nó, chê bai, xem thường nó.
Người đời đã nghe qua nước mắt chảy thành sông, thì cũng biết lệ lòng ngưng thành tuyết. Hạt tuyết, vì đã nếm đủ đắng cay và thấm cả giọt nước mắt khổ đau lẫn giọt máu lòng rỉ xát vết thương tâm, mới đọng thành được thế. Vẻ đẹp đó, sự thanh thoát mổng manh đó là cả một sức mạnh, một sự chống chịu sau tất cả những đau thương. Nó là vẻ đẹp sau cùng còn sót lại, kết tinh của giọt lệ đã trải trầm luân...
............!!!

Bài 10: Giới thiệu về Position

02:30:00 1
Trong bài số 8, mình đã giới thiệu cho các bạn về Float, chúng ta có thể sử dụng nó để dàn trang sang trái hoặc qua phải. Vậy nếu chúng ta muốn định một thành phần qua một vị trí khác chúng ta phải làm thế nào?

Thật may mắn là  trong CSS chúng ta có thuộc tính Position. Nó được sử dụng sử dụng để định vị trí của thành phần này so với thành phần khác (có thể tạm gọi là thành phần làm mốc) hoặc so với chính cửa sổ trình duyệt của chúng ta

1. Fixed

- Sử dụng để cố định 1 thành phần so với cửa sổ trình duyệt, khi kéo thanh cuộn thì thành phần đó vẫn được cố định so với trình duyệt.
Ví dụ:
<html>
<head>
<style type="text/css">
p.fixed {
background: blue;
position: fixed;
right: 40px;
top: 50px;
}
</style>
</head>
<body>
<div>
<p class="fixed">position fixed</p>
<p>text text text ...</p>
</div>
</body>
</html>

2. Relative

- Là cách cố định vị trí 1 cách tương đối của 1 thành phần nào đó so với vị trí bình thường( không định vị trí)  của nó
Ví dụ:
<style type="text/css">
div {
border: 1px solid red;
height: 100px;
}
p {
background: blue;
position: relative;
}
</style>

3. Absolute

- Là 1 cách cố định 1 thành phần so với 1 thành phần khác 1 cách tuyệt đối. Khi sử dụng position thông thường thì thành phần mẹ phải đặt Relative để nó biết phải cố định tuyệt đối theo thành phần nào, nếu không tồn tại nó sẽ nhận <html> làm thành phần mẹ
Ví dụ:
<style type="text/css">
div {
border: 1px solid red;
height: 100px;
}
p {
background: blue;
position: absolute;
}
</style>
Bạn có thể xem thêm tại: http://jsbin.com/uvaros/1/edit


Bổ sung:
Đi kèm 3 thuộc tinh trên chúng ta sử dụng thêm 4 thuộc tinh: Top, Right, Bottom, Left với các giá trị tương ứng với cửa sổ trình duyệt( với Fixed), chính nó ( Relative), thành phần mẹ( Đối với Absolute).

Đây cũng là bìa cuối cùng trong serie CSS cơ bản của mình rồi. Mong rằng nó sẽ có ích cho mọi người.
Chúc các bạn học thật tốt!!!

Bài 9: Tìm hiểu về Block và Inline

01:24:00 0
Trong bài này chúng ta sẽ tìm hiểu về Block và Inline trong CSS
Tuy nhiên đây không phải thuộc tính mà là giá trị quy định cách hiển thị của 1 thành phần nào đó. Sử dụng trong thuộc tinh display để quy định cách hiển thị.

- Block quy định các thành phần hiển thị theo từng khối riêng biệt, một số thẻ mặc định đã hiển thị theo khối như: p, ul, li, div, heading,… Tức là: Khi sử dụng các cặp thẻ này, mỗi nội dung ở 1 dòng riêng biệt không nằm cùng 1 dòng hay gọi là các khối. Hãy tưởng tượng như các cặp thẻ đó dù các bạn viết code  trên cùng 1 dòng thì chúng cũng tự động xuống dòng, giống như việc xếp 10 cái hộp lên nhau, mỗi hộp là 1 khối.

- Inline quy định các thành phần nằm cùng 1 hàng ( hay 1 dòng), ví dụ như Menu trên website,…
Ngoài ra chúng ta còn 1 số giá trị sau: inline-block, inline-table, list-item, table-cell,..

Tham khảo thêm tại: http://www.w3schools.com/cssref/pr_class_display.asp
Ví dụ: http://jsbin.com/evoxur/1/edit

Bài tập: Thiết kế website như hình bên dưới( Nên làm lại, không nên sử dụng kết quả của Bài 8)


Bài 8: Float và Clear

01:13:00 0

1. Float

- Là thuộc tính sử dụng để cố định thành phần của website về 1 phía: trái( left) hay phải( right).
- Thường sử dụng trong việc dàn trang, chia cột cho website.

Giá trị:

- Left: Dàn qua trái.
- Right: Dàn qua phải.
- None: Bình thường.

Bài toán: Sử dụng div kết hợp với CSS xây dựng website như hình dưới.
Hướng dẫn:
Xây dựng 2 cặp thẻ div tương ứng với 2 thành phần trong hình. Sử dụng float cho thành phần bên trái tàn sang bên trái. Sau khi làm xong các bạn có thể xem đáp án như trong hình:

2. Clear

- Là thuộc tinh sử dụng cho các thành phần đi cùng các thành phần sử dụng float. Sử dụng để định dạng
cách tràn cho thành phần này khi thành phần trước nó đặt float và còn khoảng trống.
- Giá trị:
+ Left: Tràn sang trái.
+ Right: Tràn phải.
+ Both: Không tràn, thường dung để tránh tràn các thành phần trong website.
Khi đặt float cho ảnh thì phần bên phải ảnh còn khoảng trống nên các thành phần bên dưới sẽ tràn lên để lấp đầy chỗ trống đó. Để giải quyết vấn đề này chúng ta đặt 1 thành phần vào giữa 2 thành phần trên( giữa thẻ img và thẻ p) sau đó cho thành phần này clear: both.
Ví dụ:
<br class=“clear” /> 
hoặc 
<div class=“clear”></div> 
hoặc …
Sau đó sử dụng: 
.clear{ clear: both;} 
Xem kết quả: 

Bài tập: Thiết kế website như hình bên dưới sử dụng css( Không dùng table), với tên các thành phần và kích thước cho trước.

Bài 7: Định dạng kiểu khối (Box Model)

00:52:00 0
Box model: Đước dùng để định dạng kiểu khối (hay kiểu hộp) cho website.
Ở bài này chúng ta sẽ tìm hiểu lần lượt 3 phần của Box model.

1. Border- Đường viền

- Trong border chúng ta có 3 thuộc tính

a) Border-width: Độ dày của đường viền.

- Cú pháp như sau:
border-width: apx bpx cpx dpx;
Với: a, b, c, d lần lượt là giá trị độ dày đường viền của các cạnh: bên trên, bên phải, bên dưới và bên trái (Theo thứ tự được sắp xếp theo chiều của kim đồng hồ).

Khi 1 trong 4 giá trị kia bị thiếu thì nó sẽ lấy giá trị độ dày của cạnh đối diện nó.
Ví dụ: 
borde-width: 2px 3px 3px;
Như vậy: Cạnh trên độ dày là 2px, phải là 3px và dưới là 3px, như vậy bên trái bị thiếu nó sẽ lấy của cạnh đối diện là độ dày cạnh bên phải.

b) Border-style: Kiểu đường viền

- Chúng ta có 1 số giá trị về đường viền như hình bên
- Không nhất thiếu phải định dạng cả 4 cạnh có viền mà có thể sử dụng 4 thuộc tính sau: border-top-style( viền trên), border-right-style( viền phải), Border-bottom-style( viền dưới), border-left-style( viền trái).

c) Border-color: Màu đường viền

- Giá trị của border là các loại mã màu.

Ví dụ:
p{
border-width: 2px;
border-style: solid;
border-color: blue;
}
Có thể viết tắt các thuộc tính về border như sau:
border: width style blue;

2. Padding- Biên

Là thuộc tính tạo khoảng cách đường viền và nội dung

Đối với padding chúng ta cũng có 4 thuộc tính: padding-top, padding-right, padding-bottom, adding-left. Sử dụng để căn chỉnh nội dung so với các viền tương ứng: trên, phải, dưới, trái.

Tương tự như border-width ở phần trên: Khi 1 thành phần bị thiếu nó sẽ lấy giá trị của thành phần đối diện.



Như ở ví dụ trên do chỉ có 1 giá trị: padding: 20px; nên khoảng cách từ nội dung tới đường viền đều bằng 20px.
Các bạn sẽ để ý thấy hình trên nội dung cách đường viền bên phải “hình như” lớn hơn 20px, lí do nó như vậy là nội dung của chúng ta ít trong khi đó chiều rộng của border lấy theo kích thước chiều ngang trình duyệt (Các bạn viết nội dung dài ra để cho tràn xuống dòng dưới sẽ thấy kết quả).

3. Margin- Lề

- Là thuộc tinh sử dụng để căn chỉnh các thành phần với nhau hay 1 thành phần nào đó với lề( như hình).
- Tương tự Padding, Margin cũng có 4 thuộc tính để căn chỉnh 4 vị trí: top, right, bottom, left hay auto.

Ví dụ: Căn chỉnh website ra giữa
body{
margin: auto;
}
- Khi lập trình chúng ta thường sử dụng đoạn code sau để reset
*{
margin: 0px;
padding: 0px;
}

Như vậy: Toàn bộ các thành phần của website sẽ có margin và padding bằng 0, để tránh việc các trình duyệt hiển thị khác nhau.


BÀI TẬP: Thiết kế website như hình bên dưới.


Bài 6: Pseodu- Phần tử giả

00:36:00 0
Trước khi bắt đầu bai học, chúng ta cũng cần phải hiểu thế nào là Pseodu đã.
Có thể nói một cách đơn giản nhất là như thế này

Pseodu (hay dịch là Phần tử giả): Nó là một phần quan trọng mà hầu hết các website đều có. Tại sao lại như vậy ạ? Tại sao nó lại xuất hiện trong hầu hết các website hiện nay. Câu trả lời chính là trong tất cả các website hiện nay đều chứ các đường link (liên kết)trên các trang trong web của mình. Và Pseodu dùng để quy định cách hiển thị cho một liên kết khi thực bạn thực thi 1 hành động nào đó. Ví dụ như:

1. Hover- di chuột qua

- Như đã nói bên trên do Pseodu áp dụng với liên kết nên trước tiên chúng ta cần phải xác định thành
phần tác động đến là thẻ <a>
- Ví dụ:
a:hover{ color: red; background: white; text-decoration: blink;}
Tức là: Khi di chuột qua liên kết thì nội dung bên trong cặp thẻ {…} sẽ hoạt động, cụ thể: Khi di chuột qua liên kết sẽ có màu đỏ và nền trắng và nháy.

2. Link

- Trong các thuộc tính cho liên kết, mặc định màu của liên kết là xanh chúng ta có thể chuyển qua màu khác cho nó để đẹp hơn và trong chuyên nghiệp hơn.
- Ví dụ: 
a:link { color: gold; }
Như vậy những ký tự nào trên trang web của bạn mà có chứa liên kết sẽ chuyển thành màu vàng.

3. Active

- Định các thuộc tính cho liên kết khi liên kết đó hoạt động ví dụ như khi nhấn giữ chuột vào liên kết đó. Tuy nhiên trường hợp đó ít được sử dụng. Đa số trường hợp này thường áp dụng cho menu hay list các chuyên mục,...
Nghĩa là sao? Có nghĩa là các thành phần trong menu đó sẽ dẫn bạn đến một trang nhất định và khi bạn truy cập vào trang đó thì cũng có nghĩa là liên kết đó đang hoạt động.

- Ví dụ:
a:active { background: gray; }
Ở như ví dụ của mình khi truy cập vào đường link thì chuỗi ký tự mà bạn chèn link vào sẽ có nền màu xám.

4. Visited

- Định các thuộc tính khi liên kết đã được ghé thăm( Những liên kết chúng ta đã click ít nhất 1 lần)
Ví dụ:

Tối ưu hóa thẻ Meta Description cho Blogspot

21:50:00 0

Thẻ Meta Description là gì?


Đúng như tên gọi của nó, description trong tiếng Việt có nghĩa là mô tả hay miêu tả, thẻ meta description dùng để mô tả một cách khái quát, ngắn gọn nội dung trang Web của bạn. Google rất “quan tâm” đến thẻ meta description bởi vì nó muốn những snippet (đoạn trích ngắn) phải thể hiện chính xác trên trang kết quả. Khi thẻ này giúp người đọc hiểu rõ về nội dung của trang Web, Google sẽ “ưu tiên” sử dụng thẻ Meta Description.

Thêm thẻ Meta Description chung cho ​​Blogger.

Vào Blogger > Cài đặt > Tìm kiếm Tuỳ chọn
Tìm phần Thẻ Meta ,đánh dấu vào “Có” để Active .
Một box thoại sẽ xuất hiện , bạn viết thẻ meta cho trang chủ của bạn vào đây. Hãy chắc chắn rằng ko quá 150 ký tự.
Nhấp SAVE để xem thay đổi.



Bây giờ chuyển sang bước tiếp theo là làm thẻ Meta decription cho từng bài viết

Thêm thẻ Meta Tags cho từng bài viết


Khi viết bài mới ,bạn thấy “Mô tả Tìm kiếm” trong thanh bên, đơn giản là viết mô tả nội dung tóm tắt tìm kiếm cho bài viết đó.
Nếu bạn quên viết,google sẽ tự động lấy 1 đoạn ngẫu nhiên có liên quan trong bài bạn ra để hiển thị trên kết quả tìm kiếm .

Hướng dẫn tạo nút lên và xuống cho blogspot

21:49:00 0
Chào các bạn!
Chắc hẳn mọi người khi lướt web ai cũng đã gặp phải những trang web có nôi dung dài khiến cho trang web cũng dài theo không kém, và việc này khiến cho bạn cảm thấy khó chịu.
Vậy hãy cùng mình làm giảm bớt nhưng khó chịu đó đi bằng cách thêm vào blog nút back to top và back to bottom đơn giản nào.

Bước 1: Đăng nhập vào blogger.com, vào phần Dashboard > Design > Edit HTML > Expand Widget Templates.
Bước 2: Nhấn tổ hợp phím "ctrl" + "f" để bắt đầu tìm kiếm.
Bạn hãy nhập </body> vào khung tìm kiếm rồi nhấn "ENTER"
Tiếp theo bạn chỉ cần copy đoạn code sau và dán ngay trên thẻ </body> là xong nhé.
<!-- Go to top and bottom Start -->
<a href='#' style='display:scroll;position:fixed;bottom:35px;right:5px;' title='Go to Top'><img src='https://lh3.googleusercontent.com/-Z59imjufc8Y/TxTj81sj1tI/AAAAAAAABvs/Fl_vFQc9_04/s30/top.gif'/></a>
<a name="bottom"></a>
<a href='#bottom' style='display:scroll;position:fixed;bottom:5px;right:5px;' title='Go to Bottom'><img src='https://lh5.googleusercontent.com/-ywLU6sbMrr8/TxTj85XF7UI/AAAAAAAABvw/AFgoTGwv8_Q/s30/down.gif'/></a>
<!-- Go to top and bottom End -->
Bước 3: Hãy ra trang chủ và hưởng thành quả của mình nào.
Và đây là kết quả của chúng ta.

Hướng dẫn chuyển hướng 404 về trang chủ blogspot

21:47:00 0
Như các bạn đã biết lỗi 404 thường xuyên xuất hiện trên website trong quá trinh lỗi phát sinh. Nếu như nó chẳng gay ảnh hưởng gì tới trang web của chúng ta thì có lẽ hôm nay mình đã không viết bài này. Nhưng có một vấn đề lớn đó là nhưng lỗi này thật sự không hề tốt cho công việc SEO của bạn, và đương nhiên nó sẽ bị Google, Bing hay công cụ tìm kiếm khác đánh giá thấp.

Vậy làm sao để xử lý các lỗi này được? Kể ra chắc cũng có một vài cách hay được áp dụng để xử lý lỗi này.

Nhưng theo mình cách nhanh nhất để xử lý chúng chính là Redirect lỗi 404. Ngĩa là sao ạ? Tức là chuyển hướng trang lỗi 404 về trang chủ( khi có người truy cập vào link lối thì người dùng sẽ được đưa về trang chủ blog.)

 Và sau đây là những bước hướng dẫn Redirect lỗi 404 mà các bạn nên áp dụng

Phương pháp nhanh chóng ,đơn giản nhất để chuyển hướng trang lỗi 404 về trang chủ của bạn trong Blogger theo SEO Onpage là hãy dùng Javascript.

Đầu tiên, vào bảng quản lý website Blogger. Sau đó ,vào như sau : Settings > Search Preferences > Custom Page Not Found > Edit .






Sau đó thêm đoạn code sau vào khung chỉnh sửa:

Bạn vừa nhấn vào một liên kết bị hỏng hay đã loại bỏ, vui lòng liên hệ admin để báo lỗi và được giải thích!
Bạn đang được chuyển hướng về trang chủ...
<script type = "text/javascript">
setTimeout(function()
{
location.pathname= "/"
},5000);
</script>

Bảng mã code sẽ được hiển thị giúp có thể chỉnh sửa theo ý của bạn. Sau đó click Save changes.

Sau đó, thông báo được hiển thị: “Shortly, the page you’re looking for in this blog dóe not exist. You will be redirect to homepage shortly” .
Lưu ý rằng con số 5000 tính theo dạng phần nghìn giây.

Thường thì người dùng sẽ được tự động redirect đến Homepage trong 5s. Khoảng thời gian này đảm bảo rằng có đủ thời gian để đọc thông báo.Bạn có thể F5 website của mình ,gõ địa chỉ bất kì chưa có trong website để xem đã redirect thành công chưa .

Việc tạo chuyển hướng 301 về homepage đã giúp góp phần loại bỏ được kkả năng bị google phạt vì lỗi 404.Giúp bạn SEO tốt hơn.

Chúc bạn thành công !

Mở liên kết ngoài trong một tab mới

21:46:00 0
Xin chào các đọc giả của Việt Blogger

Mình chắc rằng trong khi viết blog, sẽ có những trường hợp các bạn phải dẫn link ra ngoài blog của mình. Hay là những người khác trong quá trình bình luận họ cũng sẽ gắn thêm link của họ vào blog của bạn.

Và nếu như những độc giả của chúng ta click vào các đường link đó thì ngay lập tức họ sẽ được chuyển tới trang web mới và thoát ra khỏi trang web của bạn.

Vậy phải làm sao để khắc phục được tình trạng này?

Rất đơn giản thôi ạ. Các bạn chỉ cần làm theo 4 bước nhỏ sau đây là sẽ được ngay. Còn chần chừ gì nữa? Bắt đầu ngay thôi nào.

Cách 1: Dùng code + js


Bước 1: Cac bạn đăng nhập vào bảng điều khiển Blogger -> Mẫu (Template) -> Chỉnh sửa HTML (Edit HTML)

Bước 2: Ấn tổ hợp phím (Ctrl + F) rồi điền vào ô tìm kiếm đoạn này "</head>" và nhấn phím "ENTER".

Bước 3: Các bạn copy đoạn code dưới đây và chèn ngay trên thẻ </head> nhé.

<script type='text/javascript'>
$(document).ready(function() {
  $("a[href^='http://']").each(
    function(){
     if(this.href.indexOf(location.hostname) == -1) {
        $(this).attr('target', '_blank');
      }
    }
  );
$("a[href^='https://']").each(
function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
}
);

});
</script>
Bước 4: Nói là bước cho hay thôi chứ thực ra là trỏ lại trang chủ để xem có hiệu quả không nhé.

Cách 2: Dùng tính năng của blogspot

(Lưu ý cách này chỉ áp dụng cho những link được chèn trong bài viết thôi nhé, các link khác sẽ không được)

Nếu sử dụng cách này, khi chèn link các bạn sau khi nhấn vào nút liên kết thì nhớ tích vào ô "Open this link in a new window" là được nhé!


Chúc các bạn thành công nhé!
Có gì không hiểu hãy để lại comment mình sẽ giải đáp cho các bạn nhé!

Thêm icon cho menu Blogspot

04:13:00 0
Một blog để có thể xem là hoàn chỉnh ít nhất cần phải có một menu. Nó giúp chúng ta điều hướng đọc giả một cách thật dễ dàng. Nó giúp cho mọi người có thể nắm được bố cục trang web một cách tổng quát nhất.

Vậy vì lý do gì ta không làm cho nó trở nên thật lung linh hơn nữa với những icon thật đẹp mắt bên cạnh những chuyên mục trong menu chứ.

Bước 1:

Để trình duyệt có thể hiểu và hiển thị được các icon trên trang web của bạn thì chúng ta cần khai bác các thuộc tính của nó. Để là đươc điều này các bạn chỉ việc copy đoạn code sau  và dán vào trước thẻ ]]></b:skin> là được.

@font-face {
font-family: 'FontAwesome';
src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
.fa {
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
.fa-lg {
font-size:1.33333333em;
line-height:.75em;
vertical-align:-15%;
}
.fa-lg {
left:-1.85714286em;
}
.fa-glass:before {content: "\f000";}
.fa-music:before {content: "\f001";}
.fa-search:before {content: "\f002";}
.fa-envelope-o:before {content: "\f003";}
.fa-heart:before {content: "\f004";}
.fa-star:before {content: "\f005";}
.fa-star-o:before {content: "\f006";}
.fa-user:before {content: "\f007";}
.fa-film:before {content: "\f008";}
.fa-th-large:before {content: "\f009";}
.fa-th:before {content: "\f00a";}
.fa-th-list:before {content: "\f00b";}
.fa-check:before {content: "\f00c";}
.fa-remove:before,
.fa-close:before,
.fa-times:before {content: "\f00d";}
.fa-search-plus:before {content: "\f00e";}
.fa-search-minus:before {content: "\f010";}
.fa-power-off:before {content: "\f011";}
.fa-signal:before {content: "\f012";}
.fa-gear:before,
.fa-cog:before {content: "\f013";}
.fa-trash-o:before {content: "\f014";}
.fa-home:before {content: "\f015";}
.fa-file-o:before {content: "\f016";}
.fa-clock-o:before {content: "\f017";}
.fa-road:before {content: "\f018";}
.fa-download:before {content: "\f019";}
.fa-arrow-circle-o-down:before {content: "\f01a";}
.fa-arrow-circle-o-up:before {content: "\f01b";}
.fa-inbox:before {content: "\f01c";}
.fa-play-circle-o:before {content: "\f01d";}
.fa-rotate-right:before,
.fa-repeat:before {content: "\f01e";}
.fa-refresh:before {content: "\f021";}
.fa-list-alt:before {content: "\f022";}
.fa-lock:before {content: "\f023";}
.fa-flag:before {content: "\f024";}
.fa-headphones:before {content: "\f025";}
.fa-volume-off:before {content: "\f026";}
.fa-volume-down:before {content: "\f027";}
.fa-volume-up:before {content: "\f028";}
.fa-qrcode:before {content: "\f029";}
.fa-barcode:before {content: "\f02a";}
.fa-tag:before {content: "\f02b";}
.fa-tags:before {content: "\f02c";}
.fa-book:before {content: "\f02d";}
.fa-bookmark:before {content: "\f02e";}
.fa-print:before {content: "\f02f";}
.fa-camera:before {content: "\f030";}
.fa-font:before {content: "\f031";}
.fa-bold:before {content: "\f032";}
.fa-italic:before {content: "\f033";}
.fa-text-height:before {content: "\f034";}
.fa-text-width:before {content: "\f035";}
.fa-align-left:before {content: "\f036";}
.fa-align-center:before {content: "\f037";}
.fa-align-right:before {content: "\f038";}
.fa-align-justify:before {content: "\f039";}
.fa-list:before {content: "\f03a";}
.fa-dedent:before,
.fa-outdent:before {content: "\f03b";}
.fa-indent:before {content: "\f03c";}
.fa-video-camera:before {content: "\f03d";}
.fa-photo:before,
.fa-image:before,
.fa-picture-o:before {content: "\f03e";}
.fa-pencil:before {content: "\f040";}
.fa-map-marker:before {content: "\f041";}
.fa-adjust:before {content: "\f042";}
.fa-tint:before {content: "\f043";}
.fa-edit:before,
.fa-pencil-square-o:before {content: "\f044";}
.fa-share-square-o:before {content: "\f045";}
.fa-check-square-o:before {content: "\f046";}
.fa-arrows:before {content: "\f047";}
.fa-step-backward:before {content: "\f048";}
.fa-fast-backward:before {content: "\f049";}
.fa-backward:before {content: "\f04a";}
.fa-play:before {content: "\f04b";}
.fa-pause:before {content: "\f04c";}
.fa-stop:before {content: "\f04d";}
.fa-forward:before {content: "\f04e";}
.fa-fast-forward:before {content: "\f050";}
.fa-step-forward:before {content: "\f051";}
.fa-eject:before {content: "\f052";}
.fa-chevron-left:before {content: "\f053";}
.fa-chevron-right:before {content: "\f054";}
.fa-plus-circle:before {content: "\f055";}
.fa-minus-circle:before {content: "\f056";}
.fa-times-circle:before {content: "\f057";}
.fa-check-circle:before {content: "\f058";}
.fa-question-circle:before {content: "\f059";}
.fa-info-circle:before {content: "\f05a";}
.fa-crosshairs:before {content: "\f05b";}
.fa-times-circle-o:before {content: "\f05c";}
.fa-check-circle-o:before {content: "\f05d";}
.fa-ban:before {content: "\f05e";}
.fa-arrow-left:before {content: "\f060";}
.fa-arrow-right:before {content: "\f061";}
.fa-arrow-up:before {content: "\f062";}
.fa-arrow-down:before {content: "\f063";}
.fa-mail-forward:before,
.fa-share:before {content: "\f064";}
.fa-expand:before {content: "\f065";}
.fa-compress:before {content: "\f066";}
.fa-plus:before {content: "\f067";}
.fa-minus:before {content: "\f068";}
.fa-asterisk:before {content: "\f069";}
.fa-exclamation-circle:before {content: "\f06a";}
.fa-gift:before {content: "\f06b";}
.fa-leaf:before {content: "\f06c";}
.fa-fire:before {content: "\f06d";}
.fa-eye:before {content: "\f06e";}
.fa-eye-slash:before {content: "\f070";}
.fa-warning:before,
.fa-exclamation-triangle:before {content: "\f071";}
.fa-plane:before {content: "\f072";}
.fa-calendar:before {content: "\f073";}
.fa-random:before {content: "\f074";}
.fa-comment:before {content: "\f075";}
.fa-magnet:before {content: "\f076";}
.fa-chevron-up:before {content: "\f077";}
.fa-chevron-down:before {content: "\f078";}
.fa-retweet:before {content: "\f079";}
.fa-shopping-cart:before {content: "\f07a";}
.fa-folder:before {content: "\f07b";}
.fa-folder-open:before {content: "\f07c";}
.fa-arrows-v:before {content: "\f07d";}
.fa-arrows-h:before {content: "\f07e";}
.fa-bar-chart-o:before,
.fa-bar-chart:before {content: "\f080";}
.fa-twitter-square:before {content: "\f081";}
.fa-facebook-square:before {content: "\f082";}
.fa-camera-retro:before {content: "\f083";}
.fa-key:before {content: "\f084";}
.fa-gears:before,
.fa-cogs:before {content: "\f085";}
.fa-comments:before {content: "\f086";}
.fa-thumbs-o-up:before {content: "\f087";}
.fa-thumbs-o-down:before {content: "\f088";}
.fa-star-half:before {content: "\f089";}
.fa-heart-o:before {content: "\f08a";}
.fa-sign-out:before {content: "\f08b";}
.fa-linkedin-square:before {content: "\f08c";}
.fa-thumb-tack:before {content: "\f08d";}
.fa-external-link:before {content: "\f08e";}
.fa-sign-in:before {content: "\f090";}
.fa-trophy:before {content: "\f091";}
.fa-github-square:before {content: "\f092";}
.fa-upload:before {content: "\f093";}
.fa-lemon-o:before {content: "\f094";}
.fa-phone:before {content: "\f095";}
.fa-square-o:before {content: "\f096";}
.fa-bookmark-o:before {content: "\f097";}
.fa-phone-square:before {content: "\f098";}
.fa-twitter:before {content: "\f099";}
.fa-facebook-f:before,
.fa-facebook:before {content: "\f09a";}
.fa-github:before {content: "\f09b";}
.fa-unlock:before {content: "\f09c";}
.fa-credit-card:before {content: "\f09d";}
.fa-rss:before {content: "\f09e";}
.fa-hdd-o:before {content: "\f0a0";}
.fa-bullhorn:before {content: "\f0a1";}
.fa-bell:before {content: "\f0f3";}
.fa-certificate:before {content: "\f0a3";}
.fa-hand-o-right:before {content: "\f0a4";}
.fa-hand-o-left:before {content: "\f0a5";}
.fa-hand-o-up:before {content: "\f0a6";}
.fa-hand-o-down:before {content: "\f0a7";}
.fa-arrow-circle-left:before {content: "\f0a8";}
.fa-arrow-circle-right:before {content: "\f0a9";}
.fa-arrow-circle-up:before {content: "\f0aa";}
.fa-arrow-circle-down:before {content: "\f0ab";}
.fa-globe:before {content: "\f0ac";}
.fa-wrench:before {content: "\f0ad";}
.fa-tasks:before {content: "\f0ae";}
.fa-filter:before {content: "\f0b0";}
.fa-briefcase:before {content: "\f0b1";}
.fa-arrows-alt:before {content: "\f0b2";}
.fa-group:before,
.fa-users:before {content: "\f0c0";}
.fa-chain:before,
.fa-link:before {content: "\f0c1";}
.fa-cloud:before {content: "\f0c2";}
.fa-flask:before {content: "\f0c3";}
.fa-cut:before,
.fa-scissors:before {content: "\f0c4";}
.fa-copy:before,
.fa-files-o:before {content: "\f0c5";}
.fa-paperclip:before {content: "\f0c6";}
.fa-save:before,
.fa-floppy-o:before {content: "\f0c7";}
.fa-square:before {content: "\f0c8";}
.fa-navicon:before,
.fa-reorder:before,
.fa-bars:before {content: "\f0c9";}
.fa-list-ul:before {content: "\f0ca";}
.fa-list-ol:before {content: "\f0cb";}
.fa-strikethrough:before {content: "\f0cc";}
.fa-underline:before {content: "\f0cd";}
.fa-table:before {content: "\f0ce";}
.fa-magic:before {content: "\f0d0";}
.fa-truck:before {content: "\f0d1";}
.fa-pinterest:before {content: "\f0d2";}
.fa-pinterest-square:before {content: "\f0d3";}
.fa-google-plus-square:before {content: "\f0d4";}
.fa-google-plus:before {content: "\f0d5";}
.fa-money:before {content: "\f0d6";}
.fa-caret-down:before {content: "\f0d7";}
.fa-caret-up:before {content: "\f0d8";}
.fa-caret-left:before {content: "\f0d9";}
.fa-caret-right:before {content: "\f0da";}
.fa-columns:before {content: "\f0db";}
.fa-unsorted:before,
.fa-sort:before {content: "\f0dc";}
.fa-sort-down:before,
.fa-sort-desc:before {content: "\f0dd";}
.fa-sort-up:before,
.fa-sort-asc:before {content: "\f0de";}
.fa-envelope:before {content: "\f0e0";}
.fa-linkedin:before {content: "\f0e1";}
.fa-rotate-left:before,
.fa-undo:before {content: "\f0e2";}
.fa-legal:before,
.fa-gavel:before {content: "\f0e3";}
.fa-dashboard:before,
.fa-tachometer:before {content: "\f0e4";}
.fa-comment-o:before {content: "\f0e5";}
.fa-comments-o:before {content: "\f0e6";}
.fa-flash:before,
.fa-bolt:before {content: "\f0e7";}
.fa-sitemap:before {content: "\f0e8";}
.fa-umbrella:before {content: "\f0e9";}
.fa-paste:before,
.fa-clipboard:before {content: "\f0ea";}
.fa-lightbulb-o:before {content: "\f0eb";}
.fa-exchange:before {content: "\f0ec";}
.fa-cloud-download:before {content: "\f0ed";}
.fa-cloud-upload:before {content: "\f0ee";}
.fa-user-md:before {content: "\f0f0";}
.fa-stethoscope:before {content: "\f0f1";}
.fa-suitcase:before {content: "\f0f2";}
.fa-bell-o:before {content: "\f0a2";}
.fa-coffee:before {content: "\f0f4";}
.fa-cutlery:before {content: "\f0f5";}
.fa-file-text-o:before {content: "\f0f6";}
.fa-building-o:before {content: "\f0f7";}
.fa-hospital-o:before {content: "\f0f8";}
.fa-ambulance:before {content: "\f0f9";}
.fa-medkit:before {content: "\f0fa";}
.fa-fighter-jet:before {content: "\f0fb";}
.fa-beer:before {content: "\f0fc";}
.fa-h-square:before {content: "\f0fd";}
.fa-plus-square:before {content: "\f0fe";}
.fa-angle-double-left:before {content: "\f100";}
.fa-angle-double-right:before {content: "\f101";}
.fa-angle-double-up:before {content: "\f102";}
.fa-angle-double-down:before {content: "\f103";}
.fa-angle-left:before {content: "\f104";}
.fa-angle-right:before {content: "\f105";}
.fa-angle-up:before {content: "\f106";}
.fa-angle-down:before {content: "\f107";}
.fa-desktop:before {content: "\f108";}
.fa-laptop:before {content: "\f109";}
.fa-tablet:before {content: "\f10a";}
.fa-mobile-phone:before,
.fa-mobile:before {content: "\f10b";}
.fa-circle-o:before {content: "\f10c";}
.fa-quote-left:before {content: "\f10d";}
.fa-quote-right:before {content: "\f10e";}
.fa-spinner:before {content: "\f110";}
.fa-circle:before {content: "\f111";}
.fa-mail-reply:before,
.fa-reply:before {content: "\f112";}
.fa-github-alt:before {content: "\f113";}
.fa-folder-o:before {content: "\f114";}
.fa-folder-open-o:before {content: "\f115";}
.fa-smile-o:before {content: "\f118";}
.fa-frown-o:before {content: "\f119";}
.fa-meh-o:before {content: "\f11a";}
.fa-gamepad:before {content: "\f11b";}
.fa-keyboard-o:before {content: "\f11c";}
.fa-flag-o:before {content: "\f11d";}
.fa-flag-checkered:before {content: "\f11e";}
.fa-terminal:before {content: "\f120";}
.fa-code:before {content: "\f121";}
.fa-mail-reply-all:before,
.fa-reply-all:before {content: "\f122";}
.fa-star-half-empty:before,
.fa-star-half-full:before,
.fa-star-half-o:before {content: "\f123";}
.fa-location-arrow:before {content: "\f124";}
.fa-crop:before {content: "\f125";}
.fa-code-fork:before {content: "\f126";}
.fa-unlink:before,
.fa-chain-broken:before {content: "\f127";}
.fa-question:before {content: "\f128";}
.fa-info:before {content: "\f129";}
.fa-exclamation:before {content: "\f12a";}
.fa-superscript:before {content: "\f12b";}
.fa-subscript:before {content: "\f12c";}
.fa-eraser:before {content: "\f12d";}
.fa-puzzle-piece:before {content: "\f12e";}
.fa-microphone:before {content: "\f130";}
.fa-microphone-slash:before {content: "\f131";}
.fa-shield:before {content: "\f132";}
.fa-calendar-o:before {content: "\f133";}
.fa-fire-extinguisher:before {content: "\f134";}
.fa-rocket:before {content: "\f135";}
.fa-maxcdn:before {content: "\f136";}
.fa-chevron-circle-left:before {content: "\f137";}
.fa-chevron-circle-right:before {content: "\f138";}
.fa-chevron-circle-up:before {content: "\f139";}
.fa-chevron-circle-down:before {content: "\f13a";}
.fa-html5:before {content: "\f13b";}
.fa-css3:before {content: "\f13c";}
.fa-anchor:before {content: "\f13d";}
.fa-unlock-alt:before {content: "\f13e";}
.fa-bullseye:before {content: "\f140";}
.fa-ellipsis-h:before {content: "\f141";}
.fa-ellipsis-v:before {content: "\f142";}
.fa-rss-square:before {content: "\f143";}
.fa-play-circle:before {content: "\f144";}
.fa-ticket:before {content: "\f145";}
.fa-minus-square:before {content: "\f146";}
.fa-minus-square-o:before {content: "\f147";}
.fa-level-up:before {content: "\f148";}
.fa-level-down:before {content: "\f149";}
.fa-check-square:before {content: "\f14a";}
.fa-pencil-square:before {content: "\f14b";}
.fa-external-link-square:before {content: "\f14c";}
.fa-share-square:before {content: "\f14d";}
.fa-compass:before {content: "\f14e";}
.fa-toggle-down:before,
.fa-caret-square-o-down:before {content: "\f150";}
.fa-toggle-up:before,
.fa-caret-square-o-up:before {content: "\f151";}
.fa-toggle-right:before,
.fa-caret-square-o-right:before {content: "\f152";}
.fa-euro:before,
.fa-eur:before {content: "\f153";}
.fa-gbp:before {content: "\f154";}
.fa-dollar:before,
.fa-usd:before {content: "\f155";}
.fa-rupee:before,
.fa-inr:before {content: "\f156";}
.fa-cny:before,
.fa-rmb:before,
.fa-yen:before,
.fa-jpy:before {content: "\f157";}
.fa-ruble:before,
.fa-rouble:before,
.fa-rub:before {content: "\f158";}
.fa-won:before,
.fa-krw:before {content: "\f159";}
.fa-bitcoin:before,
.fa-btc:before {content: "\f15a";}
.fa-file:before {content: "\f15b";}
.fa-file-text:before {content: "\f15c";}
.fa-sort-alpha-asc:before {content: "\f15d";}
.fa-sort-alpha-desc:before {content: "\f15e";}
.fa-sort-amount-asc:before {content: "\f160";}
.fa-sort-amount-desc:before {content: "\f161";}
.fa-sort-numeric-asc:before {content: "\f162";}
.fa-sort-numeric-desc:before {content: "\f163";}
.fa-thumbs-up:before {content: "\f164";}
.fa-thumbs-down:before {content: "\f165";}
.fa-youtube-square:before {content: "\f166";}
.fa-youtube:before {content: "\f167";}
.fa-xing:before {content: "\f168";}
.fa-xing-square:before {content: "\f169";}
.fa-youtube-play:before {content: "\f16a";}
.fa-dropbox:before {content: "\f16b";}
.fa-stack-overflow:before {content: "\f16c";}
.fa-instagram:before {content: "\f16d";}
.fa-flickr:before {content: "\f16e";}
.fa-adn:before {content: "\f170";}
.fa-bitbucket:before {content: "\f171";}
.fa-bitbucket-square:before {content: "\f172";}
.fa-tumblr:before {content: "\f173";}
.fa-tumblr-square:before {content: "\f174";}
.fa-long-arrow-down:before {content: "\f175";}
.fa-long-arrow-up:before {content: "\f176";}
.fa-long-arrow-left:before {content: "\f177";}
.fa-long-arrow-right:before {content: "\f178";}
.fa-apple:before {content: "\f179";}
.fa-windows:before {content: "\f17a";}
.fa-android:before {content: "\f17b";}
.fa-linux:before {content: "\f17c";}
.fa-dribbble:before {content: "\f17d";}
.fa-skype:before {content: "\f17e";}
.fa-foursquare:before {content: "\f180";}
.fa-trello:before {content: "\f181";}
.fa-female:before {content: "\f182";}
.fa-male:before {content: "\f183";}
.fa-gittip:before,
.fa-gratipay:before {content: "\f184";}
.fa-sun-o:before {content: "\f185";}
.fa-moon-o:before {content: "\f186";}
.fa-archive:before {content: "\f187";}
.fa-bug:before {content: "\f188";}
.fa-vk:before {content: "\f189";}
.fa-weibo:before {content: "\f18a";}
.fa-renren:before {content: "\f18b";}
.fa-pagelines:before {content: "\f18c";}
.fa-stack-exchange:before {content: "\f18d";}
.fa-arrow-circle-o-right:before {content: "\f18e";}
.fa-arrow-circle-o-left:before {content: "\f190";}
.fa-toggle-left:before,
.fa-caret-square-o-left:before {content: "\f191";}
.fa-dot-circle-o:before {content: "\f192";}
.fa-wheelchair:before {content: "\f193";}
.fa-vimeo-square:before {content: "\f194";}
.fa-turkish-lira:before,
.fa-try:before {content: "\f195";}
.fa-plus-square-o:before {content: "\f196";}
.fa-space-shuttle:before {content: "\f197";}
.fa-slack:before {content: "\f198";}
.fa-envelope-square:before {content: "\f199";}
.fa-wordpress:before {content: "\f19a";}
.fa-openid:before {content: "\f19b";}
.fa-institution:before,
.fa-bank:before,
.fa-university:before {content: "\f19c";}
.fa-mortar-board:before,
.fa-graduation-cap:before {content: "\f19d";}
.fa-yahoo:before {content: "\f19e";}
.fa-google:before {content: "\f1a0";}
.fa-reddit:before {content: "\f1a1";}
.fa-reddit-square:before {content: "\f1a2";}
.fa-stumbleupon-circle:before {content: "\f1a3";}
.fa-stumbleupon:before {content: "\f1a4";}
.fa-delicious:before {content: "\f1a5";}
.fa-digg:before {content: "\f1a6";}
.fa-pied-piper:before {content: "\f1a7";}
.fa-pied-piper-alt:before {content: "\f1a8";}
.fa-drupal:before {content: "\f1a9";}
.fa-joomla:before {content: "\f1aa";}
.fa-language:before {content: "\f1ab";}
.fa-fax:before {content: "\f1ac";}
.fa-building:before {content: "\f1ad";}
.fa-child:before {content: "\f1ae";}
.fa-paw:before {content: "\f1b0";}
.fa-spoon:before {content: "\f1b1";}
.fa-cube:before {content: "\f1b2";}
.fa-cubes:before {content: "\f1b3";}
.fa-behance:before {content: "\f1b4";}
.fa-behance-square:before {content: "\f1b5";}
.fa-steam:before {content: "\f1b6";}
.fa-steam-square:before {content: "\f1b7";}
.fa-recycle:before {content: "\f1b8";}
.fa-automobile:before,
.fa-car:before {content: "\f1b9";}
.fa-cab:before,
.fa-taxi:before {content: "\f1ba";}
.fa-tree:before {content: "\f1bb";}
.fa-spotify:before {content: "\f1bc";}
.fa-deviantart:before {content: "\f1bd";}
.fa-soundcloud:before {content: "\f1be";}
.fa-database:before {content: "\f1c0";}
.fa-file-pdf-o:before {content: "\f1c1";}
.fa-file-word-o:before {content: "\f1c2";}
.fa-file-excel-o:before {content: "\f1c3";}
.fa-file-powerpoint-o:before {content: "\f1c4";}
.fa-file-photo-o:before,
.fa-file-picture-o:before,
.fa-file-image-o:before {content: "\f1c5";}
.fa-file-zip-o:before,
.fa-file-archive-o:before {content: "\f1c6";}
.fa-file-sound-o:before,
.fa-file-audio-o:before {content: "\f1c7";}
.fa-file-movie-o:before,
.fa-file-video-o:before {content: "\f1c8";}
.fa-file-code-o:before {content: "\f1c9";}
.fa-vine:before {content: "\f1ca";}
.fa-codepen:before {content: "\f1cb";}
.fa-jsfiddle:before {content: "\f1cc";}
.fa-life-bouy:before,
.fa-life-buoy:before,
.fa-life-saver:before,
.fa-support:before,
.fa-life-ring:before {content: "\f1cd";}
.fa-circle-o-notch:before {content: "\f1ce";}
.fa-ra:before,
.fa-rebel:before {content: "\f1d0";}
.fa-ge:before,
.fa-empire:before {content: "\f1d1";}
.fa-git-square:before {content: "\f1d2";}
.fa-git:before {content: "\f1d3";}
.fa-hacker-news:before {content: "\f1d4";}
.fa-tencent-weibo:before {content: "\f1d5";}
.fa-qq:before {content: "\f1d6";}
.fa-wechat:before,
.fa-weixin:before {content: "\f1d7";}
.fa-send:before,
.fa-paper-plane:before {content: "\f1d8";}
.fa-send-o:before,
.fa-paper-plane-o:before {content: "\f1d9";}
.fa-history:before {content: "\f1da";}
.fa-genderless:before,
.fa-circle-thin:before {content: "\f1db";}
.fa-header:before {content: "\f1dc";}
.fa-paragraph:before {content: "\f1dd";}
.fa-sliders:before {content: "\f1de";}
.fa-share-alt:before {content: "\f1e0";}
.fa-share-alt-square:before {content: "\f1e1";}
.fa-bomb:before {content: "\f1e2";}
.fa-soccer-ball-o:before,
.fa-futbol-o:before {content: "\f1e3";}
.fa-tty:before {content: "\f1e4";}
.fa-binoculars:before {content: "\f1e5";}
.fa-plug:before {content: "\f1e6";}
.fa-slideshare:before {content: "\f1e7";}
.fa-twitch:before {content: "\f1e8";}
.fa-yelp:before {content: "\f1e9";}
.fa-newspaper-o:before {content: "\f1ea";}
.fa-wifi:before {content: "\f1eb";}
.fa-calculator:before {content: "\f1ec";}
.fa-paypal:before {content: "\f1ed";}
.fa-google-wallet:before {content: "\f1ee";}
.fa-cc-visa:before {content: "\f1f0";}
.fa-cc-mastercard:before {content: "\f1f1";}
.fa-cc-discover:before {content: "\f1f2";}
.fa-cc-amex:before {content: "\f1f3";}
.fa-cc-paypal:before {content: "\f1f4";}
.fa-cc-stripe:before {content: "\f1f5";}
.fa-bell-slash:before {content: "\f1f6";}
.fa-bell-slash-o:before {content: "\f1f7";}
.fa-trash:before {content: "\f1f8";}
.fa-copyright:before {content: "\f1f9";}
.fa-at:before {content: "\f1fa";}
.fa-eyedropper:before {content: "\f1fb";}
.fa-paint-brush:before {content: "\f1fc";}
.fa-birthday-cake:before {content: "\f1fd";}
.fa-area-chart:before {content: "\f1fe";}
.fa-pie-chart:before {content: "\f200";}
.fa-line-chart:before {content: "\f201";}
.fa-lastfm:before {content: "\f202";}
.fa-lastfm-square:before {content: "\f203";}
.fa-toggle-off:before {content: "\f204";}
.fa-toggle-on:before {content: "\f205";}
.fa-bicycle:before {content: "\f206";}
.fa-bus:before {content: "\f207";}
.fa-ioxhost:before {content: "\f208";}
.fa-angellist:before {content: "\f209";}
.fa-cc:before {content: "\f20a";}
.fa-shekel:before,
.fa-sheqel:before,
.fa-ils:before {content: "\f20b";}
.fa-meanpath:before {content: "\f20c";}
.fa-buysellads:before {content: "\f20d";}
.fa-connectdevelop:before {content: "\f20e";}
.fa-dashcube:before {content: "\f210";}
.fa-forumbee:before {content: "\f211";}
.fa-leanpub:before {content: "\f212";}
.fa-sellsy:before {content: "\f213";}
.fa-shirtsinbulk:before {content: "\f214";}
.fa-simplybuilt:before {content: "\f215";}
.fa-skyatlas:before {content: "\f216";}
.fa-cart-plus:before {content: "\f217";}
.fa-cart-arrow-down:before {content: "\f218";}
.fa-diamond:before {content: "\f219";}
.fa-ship:before {content: "\f21a";}
.fa-user-secret:before {content: "\f21b";}
.fa-motorcycle:before {content: "\f21c";}
.fa-street-view:before {content: "\f21d";}
.fa-heartbeat:before {content: "\f21e";}
.fa-facebook-official:before {content: "\f230";}
.fa-pinterest-p:before {content: "\f231";}
.fa-whatsapp:before {content: "\f232";}
.fa-server:before {content: "\f233";}
.fa-user-plus:before {content: "\f234";}
.fa-user-times:before {content: "\f235";}
.fa-hotel:before,
.fa-bed:before {content: "\f236";}
.fa-viacoin:before {content: "\f237";}
.fa-train:before {content: "\f238";}
.fa-subway:before {content: "\f239";}
.fa-medium:before {content: "\f23a";}

Bước 2:

Thêm icon vào chuyên mục trên thanh menu

- Ví dụ thanh menu của bạn có dạng:
<li><a class='active' href='http://vietbg.blogspot.com'>Trang chủ</a></li>
- Để thêm icon vào trước chữ "Trang chủ" các bạn thêm thẻ <i class='fa fa-home'/>  vào trước chữ "Trang chủ". Đoạn code trên sẽ trở thành:
<li><a class='active' href='http://vietbg.blogspot.com'><i class='fa fa-home'/> Trang chủ</a></li>

Lưu ý: fa-home ở đây bạn có thể thay bằng icon khác, các bạn vào ĐÂY và kéo xuống dưới để tìm các code ưng ý.

Và đây là kết quả: