Home > HTML > หัดเขียน html เบื้องต้น

หัดเขียน html เบื้องต้น

April 3, 2010 No Comments    

หัดเขียน html เบื้องต้น

ภาษา html เป็นภาษาพื้นฐานในการสร้างเว็บไซด์ ซึ่งในการเขียนภาษา html นั้นมีหลักสำคัญอยู่ในการเขียนก็คือ ภาษา html แบ่งออกเป็น head และ body ซึ่งจะต้องอยู่ใน tag <html></html> เอาเป็นว่าไปดูตัวอย่างเพื่อความ


<html>

<head>

<title>My First Home Page</title>

</head>

<body>

My Fist Home Page

<br/>

ThaiCoding.net

</body>

</html>

ภาษา html, หัดเขียน html, หัดทำเว็บ, html

หลังจากเขียนโค้ดก็ save เป็นไฟล์ html แล้วลองเปิดดูกับ browser จะเห็นว่าส่วน title bar จะเป็นคำว่า My Fist Home Page ซึ่งในส่วนนี้ถูกกำหนดโดย <title>My First Home Page</title> และมันจะต้องอยู่ภายใน <head></head> อีกด้วย ต่อมาคือส่วนที่อยู่ใน page จะต้องอยู่ภายใน <body></body> ส่วนคำสั่งในการขึ้นบรรทัดใหม่คือ <br/> และจากคำสั่งทั้งหมดจะสังเกตเห็นว่า ภาษา html ส่วนใหญ่จะต้องมี tag เปิดและปิด เข่น <body> ก็ต้องปิดด้วย </body> เป็นต้นแล้วทั้งหมดต้องอยูใน tag ใหญ่คือ <html></html>

Dowload SourceCode

Tags: , , ,

Comments : หัดเขียน html เบื้องต้น

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>