วันพุธที่ 11 มกราคม พ.ศ. 2560

ฝึกเขียน HTML


หน้าเว็บจะใช้เป็น Table 2x2

การใช้ Table

<table border="1"> # สร้าง table ขึ้นมา และ กำหนดความหนาของเส้นตารางเป็น 1
   <tr>                      # สร้างแถว
   <td> col 1 </td>  # เริ่มและจบ column โดยมีเนื้อหาข้างในคือ col1
   <td> col 2 </td>
   </tr>                    # จบแถว
<tr>
   <td> col 1 </td>
   <td> col 2 </td>
   </tr>
</table>

ผลลัพธ์ที่ได้

col 1 col 2
col 1 col 2

กำหนดสีในช่อง ?


<table border="1">

<tr>

   <td style="color: blue;">col 1 </td> # กำหนดสีตัวหนังสือในช่อง

   <td style="background-color: blue;">col 2 </td> # กำหนดสีพื้นหลังในช่อง

   </tr>
<tr>
   <td style="background-color: blue; color: white;">col 1 </td> # ใช้สองอันรวมกัน
   <td>col 2 </td>
   </tr>
</table>

ผลลัพธ์ที่ได้

col 1 col 2
col 1 col 2

การใส่รูปภาพ

<img src="ชื่อไฟล์ภาพ.jpg">

reference

http://www.w3schools.com/html/

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

commit เพิ่มเติม : เพื่ม userstory, bookmark

>>  add userstory ทำการเพิ่ม userstory ใน functional tests >>  add bookmark for user เพิ่มระบบ Bookmark โดยการสร้าง model ขึ...