html·¿ªÖÐÎÄÂÒÂëÔõô½â¾ö
html ÖÐÎÄÂÒÂëµÄÔµ¹ÊÔÓÉÊDZàÂ벻ƥÅ䣬½â¾öÒªÁìÓУº1. ¼ì²é²¢Ö¸¶¨×¼È·µÄÖÐÎıàÂ룻2. µ÷½âä¯ÀÀÆ÷±àÂëÒÔÆ¥Åä html Îļþ£»3. µ÷½â²Ù×÷ϵͳ±àÂëÉèÖã»4. ת»» html ÎļþµÄ±àÂ룻5. ʹÓÃ×Ö·ûʵÌåÏÔʾÌØÊâ×Ö·û¡£
HTML ·¿ªÖÐÎÄÂÒÂëµÄ½â¾ö¼Æ»®
ÂÒÂëµÄÔµ¹ÊÔÓÉ
µ± HTML ÎļþÖеÄÖÐÎıàÂëÓëä¯ÀÀÆ÷»ò²Ù×÷ϵͳ²»Æ¥Åäʱ£¬¾Í»á·ºÆðÖÐÎÄÂÒÂë¡£³£¼ûµÄÔµ¹ÊÔÓÉ°üÀ¨£º
±àÂ벻׼ȷ£ºHTML Îļþδ׼ȷָ¶¨ÖÐÎıàÂ룬Èç UTF-8 »ò GBK¡£
ä¯ÀÀÆ÷²»Ö§³Ö±àÂ룺ä¯ÀÀÆ÷²»Ö§³Ö HTML ÎļþÖÐÖ¸¶¨µÄ±àÂ룬ÎÞ·¨×¼È·ÏÔʾÖÐÎÄ¡£
²Ù×÷ϵͳ²»Ö§³Ö±àÂ룺²Ù×÷ϵͳ²»Ö§³Ö HTML ÎļþÖÐÖ¸¶¨µÄ±àÂ룬µ¼ÖÂÏÔʾÂÒÂë¡£
½â¾öÒªÁì
Á¬Ã¦Ñ§Ï°¡°Ç°¶ËÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»
1. ¼ì²é±àÂë
È·±£ HTML ÎļþÖÐÖ¸¶¨ÁË׼ȷµÄÖÐÎıàÂë¡£ÔÚ HTML Í·²¿
±êÇ©ÖУ¬Ìí¼ÓÒÔÏ´úÂ룺
<meta charset="UTF-8">
µÇ¼ºó¸´ÖÆ
»òÕß
<meta charset="GBK">
µÇ¼ºó¸´ÖÆ
ƾ֤ÏÖÕæÏàÐÎÑ¡Ôñ UTF-8 »ò GBK ±àÂë¡£
2. µ÷½âä¯ÀÀÆ÷±àÂë
ÈôÊÇä¯ÀÀÆ÷²»Ö§³Ö HTML ÎļþÖÐÖ¸¶¨µÄ±àÂ룬¿ÉÒÔÊÖ¶¯µ÷½âä¯ÀÀÆ÷µÄ±àÂë¡£ÔÚä¯ÀÀÆ÷²Ëµ¥ÖУ¬ÕÒµ½ “±àÂë” »ò “×Ö·û¼¯” Ñ¡ÏȻºóÑ¡ÔñÓë HTML ÎļþÖÐÏàͬµÄ±àÂë¡£
3. µ÷½â²Ù×÷ϵͳ±àÂë
ÈôÊDzÙ×÷ϵͳ²»Ö§³Ö HTML ÎļþÖÐÖ¸¶¨µÄ±àÂ룬¿ÉÒÔµ÷½â²Ù×÷ϵͳµÄ±àÂëÉèÖá£ÔÚ Windows ϵͳÖУ¬¿ÉÒÔ·¿ª “¿ØÖÆÃæ°å” > “ʱÖÓºÍÇøÓò” > “ÇøÓò” > “ÖÎÀ픣¬È»ºóÉèÖÃ׼ȷµÄÓïÑԺͱàÂë¡£ÔÚ macOS ϵͳÖУ¬¿ÉÒÔ·¿ª “ϵͳƫºÃÉèÖÔ > “ÓïÑԺ͵ØÇø”£¬È»ºóÑ¡Ôñ׼ȷµÄ±àÂë¡£
4. ת»»±àÂë
ÈôÊÇÎÞ·¨µ÷½â HTML ÎļþÖеıàÂë»òä¯ÀÀÆ÷/²Ù×÷ϵͳ²»Ö§³ÖµÄ±àÂ룬¿ÉÒÔ˼Á¿½« HTML Îļþת»»ÎªÖ§³ÖµÄ±àÂë¡£¿ÉÒÔʹÓÃÎı¾±à¼Æ÷»òÔÚÏß¹¤¾ß¾ÙÐÐת»»¡£
5. ʹÓÃ×Ö·ûʵÌå
¹ØÓÚÎÞ·¨×ª»»»òÏÔʾµÄÌØÊâ×Ö·û£¬¿ÉÒÔʹÓÃ×Ö·ûʵÌå¾ÙÐÐÏÔʾ¡£×Ö·ûʵÌåÊÇÒ»ÖÖÓÃÊý×ÖÌåÏÖÌØÊâ×Ö·ûµÄ·½·¨¡£ÀýÈ磬ÖÐÎÄ “µÄ” ×Ö¿ÉÒÔÌåÏÖΪ Äã¡£
ÒÔÉϾÍÊÇhtml·¿ªÖÐÎÄÂÒÂëÔõô½â¾öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡