web standard

130
มาตรฐานการออกแบบ มาตรฐานการออกแบบ พัฒนาเว็บไซต พัฒนาเว็บไซต

Upload: boonlert-aroonpiboon

Post on 12-Nov-2014

2.937 views

Category:

Education


3 download

DESCRIPTION

มาตรฐานการออกแบบพัฒนาเว็บไซต์

TRANSCRIPT

Page 1: Web Standard

มาตรฐานการออกแบบมาตรฐานการออกแบบพัฒนาเว็บไซตพัฒนาเว็บไซต

Page 2: Web Standard

บุญเลิศบุญเลิศ อรุณพิบูลยอรุณพิบูลย• นักวิชาการ 1• ศูนยบริการความรูทางวิทยาศาสตรและเทคโนโลยี (STKS)• สํานักงานพัฒนาวิทยาศาสตรและเทคโนโลยีแหงชาติ (สวทช.)• ประวัติการทํางาน

– ศูนยเทคโนโลยีอิเล็กทรอนิกสและคอมพิวเตอรแหงชาติ (เนคเทค)• เจาหนาที่ระบบคอมพิวเตอร 3• หัวหนางานพัฒนาเนื้อหาสาระดิจิทัล• หัวหนางานวิชาการ, หัวหนางานเทคนิค

– หนวยปฏิบัติการวิจัยและพัฒนาวิศวกรรมเทคโนโลยีซอฟตแวร– งานพัฒนาเนื้อหาสาระดิจิทัล– ศูนยฝกอบรมคอมพิวเตอรเนคเทค

Page 3: Web Standard

มาตรฐานเว็บไซตมาตรฐานเว็บไซต

• ดานเทคโนโลยี• ดานการใช• ดานการเขาถึง

Page 4: Web Standard

มาตรฐานเว็บไซตมาตรฐานเว็บไซต

สวย

เร็ว

คนได

รองรับการเขาถึง

Page 5: Web Standard

ดานเทคโนโลยีดานเทคโนโลยี

• การแสดงผลบนเบราวเซอร

• ระบบปฏิบตัิการ• ความเร็วในการโอนถายขอมูล

• การนําเสนอดวยเสียงการนําเสนอดวยวีดิทัศน

• ความตองการ Plug-ins

• ฮารดแวร

Page 6: Web Standard

ดานการใชดานการใช

• ความสม่ําเสมอเกี่ยวกับขอความ และสื่อประกอบตางๆ

• ความสม่ําเสมอในสวน Interface–Layout–Navigator– Icon & Symbol

• ความสม่ําเสมอในการติดตอสื่อสาร

Page 7: Web Standard

ดานการเขาถึงดานการเขาถึง

• การเขาถึงที่ไมจํากดัดวยความแตกตางเรือ่ง–เวลา–สถานที่–อปุกรณ–กายภาพของผูเขาชม

Page 8: Web Standard

ความเขาใจผิดบางประการความเขาใจผิดบางประการ

• ควรทําหรอืไม• สิน้เปลืองงบประมาณ• เสียเวลา• ไมคุมคา

Accessibility ไมไดเนนเฉพาะผูที่มีความบกพรองตางๆ เทานั้น แตหมายถึงโอกาสในการเขาถึงของทุกคน (All users)

Page 9: Web Standard

Server & ClientServer & ClientWindowsXP

IE

Windows2000IE

Macintosh

Windows98Netscape

พัฒนาเว็บดวยHTML Editor,

HTML Generatorบน

Windows

Server :Unix/NT

upload

Page 10: Web Standard

Server & ClientServer & ClientText Browser

คนพิการ

Mobile Phone

PDA

พัฒนาเว็บดวยHTML Editor,

HTML Generatorบน

Windows

Server :Unix/NT

upload

Page 11: Web Standard

มาตรฐานที่เกี่ยวของมาตรฐานที่เกี่ยวของ

• มาตรฐานการตั้งชื่อไฟลและ Directory• มาตรฐานทางดานเนื้อหา• มาตรฐานทางดานรูปแบบการใชภาษาบนเว็บ

• มาตรฐานทางดานเทคนิค• มาตรฐานการรักษาความปลอดภัย

Page 12: Web Standard

การตั้งชื่อไฟลและการตั้งชื่อไฟลและ DirectoryDirectory

• สื่อความหมาย-เขาใจตรงกัน • สั้นกระชับ • ไมเกิดความสับสน • ชวยให Search engine ใหคาความสําคัญของเว็บไซตสงูสุด หากคําสําคัญพบเปนชื่อไฟลและชื่อ Directory โดยตรง

Page 13: Web Standard

การตั้งชื่อไฟลและการตั้งชื่อไฟลและ DirectoryDirectory

• ภาษาอังกฤษ ผสมตัวเลข

• ใชเครื่องหมายเฉพาะ –• ไมควรมีชองวาง• ไมควรยาวมากเกินไป

Page 14: Web Standard

แบบอักษรแบบอักษร (Fonts)(Fonts)

• เลือกใชฟอนตมาตรฐาน– Tahoma– Tahoma, MS Sans Serif, Thonburi– ตระกูล NEW

Page 15: Web Standard

Tahoma & MS Sans Tahoma & MS Sans SerifSerif

Page 16: Web Standard

ภาษาไทยภาษาไทย กับการพัฒนากับการพัฒนาเว็บเว็บเพจเพจ

• ดานพัฒนาเว็บ– HTML Editor, Generator แสดงผลภาษาไทย ?– HTML Editor, Generator เขารหัสภาษาไทย ?

• ดานเรียกดูเว็บ– ฟอนต ไมควรสรางภาระใหกบัผูใชงาน– แสดงผลอกัขระไดถูกตอง ทกุ (เกอืบทกุ)

platform

Page 17: Web Standard

HTML Editor HTML Editor กับการเขารหัสกับการเขารหัสภาษาไทภาษาไทยย

Page 18: Web Standard

กรณีศึกษากรณีศึกษา Macromedia Macromedia DreamweaverDreamweaver

Page 19: Web Standard

กรณีศึกษากรณีศึกษา Macromedia Macromedia DreamweaverDreamweaver

Page 20: Web Standard

Decoding Decoding ภาษาไทยภาษาไทยถกูตองหรือไมถกูตองหรือไม

<meta http-equiv=“content-type”content=“text/html; charset=………..”>

Page 21: Web Standard

TISTIS--620/Windows620/Windows--874874

• ประเทศไทยมีมาตรฐานอักขระซึ่งกําหนดโดย สํานักงานมาตรฐานอตุสาหกรรม ดังที่เรยีกกนัโดยทั่วไปวารหัส สมอ. แตรหัส สมอ. หรือที่มชีือ่ทางการวา มอก.620 หรือ TIS-620 นี้ เปนมาตรฐานของประเทศไทย ซึ่งเมื่อนําไปใชบนเครือขายอนิเทอรเน็ต ก็อาจเกิดความเขาใจไมตรงกันได ดังนัน้จึงมีความพยายามที่จะจดทะเบียน รหัส สมอ. ที่ Internet Assigned Numbers Authority (IANA) ซึ่งเปนผูควบคุมมาตรฐานของเครอืขายอนิเทอรเน็ต และไดดําเนนิการจดทะเบียนจนสําเร็จ เมื่อวนัที่ 22 กนัยายน 2541

Page 22: Web Standard

TISTIS--620/Windows620/Windows--874/UTF874/UTF--88

• windows-874 เปน character Set ที่ใชภายในระบบปฏิบัติการทีผ่ลิตโดยบรษิัท ไมโครซอฟต เทานัน้ ไมไดเปน character Set ที่ใชในการแลกเปลี่ยนขอมูลระหวางเครื่อง– มีสวนขยายเพื่อการแสดงผล เชน bullet, smart quote, dash ฯลฯ

• tis-620 เปน character Set ทีจ่ดทะเบียนถูกตอง เปนทีร่ับรูกนัทัว่โลก ทุกระบบปฏิบัติการ (แมแตระบบปฏิบัติการของไมโครซอฟตเอง)

Page 23: Web Standard

ฐานขอมูลกบัภาษาไทยฐานขอมูลกบัภาษาไทย

• ตองรู Character Set ของฐานขอมูล

Page 24: Web Standard

FormatFormat

• รูปแบบของไฟลภาพที่ใชในการจัดเก็บภาพ • การเลือกรูปแบบที่เหมาะสมตอการนําเสนอจะชวยใหภาพมีขนาด (File Size) เล็กลง โดยคงความคมชัดไวในระดับดี

• เปนการประหยัดพื้นที่ของสื่อบันทึกขอมูลไดเปนอยางดี

Page 25: Web Standard

เว็บกราฟกเว็บกราฟก

รูปภาพที่แสดงในโหมดปกติ

การแสดงผลภาพแบบ Interlacedการแสดงผลภาพแบบ Progressive

Page 26: Web Standard

Interlaced GIFInterlaced GIF

Page 27: Web Standard

JPEG Quality & JPEG Quality & ProgressiveProgressive

• ภาพฟอรแมต JPG คา Quality ไมควรต่าํ หรอืสูงเกนิไป

• กําหนดรูปแบบการแสดงผลเปนแบบ Progressive ดวยสําหรับภาพที่มีขนาดโต

Page 28: Web Standard

GIFGIF

• Graphics Interlace File• จํานวนสีและความละเอียดของภาพไมสูงมากนัก

• ตองการพื้นแบบโปรงใส• ตองการแสดงผลแบบโครงรางกอน แลวคอยแสดงผลแบบละเอียด

• ตองการนําเสนอภาพแบบภาพเคลื่อนไหว• สวนขยายคือ .gif

Page 29: Web Standard

Bit depth drastically Bit depth drastically affects file sizeaffects file size

24 bit color

16 million colors

1.55 MB

8 bit color256

colors518k

8 bit gray

scale256 shades

of gray 518k

1 bit dithered

image 64k

Page 30: Web Standard

Transparent Transparent GIFsGIFs

Page 31: Web Standard

Animation GIFAnimation GIF

Page 32: Web Standard

JPEGJPEG

• Joint Photographer's Experts Group • เหมาะสมกับการนําเสนอทั้งระบบสือ่มัลติมีเดีย และเว็บไซต

• สามารถกําหนดขนาดของไฟลไดตามความเหมาะสม (File Compression)

• สามารถกําหนดคุณสมบัติการแสดงผลแบบหยาบ แลวคอยๆ ละเอียดเมือ่เวลาผานไป ที่เรียกวาคุณสมบัติ Progressive

• สวนขยายของไฟลรูปแบบนี้คือ .jpg หรือ .jpeg

Page 33: Web Standard

JPEG File FormatJPEG File Format

JPEG - 19KLow Quality

JPEG - 60KMax Quality

Page 34: Web Standard

PNGPNG

• Portable Network Graphics • รูปแบบลาสุดในการนําเสนอภาพผานเครือขายอินเทอรเน็ต

• สามารถแสดงผลไดในระบบสีเต็มพิกัด (True Color), มีขนาดไฟลเลก็ และควบคุมคุณภาพไดตามที่ตองการ มกีารกําหนดใหพื้นภาพเปนพืน้โปรงใสได (Transparent) รวมทั้งการแสดงผลแบบหยาบสูละเอียด (Interlaced)

• สวนขยายของไฟลรูปแบบนี้คือ .png

Page 35: Web Standard

GIF TransparentGIF Transparent

Page 36: Web Standard

PNG TransparentPNG Transparent

Page 37: Web Standard

TIFFTIFF

• Tagged-Image File Format • รูปแบบทีใ่ชเกบ็ภาพพรอมรายละเอียดตางๆ เชน เลเยอร (Layer), Annotation, โหมดภาพทั้งระบบ CMYK, RGB, Lab Color ตลอดจนขอมูลประกอบอื่นๆ ตามตนฉบับเดิมของภาพ

• เหมาะสมตอการเกบ็บันทกึภาพตนฉบบั และภาพสําหรับใชประกอบการสรางสื่อสิ่งพมิพ

• สวนขยายของไฟลรูปแบบนี้คือ .tif

Page 38: Web Standard

สรุปการเลือกใชฟอรแมตสรุปการเลือกใชฟอรแมตภาพภาพ

• ไฟลสกุล GIF (Graphics Interlace File)– ภาพทีไ่มตองการความคมชัดมากนกั สีไมมาก– มีลักษณะพื้นโปรงใส

• ไฟลสกุล JPG (Joint Photographer’s Experts Group)– ภาพทีต่องการความคมชดัสูง มีสีมาก

• ไฟลสกุล PNG (Portable Network Graphics)– ภาพทีต่องการความคมชดัสูง มีสีมากทําพืน้โปรงใสได

Page 39: Web Standard

GIF / JPEGGIF / JPEG

Page 40: Web Standard

GIF or JPEG?GIF or JPEG?

Page 41: Web Standard

7272--ppi and 300ppi and 300--ppippi

Page 42: Web Standard

Color ModeColor Mode

• A color mode determines the color model used to display and print images.

• Common models include– RGB (red, green, blue)– CMYK (cyan, magenta, yellow, black)– …

Page 43: Web Standard

RGB modelRGB model

• RGB model used for lighting, video, and monitors

• So, computer’s monitor only has 3 colors

Red

Green

Blue

Page 44: Web Standard

CMYK modelCMYK model

• The CMYK model is based on the light-absorbing quality of ink printed on paper.

Page 45: Web Standard

ลักษณะของหนาเว็บที่ลักษณะของหนาเว็บที่เหมาะสมเหมาะสม

• หนาเว็บที่เหมาะสม ไมมขีอกาํหนดที่ชดัเจน ควรคํานึงถึง– กลุมเปาหมาย (Personal/Business)– ลักษณะของคอมพิวเตอรทีก่ลุมเปาหมายใช (Screen

Area ของจอภาพ)• Screen Area ที่เหมาะสมในปจจุบัน คือ

1024 x 768 pixels• Web Area ทีเ่หมาะสมคือ

– ความยาวไมเกนิ 980 pixel– ความสูงไมมีขอกาํหนดตายตวั แตสวน Header ของเว็บไมควรเกนิครึ่งหนึ่งของพื้นทีท่ี่เหลือ

Page 46: Web Standard

Truehits.netTruehits.net

Page 47: Web Standard
Page 48: Web Standard

ลักษณะของหนาเว็บที่ลักษณะของหนาเว็บที่เหมาะสมเหมาะสม

Web Area 980 pixel

Scre

en A

rea

600

pixe

l

web

Are

a

Page 49: Web Standard

Template & Layout Template & Layout DesignDesign

TITLE

MenuHistoryDuty

Project

Page 50: Web Standard

Template & Layout Template & Layout DesignDesign

TITLE

History Duty Project

Page 51: Web Standard

Template & Layout Template & Layout DesignDesign

TITLE

HistoryDutyProject

Page 52: Web Standard

Template & Layout Template & Layout DesignDesign

TITLE

History Duty Project

Page 53: Web Standard
Page 54: Web Standard

MetadataMetadata

• Data about data• ขอมูลแสดงคุณสมบัติของไฟล หรือวตัถุตางๆ

• แสดงขอมูลสรุปเกี่ยวกบัรายละเอียดของไฟล

• แสดงลิขสิทธิ์ความเปนเจาของ

• แยกกลุมไดตามประเภทของไฟลหรือวัตถุ

• Subject Metadata• Title Metadata• Category Metadata• Keyword Metadata• Author Metadata• Description Metadata• Publisher Metadata• Resource Metadata

Page 55: Web Standard
Page 56: Web Standard

บัตรรายการหนังสือบัตรรายการหนังสือ

613 สาทิศ อินทรกาํแหงส762ช ชีวจิต : การใชชีวิตอยางเขาใจธรรมชาติ/สาทิศ อินทรกําแหง. –พิมพครั้งที่ 10.– กรงุเทพฯ:คลินิกบานและสวน, 2541.130 หนา ; 21 ซม.ISBN 974-8368-42-41. สุขศาสตร. 2. อาหารธรรมชาติ. 3. ชื่อเรื่อง.

Page 57: Web Standard

การกาํหนดคุณสมบัติของการกาํหนดคุณสมบัติของเอกสารเอกสาร

• MS – Office– File, Properties..

• OpenOffice.org– File, Properties…

• Acrobat Professional– File, Document Properties…

Page 58: Web Standard

ประโยชนของประโยชนของ MetadataMetadata

• เพิ่มประสิทธิภาพการสืบคนเอกสาร• เปนขอมูลใหกับ Search Engine ตางๆ • การเผยแพรในระบบอนิเทอรเน็ต เปนไปอยางรวดเร็ว

Page 59: Web Standard

Web MetadataWeb Metadata

• Web Title• URL :Uniform

Resource Locator• H1, H2, H3 Tag• Contents• Alternate Text for

Image/Multimedia

• Meta Tag– Description

• เนื้อหา 1 – 2 Kb ของเอกสารเว็บ

– Authors– Keyword– Generator

Page 60: Web Standard

Web TitleWeb Title

<head><title>NECTEC : Thailand : National Electronics and Computer Technology Center</title>

</head>

เปดดูดวยคําสั่ง View, Source

Page 61: Web Standard

Web Title & GoogleWeb Title & Google

Page 62: Web Standard

ไมระบุไมระบุ Web Title Web Title

Page 63: Web Standard

allintitle:tiac

Page 64: Web Standard

URLURL

• Uniform Resource Locator• ตําแหนงที่อยูของเว็บไซต• http://www.nectec.or.th/courseware/index.ht

mlProtocol Domain-name Directory Path File

Page 65: Web Standard

allinurl:tiac

Page 66: Web Standard

Meta tag: DescriptionMeta tag: Description

<head><META NAME="Description" CONTENT="มหาวิทยาลัยเกษตรศาสตรเปนสถาบันอุดมศึกษาที่เปดสอนหลักสูตรทางการเกษตรแหงแรกของประเทศไทย ถือกาํเนิดมาจากโรงเรียนฝกหัดครู ประถมกสิกรรม เมื่อ พ.ศ. 2460 ตอมาไดขยายและยกฐานะขึน้เปนวิทยาลยัเกษตรศาสตรและพัฒนาจนกระทั่งกอตั้งเปนมหาวิทยาลยัเกษตรศาสตร โดยพระราชบัญญัติ มหาวิทยาลัยเกษตรศาสตร เมื่อวันที่ 2 กุมภาพันธ พ.ศ. 2486 ปจจุบันมหาวิทยาลัยเกษตรศาสตร ประกอบดวยวิทยาเขตที่เปดเรียนแลว 5 วิทยาเขต และโครงการ จัดตั้ง 2 วิทยาเขต">

</head>เปดดูดวยคําสั่ง View, Source

Page 67: Web Standard

Meta tag: DescriptionMeta tag: Description

• กรณทีี่ไมไดระบุ Description Meta Tag โปรแกรมจะดึงขอความ 1 – 2 KB จากเว็บไซตมาแสดงผลแทน

Page 68: Web Standard

Meta tag Meta tag อื่นๆอื่นๆ

• Authors, Creator• Keyword• Generator • Robot

– จะระบุไวใน Head Section ของเอกสารเว็บ– ไมปรากฏบนเว็บเบราวเซอรหรอืในเอกสาร– Search Engine เขาถึงได

Page 69: Web Standard

Author & KeywordAuthor & Keyword

<META NAME="Author" CONTENT="Kasetsart University, Thailand, Bangkok">

<META NAME="Keywords" CONTENT="Kasetsart University, Thailand, University, Bangkok, Higher Education, Equality in Education, Colleges, School, Campuses, Faculty, มหาวิทยาลัยเกษตรศาสตร, เกษตรศาสตร ศาสตรของแผนดิน">

Page 70: Web Standard

Web Meta TagsWeb Meta Tags

• บรรจุไวใน Head • รปูแบบทั่วไป

<META NAME=“dataname”CONTENT=“datavalue”>

Page 71: Web Standard

http://http://www.submitexpress.comwww.submitexpress.com/analyze/analyzer/r/

Page 72: Web Standard

Image SearchImage Search

• Google คนหาภาพไดจาก– คําที่อยูใกลภาพ/ขางเคียงภาพ (adjacent) – Image Caption– Links– Alt Attribute ของ Image Tag– Embedded Metadata

<img src=“aaa.jpg” alt=“Computer System”>

Page 73: Web Standard
Page 74: Web Standard

Image MetadataImage Metadata

• Exchangeable Image File Format (Exif) Metadata

– ระบุอตัโนมตัิเมื่อมีการถายภาพดวยกลองดิจิทัล– พัฒนาโดย Japan Electronic Industries

Development Association (JEIDA)

• International Press Telecommunications Council (IPTC) Metadata

– Metadata ที่ผูใชสามารถบนัทึกเพิ่มเติมได– พัฒนาโดย International Press

Telecommunications Council

XNView

Page 75: Web Standard

Exif MetadataExif Metadataโปรแกรมกราฟกตางๆสามารถเปดดูได เชน ACDSee,XnView โดยคลิกปุมขวาแลวเลือกคําสั่ง Properties…

Page 76: Web Standard

IPTC MetadataIPTC Metadataโปรแกรมกราฟกตางๆอนุญาตใหเพิ่มขอมูลตางๆ ได เชน ACDSee, XnView

Page 77: Web Standard

ตัวอยางการตรวจสอบ Metadata ของเอกสารฟอรแมตตางๆ ทั้ง .doc, .ppt, .pdf,และรูปภาพ .jpg ดวยโปรแกรม Catalogue

http://www.download.com/Catalogue/3000-7241_4-10260395.html?tag=lst-0-4

Page 78: Web Standard

CSS : Standard Web SolutionCSS : Standard Web Solution

• เว็บเบราวเซอรแตละคายกําหนดคําสั่ง HTML และ Attribute แตกตางกันออกไป

• เกิดปญหาในการสรางเอกสารเว็บที่สนบัสนนุกับทุกเบราวเซอร

• เกิดปญหาในการปรับแกไขเอกสารเว็บ• การควบคุมการแสดงผล Tag หรือ Attribute ดวย CSS จึงเปนทางออกที่ W3C แนะนาํ

Page 79: Web Standard

What is CSS?What is CSS?

• CSS stands for Cascading Style Sheets • Styles define how to display HTML elements • Styles are normally stored in Style Sheets • External Style Sheets can save you a lot of

work • External Style Sheets are stored in CSS files • Multiple style definitions will cascade into one

Page 80: Web Standard

CSS syntax CSS syntax

selector {property: value}

• Selector เปนไดทั้งแท็กคําสั่ง HTML หรือเปนชือ่ที่กําหนดมาใหม ก็ได

• Property คือ Attribute ที่ตองการแสดงผล• แตละ Property จะตองระบุคาการแสดงผล (Value)

Page 81: Web Standard

CSS syntax CSS syntax

• คั่นระหวาง Property และ value ดวยเครื่องหมาย colon

• และ ลอมรอบดวย { } curly braces

body {color: black}

Page 82: Web Standard

CSS syntax CSS syntax

• ถา value ประกอบดวยคําหลายคํา (มชีองวางระหวางคํา) ตองใสเครื่องหมายคําพูดกํากับ (quotes)

p {font-family: "sans serif"}p {font-family: tahoma}

Page 83: Web Standard

CSS syntax CSS syntax • สามารถระบ ุproperty ไดมากกวา 1 โดยใชเครือ่งหมาย

semi-colon แบง

p {text-align : center ; color:red}

เพื อใหอานไดสะดวกควรเปลยีนรูปแบบเปนp {

text-align : center ;

color:red

}

Page 84: Web Standard

CSS syntax CSS syntax

• สามารถจัดกลุม Selector หลายๆ ตัว เม ื อมี Property เดียวกัน ดวยเครื่องหมาย comma

h1,h2,h3,h4,h5,h6 {color: green}

h1 { color: green}h2 { color: green }h3 { color: green }h4 { color: green }h5 { color: green }h6 { color: green }

Page 85: Web Standard

Class SelectorClass Selector

• แท็ก HTMl แตละ Tag สามารถกําหนดรูปแบบการแสดงแตกตางกันได โดยการสราง Class selector ดังนี้

p.right {text-align: right}p.center {text-align: center}

• ขึ้นตนดวย Tag ตามดวยจุด และตอดวย Attribute• ไมอนญุาตใหขึ้นตนชือ่ class ดวยตัวเลข

Page 86: Web Standard

Class SelectorClass Selector

• การใ ชงาน

<p class="right">This paragraph will be right-aligned.</p><p class="center">This paragraph will be center-aligned.</p>

Page 87: Web Standard

Class SelectorClass Selector

• กรณีที่ Attribute เดียวกัน และ ตองการประกาศใชกับทกุ Tag สามารถกําหนด Certain Class ไดดังนี้

.center {text-align: center}

Page 88: Web Standard

Class SelectorClass Selector

• การใช Certain Class มีรูปแบบดังนี้

<h1 class="center">This heading will be center-aligned</h1><p class="center">This paragraph will also be center-aligned.</p>

Page 89: Web Standard

ID SelectorID Selector• Selector ทีไ่มใชแท็กคาํสั่งของ HTML เรยีกวา ID Selector • ประกาศขึ้นตนดวยเครื่องหมาย #• หามใชตัวเลขขึ้นตนชือ่

#green {color: green}

<h1 id="green">Some text</h1><p id="green">Some text</p>

Page 90: Web Standard

ID SelectorID Selector

• กรณีที่ตองการประกาศเปน Attribute ใหมของ HTML Tag จะใชรูปแบบ ดังนี้

p#para1{text-align: center;color: red}

Page 91: Web Standard

External Style SheetExternal Style Sheet

• สราง text file• ปอนคําสั่ง css• บันทกึดวยนามสกลุ .css• ประกาศใช css ใน html file ดวยคําสั่ง

<head><link rel="stylesheet" type="text/css"

href="mystyle.css" />

</head>

Page 92: Web Standard

Web AccessibilityWeb Accessibility

• เว็บไซตที่รองรับความสามารถในการเขาถึงไดในทุกรูปแบบที่เปนมาตรฐาน

• เพื่อเปนหลักประกันไดวาขอมูลสารสนเทศที่เผยแพรนั้น ทุกคนสามารถเขาถึงไดอยางเทาเทียมกัน

• ใชเทคโนโลยีที่เปนมาตรฐานสากล HTML, XHTML, CSS, XML, DOM เปนตน

Page 93: Web Standard

ผลที่ไดจากผลที่ไดจาก Web AccessibilityWeb Accessibility

• กลุมผูใชผานเครื่อง PDA หรืออุปกรณ Mobile

• กลุมคนพิการ– บกพรองทางการเห็น– บกพรองทางการไดยิน– บกพรองทางการเคลื่อนไหว

• กลุมผูใช Browser ที่แตกตางกัน• กลุมผูใชอินเทอรเน็ตความเร็วต่ํา

Page 94: Web Standard

กลุมผูพิการกลุมผูพิการ

• ผูพิการทางการเห็น– โปรแกรมชวยอานหนาจอ – เสียง (TTS), Braille– โปรแกรมขยายหนาจอ– โปรแกรม Web Browser

Page 95: Web Standard

กลุมผูพิการทางการเห็นกลุมผูพิการทางการเห็น

• ตัวอยางโปรแกรมขยายหนาจอ

Page 96: Web Standard

Alternate TextAlternate Text

Page 97: Web Standard

Alternate TextAlternate Text

• <IMG SRC=“ชื่อไฟลภาพ”ALT=“คําอธิบายภาพ”>

• คําอธิบายภาพควรสื่อความหมายชัดเจน– Firefox ไมแสดงคําอธิบายภาพ แตทํางานกับ

Attribute TITLEฃ

Page 98: Web Standard

1. "Image of George Washington"2. "George Washington, the first

president of the United States"3. An empty alt attribute (alt=" ") will

suffice.4. "George Washington"

Page 99: Web Standard

1. An empty alt attribute (alt=" ") will suffice.

2. "Wikipedia entry for George Washington"

3. "Read More"4. "George Washington"

Page 100: Web Standard

1. "George Washington"2. "Painting of George Washington"3. "Painting of George Washington crossing the

Delaware River"4. "Painting of George Washington crossing the

Delaware River. Swirling waves surround the boat where the majestic George Washington looks forward out of the storm and into the rays of light across the river as he leads his wary troops to battle "

Page 101: Web Standard

1. "Employment Application"2. "PDF File"3. "PDF icon"4. The content of the image is presented

in context, so (alt=" ") is appropriate.

Page 102: Web Standard

1. "decorative line"2. "Beginning of footer"3. "separator"4. alt=" " will suffice

Page 103: Web Standard

สิ่งที่ไมควรทําสิ่งที่ไมควรทํา

1. "next"2. "next page"3. "George Washington's Presidency"4. "Continue to George Washington's

Presidency"

Page 104: Web Standard

Empty Alt (alt=Empty Alt (alt=“”“”))

• ภาพที่ไมสื่อความหมาย• ภาพที่ถูกตัดเปนหลายชิ้น แตไมมีผลตอการทํางาน

• ภาพ Background

Page 105: Web Standard

Long DescriptionLong Description

• คําอธิบายแบบยาว– เพิ่ม Attribute LONGDESC=“ชื่อไฟลคําอธิบาย.txt”

– ใหพิมพดวย Notepad แลวบันทึกเปน .txt

คํานึงถึง Thai Encoding & Decoding ดวย

Page 106: Web Standard

คําอธิบายแบบยาวคําอธิบายแบบยาว Long Long DescriptionDescription

Page 107: Web Standard

Alt Alt สําหรับสําหรับ FlashFlash

• ระบุ Alt• Description & Shortcut

Page 108: Web Standard

สีนั้นสําคัญไฉนสีนั้นสําคัญไฉน ??

• ใชสีพื้นและสีตัวอักษรที่แตกตางกัน

Page 109: Web Standard

สีนั้นสําคัญไฉนสีนั้นสําคัญไฉน ??

http://www.accesskeys.org/tools/color-contrast.html

Page 110: Web Standard

การลงรหัสที่การลงรหัสที่ไมถกูตองไมถกูตอง

<p><font size=“+3”><b>This is a heading</b></font></p><p>Blah blah blah</p>

<p><font size=“+3”><b>This is another heading</b></font></p><p>Blah blah blah</p>

<p><font size=“+2”><b>A sub-section</b></font></p><p>Blah blah blah</p>

Page 111: Web Standard

การลงรหัสทีถ่กูตองการลงรหัสทีถ่กูตอง

Use markup and style sheets and do so properly<h1>This is a heading</h1>

<p>Blah blah blah</p><h1>This is another heading</h1>

<p>Blah blah blah</p><h2>A sub-section</h2>

<p>Blah blah blah</p>

Outline:

•This is a heading•This is another heading

–A sub-section

Page 112: Web Standard

สรางเอกสารสรางเอกสาร HTML HTML ที่ไดที่ไดมาตรฐานมาตรฐาน

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

Page 113: Web Standard

ระบุภาษาใหชัดเจนระบุภาษาใหชัดเจน

<p>เมื่อวานมีชาวตางชาติพูดกับฉันวา<span lang=“en”>I love you</span></p>

และระบุภาษาหลักในแท็ก <HTML><html lang="th">

Page 114: Web Standard

กํากับคํายอกํากับคํายอ

<acronym title="World Wide Web Consortium">W3C</acronym>

<abbr title="World Wide Web Consortium">W3C</abbr>

Page 115: Web Standard

ระบุระบุ id id ใหกับหัวเรื่องตารางใหกับหัวเรื่องตาราง

Page 116: Web Standard

<tr><th id="t1">ชื่อ</th><th id="t2">อายุ</th><th id="t3">สถานที่เกิด</th><th id="t4">สถานที่ทํางาน</th>

</tr><tr>

<td headers="t1">น้ําหนึ่ง</td><td headers="t2">29</td><td headers="t3">กรุงเทพฯ</td><td headers="t4">เนคเทค</td>

</tr><tr>

<td headers="t1">ยุทธการ</td><td headers="t2">28</td><td headers="t3">หนองคาย</td><td headers="t4">เนคเทค</td>

</tr>

Page 117: Web Standard

กลุมผูพิการทางการไดยินกลุมผูพิการทางการไดยิน

• สามารถอานหนังสือได •• เขาใจเนื้อหาจากการอานเขาใจเนื้อหาจากการอาน ??

Page 118: Web Standard

CaptionsCaptions

• สราง caption ให Movie

Movie

Caption

Page 119: Web Standard

ระบุระบุ Shortcut KeyShortcut Key

Page 120: Web Standard

ลําดับการเลื่อนในลําดับการเลื่อนในแบบฟอรมแบบฟอรม

Page 121: Web Standard

PDF Security DocumentPDF Security Document

Page 122: Web Standard

WatermarkWatermark

• ขอมูลแสดงลิขสิทธิห์รือคุณสมบัติของไฟล • แสดงความเปนเจาของ• แบงไดเปน

– Text Embedded Watermark– Image Embedded Watermark

• มีประโยชนอยางสูงสําหรับ Digital Library, Digital Archive, E-Commerce

Page 123: Web Standard
Page 124: Web Standard
Page 125: Web Standard

Text Embedded Text Embedded WatermarkWatermark

• มีลักษณะเปนขอความทีผ่นวกกับไฟลภาพ • สามารถระบุไดจากโปรแกรม

Adobe PhotoShop จากคําสั่ง File, File info, Copyright & URL

• สามารถคนหาไดจากคําสั่ง Search/Find ของ Windows

Page 126: Web Standard

Image Embedded Image Embedded WatermarkWatermark

• มีลักษณะเปนภาพทีผ่นวกกับไฟลภาพ • อาจจะเปนภาพโลโกของหนวยงาน, ภาพขอความลิขสิทธิ์

• สามารถระบุไดจากซอฟตแวรประเภท Watermarking Software

Page 127: Web Standard

Watermark ProcessingWatermark Processing

• Encoding การเขารหัส• Decoding/Detect การตรวจสอบรหัส

– ระบบ Detect สามารถกระทําไดกับภาพที่มกีารลง Watermark และสั่งพมิพบนกระดาษ โดยนําภาพดังกลาวมาสแกน แลวใช Detecting Watermark Software ทําการตรวจสอบ

Page 128: Web Standard

The Watermark Embedding The Watermark Embedding Process Process

Page 129: Web Standard

The Watermark Detection The Watermark Detection Process Process

Page 130: Web Standard

แหลงอางอิงแหลงอางอิง

• http://stks.or.th• http://stks.or.th/elearning• http://webxact.watchfire.com