SlideShare a Scribd company logo
1 of 16
Download to read offline
บทที่ 2
การเติมสีสันให้เอกสาร
และรูปแบบตัวอักษร
การเติมสีสันให้เอกสารและรูปแบบตัวอักษร
จากการแสดงรายละเอียดที่เกิดขึ้นบนเว็บเพจจะพบว่าเอกสารทั่วไป ตัวอักษรที่ปรากฏบนจอภาพจะ
เป็นตัวอักษรสีดาบนพื้นสีเทา หรือสีขาวถ้าต้องการที่จะเปลี่ยนสีของตัวอักษรหรือสีของจอภาพสามารถทาได้
โดยการกาหนด แอตทริบิวต์ (Attribute) ของตัวอักษรหรือเป็นการแสดงของ Web Brower เอง ซึ่งสิ่งที่
ต้องการจากกลุ่มตัวเลขฐาน 16 (จานวน 3 ชุด) โดยชุดหนึ่งทาหน้าที่แทนค่าสีแดง ชุดที่สองทาหน้าที่แทนสี
เขียว และชุดที่สามทาหน้าที่แทนสีน้าเงินและถ้าตองการสีอื่นๆ สามารถดูได้จากตารางแสดงรายชื่อสีและ
รหัสสี
24/02/64
สีพื้นฐานและรหัสสี
สี รหัสสี ตัวอย่างสี
ขาว #FFFFFF
ดา #000000
เทา #BBBBBB
แดง #FF0000
เขียว #00FF00
น้าเงิน #0000FF
เหลือง #FFFF00
24/02/64
บางครั้งถ้าไม่ต้องการใส่รหัสสีเป็นเลขฐานก็สามารถใส่ชื่อสีลงไป ดังตัวอย่างต่อไปนี้
ชื่อสี ตัวอย่างสี ชื่อสี ตัวอย่างสี
Dark Turquoise Peru
Aquamarine Indian Red
Gray Sandy Brown
Pale Green Tomato
Lime Green LightPink
Pale Goldenrod White
Gold Black
24/02/64
24/02/64
สีของพื้นฉากหลัง
รูปแบบ BGCOLOR = “#สีที่ต้องการ”
อธิบาย ใช้ BGCOLOR = “#สีที่ต้องการ” ให้เป็นส่วนหนึ่งของ <BODY> ซึ่งจะทาให้เกิดสีตามที่เลือก
ลักษณะเป็นฉาก (Background) อยู่ข้างหลัง เช่น <BODY BGCOLOR = “#FF0000”>
สีของตัวอักษรบนเว็บ
รูปแบบ TEXT = “#รหัสสี”
อธิบาย กาหนดเช่นเดียวกับการทาสีของพื้นฉากหลังโดยให้เป็นส่วนหนึ่งของ <BODY> แต่ในการใส่
รหัสสีนั้นต้องดูให้เหมาะสมกับฉากหลังด้วย เช่น <BODY TEXT = “#00FF00”> ในการทาสีตัวอักษรนั้นสีจะ
ปรากฎบนเว็บบราวเซอร์เป็นสีเดียวตลอด
สีของตัวอักษรที่เป็นจุดเชื่อมโยง
รูปแบบ LINK = “#รหัสสี” ALINK= “#รหัสสี” VLINK= “#รหัสสี”
อธิบาย กาหนดอยู่ภายในส่วนของ BODY โดยกาหนดให้
- LINK = สีของตัวอักษรก่อนมีการเชื่อมโยง
- ALINK = สีของตัวอักษรขณะถูกเลือก
- VLINK = สีของตัวอักษรหลังจากเชื่อมโยงข้อมูลแล้ว
ตัวอย่างการใส่คาสั่งสี
<BODY BGCOLOR =“#FF0000” TEXT =“#00FF00” LINK=“#FFFF00”=#0077FF
VLINK=“#22AA22”>
24/02/64
สีของตัวอักษรเฉพาะที่
รูปแบบ <FONT COLOR=“#รหัสสี”>….</FONT>
อธิบาย เป็นการกาหนดสีตัวอักษรทั้งหมดสามารถใช้คาสั่งนี้ในการเปลี่ยนสีของตัวอักษรในส่วนที่ต้องการ
ให้เกิดสีสันแตกต่างไปจากสีตัวอักษรอื่นๆ เช่น
<FONT COLOR=“#FF0000”> สีแดง </FONT> ตัวหนังสือคาว่าสีแดงก็จะเป็นสีตามที่
ต้องการทันที
รูปแบบของตัวอักษร
วิธีการทาแบบตัวอักษรหลายๆแบบ เช่น ตัวหนา ตัวเอน ตัวใหญ่ ตัวเล็ก ซึ่งลักษณะต่างๆเหล่านี้จะทาให้
เว็บเพจสวยงามยิ่งขึ้น
24/02/64
24/02/64
หัวเรื่อง
รูปแบบ <HX >….</HX>
อธิบาย ในการกาหนดขนาดของตัวอักษรให้แตกต่างกันได้ภายในบรรทัดเดียวกันโดยใช้ <FONT SIZE
=value> มากาหนด (โดยที่ value เป็นตัวเลขแสดงขนาดของตัวอักษร 7 ขนาด ตัวเลขยิ่งมากยิ่งมีขนาดใหญ่
ตั้งแต่ -7 ไปจนถึง +7) เช่น
<FONT SIZE =3> เทคโนโลยีสารสนเทศ </FONT>
ตัวหนา (Bold)
รูปแบบ <B>….</B>
อธิบาย ทาให้ข้อความอยู่ใน <B>….</B> มีความหนาเกิดขึ้น เช่น <B> ตัวหนา </B>
ตัวขีดเส้นใต้ (Underline)
รูปแบบ <U>….</U>
อธิบาย ทาข้อความที่อยู่ใน <U>….</U> มีเส้นขีดอยู่ใต้ตัวอักษรเกิดขึ้น เช่น
<U> ตัวขีดเส้นใต้</U>
ตัวอักษรยกขึ้น (Superscript)
รูปแบบ <SUP>….</SUP>
อธิบาย ทาข้อความที่อยู่ใน <SUP>….</SUP> เกิดเป็นตัวยกขึ้น เช่น
< SUP > ตัวยก </ SUP >
24/02/64
ตัวห้อยลง (Subscript)
รูปแบบ <SUB>….</SUB>
อธิบาย ทาข้อความที่อยู่ใน <SUB>….</SUB> เป็นลักษณะตัวห้อยลง เช่น
< SUB > ตัวห้อยลง </ SUB >
ตัวอักษรขีดทับกลาง (Strike)
รูปแบบ <STRIKE>….</ STRIKE >
อธิบาย ทาข้อความที่อยู่ใน < STRIKE >….</ STRIKE > เป็นเส้นตรงที่ขีดทับกลางข้อความ
เช่น < STRIKE > ตัวอักษรขีดทับกลาง </ STRIKE >
24/02/64
ตัวอักษรมีขนาดคงที่ (Typewriter text)
รูปแบบ <TT>….</TT>
อธิบาย ทาให้ข้อความที่อยู่ใน <TT>….</TT> มีลักษณะเป็น fixed space เกิดขึ้น เช่น
<TT> Typewriter text </TT>
ตัวเพิ่มขนาดตัวอักษร
รูปแบบ <BIG>….</BIG>
อธิบาย ใช้เพิ่มขนาดตัวอักษรจอขนาดปัจจุบันให้เริ่ม 1 ระดับ เช่น
<BIG> เทคโนโลยีสารสนเทศ </BIG>
หมายเหตุ ถ้าใช้คาสั่งซ้อน 2 ครั้ง จะเพิ่มขนาด 2 ระดับ
24/02/64
ตัวกระพริบ
รูปแบบ <BLINK>….</BLINK>
อธิบาย ทาให้ข้อความที่อยู่ภายในคาสั่งกระพริบแบบติดๆ ดับๆ สลับกันไปเรื่อย ๆ เช่น
<BLINK> ขายด่วน </BLINK>
ตัวลดขนาดตัวอักษร
รูปแบบ <SMALL>….</SMALL>
อธิบาย ใช้ลดขนาดของตัวอักษรจากปัจจุบันให้เล็กลง 1 ระดับ ถ้าใช้คาสั่งซ้อนเกิน 2 ครั้งก็จะลดลง 2
ระดับเหมือนกัน เช่น
<SMALL> หนังสือเล่มเล็ก </SMALL>
24/02/64
แบบของตัวอักษร
รูปแบบ <FONT FACE = “font name”>….</FONT>
อธิบาย Font name เป็นชื่อของ Font ที่ต้องการให้เป็นไปตามที่ท่านต้องการและสามารถใส่ชื่อ font
หลายๆตัวได้เพื่อบางครั้ง Web Browser ไม่มี Font ตามต้องการโดยให้คั่นด้วยตัว (,) เช่น
<FONT FACE = “AngsanaUPC”> ตัวอย่าง </FONT>
ขนาด Font ทั้งเอกสาร
รูปแบบ <BESEFONT SIZE = “N”>
อธิบาย เป็นการกาหนดขนาดของตัวอักษรในโฮมเพจให้มีขนาดเท่ากันทั้งเอกสารเพื่อสะดวกจะได้ไม่ต้อง
กาหนดบ่อยครั้ง ซึ้งปกติแล้วจะกาหนดขนาดเป็น 3 โดยไม่ต้องมีตัวปิดเหมือนคาสั่งอื่นๆเช่น
<Basefont size = “5”>
24/02/64
ตัวอักษรแบบพิเศษ
ตัวอักษรแบบพิเศษนี้มิได้หมายความว่าเป็นตัวอักษรที่ไม่มีบนแป้นพิมพ์ แต่หมายถึงตัวอักษรที่ไปตรงกับ
ตัวกาหนดคาสั่ง เช่น ตัวอักษร < , > , “ ตัวอักษรเหล่านี้ไม่สามารถที่จะเขียนให้แสดงที่เว็บเบราเซอร์ได้โดยตรง
เพราะว่า เว็บเบราเซอร์จะตีความหมายว่าตัวอักษรเหล่านี้เป็นส่วนหนึ่งของคาสั่งโดยมีรูปแบบดังนี้
< แทนด้วย &lt;
> แทนด้วย &gt;
& แทนด้วย &amp;
“ แทนด้วย &quot;
® แทนด้วย &reg;
½ แทนด้วย &frac 12; (เศษ 1 ส่วน 2) 24/02/64
24/02/64
© แทนด้วย &copy;
× แทนด้วย &times;
- แทนด้วย &shy;
+ แทนด้วย &plusmn;
÷ แทนด้วย &divide;
&nbsp; แทนการทาให้เกิดช่องว่างหรือเว้นวรรคโดยไม่ขึ้นบรรทัดใหม่ตัวอย่างเช่น &lt;Internet เป็น
เครือข่ายของเครือข่ายที่ใหญ่ที่สุดในโลก
THANK YOU
24/02/64

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

2 html