SlideShare a Scribd company logo
1 of 15
www.RongRean.com หลักสูตร สร้างเว็บด้วย  HTML: Session  ที่  4  ตอนที่  1
Contents www.rongrean.com Orjix รู้จักกับภาพกราฟฟิกชนิดต่างๆ 1 แสดงภาพบนเว็บ  <img> 2 การใส่ข้อความกำกับภาพ 3 ปรับขนาดรูปภาพ 4 การใส่กรอบให้รูปภาพ 5 การจัดตำแหน่งรูปภาพ 6 เพิ่มระยะระหว่างรูปกับข้อความ 7
Contents www.rongrean.com Orjix การทิ้งระยะระหว่างข้อความให้พ้นขอบเขตรูป   <br> 8 แสดงภาพเป็นฉากหลัง  <body> 9 แสดงภาพฉากหลังอยู่กับที่ 10
รู้จักกับภาพกราฟิกชนิดต่างๆ ,[object Object],www.rongrean.com Orjix ภาพชนิด  GIF คิดค้นโดยบริษัท  Compuserve  แสดงรูปบนเครื่องที่แตกต่างกันได้ โดยสามารถแสดงสีได้  256  สี ภาพรูปแบบนี้จะ ใช้การบีบอัดไฟล์เพื่อลดพื้นที่ในการเก็บ ข้อมูล จะใช้ได้ผลดีกับกราฟิกที่มีสีสม่ำเสมอกัน เช่นภาพการตูน  หรือโลโก้ที่มีการใช้สีไม่มากนัก ภาพชนิด  JPEG พัฒนาโดย  Joint Photographic Experts Group  เป็น กราฟิกที่สามารถทำงานกับเครื่องต่างแบบต่างรุ่นได้เช่นกัน สามารถแสดงสีได้สูงสุด  16.7 ล้านสี แต่อาจทำให้สูญเสียรายละเอียดไปบ้างจากการบีบอัดข้อมูลเพื่อลดขนาดภาพ ภาพ  JPEG  เหมาะสำหรับแสดงภาพที่มีสีสันมาก และต้องการประหยัดเนื้อที่ในการ เก็บ ภาพ แบบ GIF ภาพ แบบ jpeg
แสดงภาพบนเว็บ  <img> ,[object Object],www.rongrean.com Orjix <body> <img src=&quot;band.jpg&quot;/> <img src=&quot;847000.gif&quot;/> </body> ภาพแบบ  jpeg ภาพแบบ   gif * สังเกตว่าการแสดงเฉดสีของภาพรูปแบบ  jpeg  จะมีสีสันมากกว่าภาพรูปแบบ   gif
การใส่ข้อความกำกับภาพ ,[object Object],www.rongrean.com Orjix <body> <img  alt=&quot;band&quot;  src=&quot;band.jpg&quot;/> <img  alt=&quot;847000&quot;  src=&quot;847000.gif&quot;/> </body> * สาเหตุที่แสดงภาพไม่ได้อาจเป็นเพราะเกิดข้อผิดพลาดในการเชื่อมโยง เช่น ภาพเสียหาย ถูกลบ หรือว่าย้าย   directory  ไป ในกรณีนี้ หากไม่มีข้อความกำกับภาพไว้ ผู้ใช้จะไม่มีทางรู้ได้เลยว่าภาพนั้นเป็น ภาพอะไร * ประโยชน์อีกอย่างของข้อความกำกับภาพคือ ในบางบราวเซอร์ถ้าเรานำเม้าส์ไปวางไว้บนรูปภาพก็จะแสดง ข้อความกำกับภาพขึ้นมาให้เห็นด้วย
ปรับขนาดรูปภาพ ,[object Object],www.rongrean.com Orjix <body> <img src=&quot;band.jpg&quot;/> <img src=&quot;band.jpg&quot;  width=&quot;300px&quot; height=&quot;200px&quot; /> </body> ภาพขนาดปรกติ ภาพขนาด  width=“300px” height=“200px”
การใส่กรอบให้รูปภาพ ,[object Object],[object Object],www.rongrean.com Orjix <body> <img src=&quot;band.jpg&quot;/> <img src=&quot;band.jpg&quot;  border=&quot;5px&quot; /> </body> Border=“5px” Border=“none”
การจัดตำแหน่งรูปภาพ ,[object Object],www.rongrean.com Orjix <table border=&quot;1px&quot; width=&quot;100%&quot; height=&quot;100%&quot;> <tr> <td><img src=&quot;band.jpg&quot;  align=&quot;bottom&quot; />bottom</td> <td><img src=&quot;band.jpg&quot;  align=&quot;left&quot; />left</td> <td><img src=&quot;band.jpg&quot;  align=&quot;middle&quot; />middle</td> </tr> <tr> <td><img src=&quot;band.jpg&quot;  align=&quot;right&quot; />right</td> <td><img src=&quot;band.jpg&quot;  align=&quot;top&quot; />top</td> <td></td> </tr> </table> bottom ขอบล่างของภาพเสมอขอบล่างของข้อความ left จัดภาพอยู่ทางซ้าย middle กึ่งกลางของภาพเสมอกึ่งกลางของข้อความ right จัดภาพอยู่ทางขวา top ขอบบนของภาพเสมอขอบบนของข้อความ
การจัดตำแหน่งรูปภาพ ,[object Object],www.rongrean.com Orjix
เพิ่มระยะระหว่างรูปกับข้อความ ,[object Object],www.rongrean.com Orjix <body> <img src=&quot;band.jpg&quot;  vspace=&quot;50px&quot; hspace=&quot;50px&quot;  align=&quot;left&quot; border=&quot;1px&quot;/> rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com  rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com  rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com <br> </body> ภาพดั้งเดิม vspace vspace hspace hspace
การทิ้งระยะระหว่างข้อความให้พ้นขอบเขตรูป   <br> ,[object Object],www.rongrean.com Orjix <body> <img src=&quot;band.jpg&quot; align=&quot;left&quot; border=&quot;1px&quot;/> rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com  rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com <br clear=&quot;left&quot;> rongrean.com rongrean.com rongrean.com rongrean.com rongrean.com </body> ใช้  <br>   ธรรมดา ใช้  <br clear=“left”>
การทิ้งระยะระหว่างข้อความให้พ้นขอบเขตรูป   <br> ,[object Object],www.rongrean.com Orjix all ขึ้นบรรทัดใหม่ในบริเวณที่ด้านซ้ายและขวาไม่มีวัตถุใดขวางอยู่ left ขึ้นบรรทัดใหม่ในบริเวณที่ด้านซ้ายไม่มีวัตถุใดขวางอยู่ right ขึ้นบรรทัดใหม่ในบริเวณที่ด้านขวาไม่มีวัตถุใดขวางอยู่ none ขึ้นบรรทัดใหม่แบบปรกติ เป็นค่า  default  อยู่แล้ว
แสดงภาพเป็นฉากหลัง  <body> ,[object Object],www.rongrean.com Orjix <body  background=&quot;4008482.jpg&quot; > <p>rongrean.com rongrean.com rongrean.com <br> rongrean.com rongrean.com rongrean.com rongrean.com <br> rongrean.com rongrean.com rongrean.com rongrean.com <br> rongrean.com rongrean.com rongrean.com rongrean.com <br></p> </body>
แสดงภาพฉากหลังอยู่กับที่ ,[object Object],<body background=&quot;4008482.jpg&quot; bgproperties=&quot;fixed&quot;> 1<br> 2<br> 3<br> … 30<br> </body> สังเกตว่าเวลาเลื่อนแถบเลื่อน ( scroll bar )  พื้นหลังจะไม่เลื่อนตาม

More Related Content

Viewers also liked

Session1 part1
Session1 part1Session1 part1
Session1 part1
banputer
 
อะไรคือโฮมเพจ
อะไรคือโฮมเพจอะไรคือโฮมเพจ
อะไรคือโฮมเพจ
banputer
 
Session3 part1
Session3 part1Session3 part1
Session3 part1
banputer
 
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
ihc
 
Bilgisayar AğLari Ve YöNetimi Sunum
Bilgisayar AğLari Ve YöNetimi SunumBilgisayar AğLari Ve YöNetimi Sunum
Bilgisayar AğLari Ve YöNetimi Sunum
laika
 

Viewers also liked (7)

Session1 part1
Session1 part1Session1 part1
Session1 part1
 
Introduction draft framework trish grant start strong seminar 14 october (wel...
Introduction draft framework trish grant start strong seminar 14 october (wel...Introduction draft framework trish grant start strong seminar 14 october (wel...
Introduction draft framework trish grant start strong seminar 14 october (wel...
 
part1
 part1 part1
part1
 
อะไรคือโฮมเพจ
อะไรคือโฮมเพจอะไรคือโฮมเพจ
อะไรคือโฮมเพจ
 
Session3 part1
Session3 part1Session3 part1
Session3 part1
 
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
Auckland Area - Child Development Teams - Startstrong – A Children’s Rights S...
 
Bilgisayar AğLari Ve YöNetimi Sunum
Bilgisayar AğLari Ve YöNetimi SunumBilgisayar AğLari Ve YöNetimi Sunum
Bilgisayar AğLari Ve YöNetimi Sunum
 

Similar to Session4 part1 (6)

Session1 part3
Session1 part3Session1 part3
Session1 part3
 
เนื้อหา Html
เนื้อหา Htmlเนื้อหา Html
เนื้อหา Html
 
Session4Part1.pptx
Session4Part1.pptxSession4Part1.pptx
Session4Part1.pptx
 
HTML
HTMLHTML
HTML
 
Web Accessibility Coding
Web Accessibility CodingWeb Accessibility Coding
Web Accessibility Coding
 
Session4 part1
Session4 part1Session4 part1
Session4 part1
 

Session4 part1

  • 2. Contents www.rongrean.com Orjix รู้จักกับภาพกราฟฟิกชนิดต่างๆ 1 แสดงภาพบนเว็บ <img> 2 การใส่ข้อความกำกับภาพ 3 ปรับขนาดรูปภาพ 4 การใส่กรอบให้รูปภาพ 5 การจัดตำแหน่งรูปภาพ 6 เพิ่มระยะระหว่างรูปกับข้อความ 7
  • 3. Contents www.rongrean.com Orjix การทิ้งระยะระหว่างข้อความให้พ้นขอบเขตรูป <br> 8 แสดงภาพเป็นฉากหลัง <body> 9 แสดงภาพฉากหลังอยู่กับที่ 10
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.