សូមស្វាគមន៏ការមកកាន់គេហទំព័រ វិបសាយជាភាសាខ្មែរ របស់យើងខ្ញុំ

Yon Rachhun

មេរៀន​ HTML

ការណែនាំឱ្យស្គាល់ HTML5 (Introduction to HTML5) HTML ថ្ញៃ 25 ខែកក្កដា ឆ្នាំ 2011 ដោយ www.khmer2030.wordpress.com | ចង់ចាំដោយ 2011 ស្អីគេ HTML ហ្នឹង? HTML គឺជាភាសាមួលដ្ឋានគ្រិះសម្រាប់ធ្វើការបង្កើតគេហទំព័រដែលមានលក្ខណៈនៅនឹងមួយកន្លែង (Static) …​ - HTML មកពីពាក្យថា Hyper Text Markup Language - HTML មិនមែនជាភាសា programming ទេ វាគឺជា Markup Language - Markup language គឺជាការបញ្ចូល ឬរៀបចំ សម្រាប់តុបតែង tags (tags មាននៅមេរៀនបន្ទាប់) - HTML ប្រើសម្រាប់តុបតែង tags បង្កើតគេហទំព័រ HTML5 គឺជាអ្វី? HTML5 គឺជាមកដល់ថ្មីរបស់ HTML, XHTML, និង HTML DOM. ជំនាន់ចាស់របស់ HTML (HTML4) ត្រូវបានបង្កើតឡើងតាំងពីឆ្នាំ ១៩៩៩ មកម្ល៉េះ។ HTML5 គឺនៅតែដំណើរការទៅមុខជារៀងរហូត។ មានន័យថាភាគច្រើនវាដំណើរការ (Support) ជាមួយនឹង Browser ប្រភេទថ្មីៗ។


HTML5 ខុសពីជំនាន់ចាស់ដូចម្តេចខ្លះ?

    HTML5 បានផ្តល់នូវ feature ថ្មីៗមួយចំនួនដូចជា:
  • The canvas element for drawing
  • The video and audio elements for media playback
  • Better support for local offline storage
  • New content specific elements, like article, footer, header, nav, section
  • New form controls, like calendar, date, time, email, url, search

តើ Browser ណាខ្លះដែល HTML5 អាចដំណើរការបាន?

Browser គឺជាកម្មវិធីទាំងឡាយណាដែលអាចដំណើរការវ៉ិបសាយបាន … ។
ចំពោះ HTML5 វិញ Browser ដែលអាចដំណើរការវាបានមានតែ Browser ជំនាន់ថ្មីតែប៉ុណ្ណោះ មានដូចជាៈ
Safari, Chrome, Firefox, Opera​ និង Internet Explorer 9 ។

ចុះ HTML Tags វិញស្អីគេដែរ?

HTML ណាដែលតុបតែង tags ជានិច្ចជាកាលត្រូវបានហៅថា HTML tags ។

HTML tags គឺជា keywords ទាំងឡាយណាដែលស្ថិតនៅចន្លោះសញ្ញាតូច និងសញ្ញាធំ ឧ.
HTML tags ជាធម្មតាមានពីរគឺ Tag បើក និង Tag បិទ ឧ<.b> និង< /b>
នៅពេលចាប់ផ្តើមបើកដង្កៀប < យើងហៅថា បើក Tag ហើយនៅពេលបិទដង្កៀប > យើងហៅថា បិទ Tag
សូមអានបន្តនូបវិបសាយ​


  • មេរៀនទី១


  • image ១. ការកំណត់ប្លង់
    ដើម្បីបង្កើត Website មួយដែលមានលក្ខណះគ្រប់ជ្រុងជ្រោយ ហើយពុំមានភាពរញេ រញៃនោះ
    គឺលោកអ្នកត្រូវកំនត់ប្លង់ជាមុនសិន៕ ក្នុងការកំណត់នូវប្លង់ត្រូវឆ្លងកាត់នូវ
    ជំហ៊ានដូចខាងក្រោម ១. កំណត់ពីគោលបំណងពីការបង្កើត Website
    ២. ប្រមួលទិន្នន័យ ដែលត្រូវយកមកដាក់លើ Website ទាំងអស់៕
    ៣. បែងចែកប្រភេទទិន្នន័យទៅតាមប្រភេទខុសៗគ្នា
    ៤. កំណត់ Page ទាំងអស់ដែលគួរមានក្នុង Website របស់អ្នក
    ៥. គួប្លង់ Website របស់លោកអ្នកនៅលើក្រដាស់ជាមុនសិន(កំណត់ថា Page ណា Link ទៅកាន់ Page ណា)៕
    ៦. ចំនុចចុងក្រោយនោះលោកអ្នកគួតែកំណត់ឈ្មោះ File, file រូបភាពផ្សេងៗទៅតាម ប្រភេទការងារ នឹងដាក់ក្នុង Folder ផ្សេងៗគ្នាជៀសវាងការច្រលំនឹងរញេរញៃ៕
    ២. របៀបនៃការសរសេរ
    ក្នុងការសរសេរភាសា HTML លោកអ្នកពុំចាំបាច់ប្រើកម្មវិធីពិសេសណាមួយ ឡើយគឺលោកអ្នកគ្រាន់តែប្រើកម្មវិធី Notepad ដែលមានស្រាប់ក្នុង Window ក៏បានដែរ ដើម្បីចូលទៅកម្មវិធីនេះយើងត្រូវ Star => Program => Accessories => Notepad
    image Webpage ភាគច្រើនត្រូវបានបែងចែកជាពីរតំបន់ធំៗ គឺ Head និង Body៕តំបន់ Head ជាតំបន់ដែលយើងប្រើដើម្បីដាក់ចំណងជើងpage៕ លោកអ្នកក៏អាចប្រើវាផងដែរសម្រាប់ជំនួយក្នុងការ Search engines នឹងសម្រាប់សរសេរនូវ Script (Java script, vb script…..)៕ តំបន់ Body ជាតំបនែលយើងប្រើសម្រាប់សរសេររាល់កូដរបស់ HTMLទាំងមូលដែលបំរើឲការរចនារបស់លោកអ្នក៕ ការសរសេរនូវកូដរបស់ HTML លោក អ្នកត្រូវអនុវត្តទៅតាមជហ៊នដូចខាងក្រោម
    <html>
    <ttile>..........................</title> <head>
    </head>
    <body>
    .............................................................................................................. .............................................................................................................. .............................................................................................................. ..............................................................................................................
    </body>
    </html>   Title : ជាកន្លែងដែលអនុញ្ញាតឲលោកអ្នកដាក់ចំណងជើងនៃ page៕ Title លោកអ្នក គួរតែដាក់ឲខ្លីហើយមានន័យឲpage ទាំងមួល៕ មើលរួបឆ្វេង image
    ៣. ការប្រើនូវ HEADER
    ក្នុង HTML លោកអ្នកអាចដាក់ចំណងជើងបាន៦យ៉ាងខុសៗគ្នា គឺ ដែល n មានតំលៃ១ ដល់ ៦៕ កាលណា n មានតំលៃកាន់តែតូចគឺចំនងជើង អត្ថបទរបស់ លោកអ្នកកាន់តែធំ៕ មើលឧទាហរណ៌ខាងក្រោម <html>
    <ttile>Test heading</title> <head>
    </head>
    <body>
    <h1>this is heading 1</h1>
    <h2>this is heading 2</h2>
    <h3>this is heading 3</h3>
    <h4>this is heading 4</h4>
    <h5>this is heading 5</h5>
    <h6>this is heading 6</h6>
    </body>
    </html>  មើលរូប   ក្នុង Tag លោកអ្នកអាចប្រើនូវ Attribute មួយចំនួនដូចជា Alignដែលប្រើសម្រាប់ កំនត់ចំនុចចាប់ផ្តើមពីខាងណាមួយ (ឆ្វេង ស្តាំ កណ្តាល ឬក៏តំរឹមសង់ខាង)៕ សូមមើលឧទាហរណ៏ <ttile>Test heading</title> <head>
    </head>
    <body>
    <h1 align="left">this is heading 1</h1>
    <h2 align="center">this is heading 2</h2>
    <h3 align="right">this is heading 3</h3>
    <h4>this is heading 4</h4>
    <h5 align="center">this is heading 5</h5>
    <h6 align="right">this is heading 6</h6>
    </body>
    </html>    មើលរូប
    ការប្រើ Paragraph
    ជាធម្មតានៅក្នុងអត្ថបទជាភាសាអង់គ្លេសគេតែងតែចែកចេញជា Paragraph ដែលមាន ន័យជាភាសាខ្មែរថា កថាកណ្ឌ័ ចំនែកឯនៅក្នុង HTML វិញក៍អនុញ្ញាតឲលោកអ្នកចែក អត្ថបទនៅលើ Website របស់លោកអ្នកជា Paragraph ផងដែរដោយលោកអ្នកប្រើប្រា ស់នូវ
    Tag ៕


  • មេរៀនទី២


  • ១. ការផ្លាសប្តូរប្រភេទតួអក្សរ
    HTML សេរីចាស់លោកអ្នកមិនអាចផ្លាស់ប្តូរប្រភេទតួអក្សរបានឡើយ ប៉ុន្តែ Version 3.2 មកលោកអ្នកអាចធ្វើការផ្លាស់ប្តូរប្រភេទ Font បាន ដូច្នេះ page របស់លោកអ្នកកាន់តែ មានភាពទាក់ទាញជាមុន៕ ហើយវាអនុញ្ញាតឲលោកអ្នកអាចផ្លាស់ប្តូរប្រភេទតួអក្សរ ទំហំ ពណ៌របស់តួអក្សរទៅតាមអត្ថបទរបស់លោកអ្មក៕
    ១. វាយ<font face="name 1, name 2, name 3..."> លោកអ្នកអាចវាយ ឈ្មោះ Font បានច្រើន៕ពេលដែលលោកអ្នកវាយឈ្មោ Font
    ២. វាយអត្ថបទរបស់លោកអ្នក
    ៣. វាយ </font>
    ឧទាហរណ៏
    <html>
    <ttile>font test</title> <head>
    </head>
    <body>
    <font face="Arial">
    The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font><br><br>
    <font face="luceda Handwriting">The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font>
    </body>
    </html>  មើលរូប ២. ការផ្លាស់ប្តុរពណ៌
    HTML សេរីថ្មីអនុញ្ណាតឲលោកអ្នកអាចផ្លាស់ប្តូរប្រភេទតួអក្សរបានផងដែរ៕លោកអ្នក អាចប្រើ Font color ដើម្បីផ្លាស់ប្តូវពណ៌របស់អក្សរ ប្តូរពណ៌របស់តួអក្សរលោកអ្នកត្រួវ ១. វាយ ដែលxxx អាចជាឈ្មោះរបស់ពណ៌(red, blue, yellow, black) រឺក៏ជាលេខកូដរប ស់ពណ៌ក៏បាន(ff00ff, ffbbaa…)។សូមបញ្ជាក់ថាប្រសិនបើលោកអ្នកដាក់ឈ្មោះរបស់ ពណ៌លោកអ្នកពុំចាំបាច់ប្រើនូវសញ្ញា(#) ពីមុខឡើយ តែបើលេខកូដពណ៌លោកអ្នក ត្រូវប្រើសញ្ញា(#)នៅពីខាងមុខ។   សូមមើលឧទាហរណ៏ខាងក្រោមះ <html>
    <ttile>font test</title> <head>
    </head>
    <body>
    <font color="blue">
    The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font><br><br>
    <font face="luceda Handwriting" color="#FFCC00">The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font>
    </body>
    </html>  មើលរូប
    ៣. ការផ្លាស់ប្តូរទំហំតួអក្សរ
    image ដើម្បីឲការរៀបចំអត្ថបទរបស់លោកអ្នកមានភាពល្អប្រសើនោះ HTML សេរីថ្មី អាចអនុញ្ញាតឲលោកអ្នកផ្លាស់ប្តូរនូវទំហំតួអក្សរទៅតាមទំរូវការ
    របស់លោកអ្នក៕លោកអ្នកអាចប្រើ
    Size attribute ដើម្បីធ្វើការផ្លាស់ប្តូរទំហំតួអក្សរ៕ ជាទូទៅទំហំរបស់ តូអក្សរស្ថិតនៅចន្លះពី១ ដល់ 7៕ ហើយលោកអ្នកក៏អាចប្រើនូវសញ្ញា(+) ឬ (-) ដើម្បី បង្កើតឬបន្ថាយនួវទំហំអក្សរបានដែរ។ របៀបសរសេរ ១. វាយ ដែល n ជាចំនួនគត់ដែលមានតំលៃចាប់ពី១ដល់៧។ លោកអ្នកក៏អាចបញ្ជូល តំលៃរបស់n ដោយប្រើ +n ឬក៏ -n បានដែរ ដែលមានន័យថា ឲតួអក្សរដែរស្ថិតនៅក្នុង Tag font ធំជាងឬតូចជាងប៉ុណ្ណោះធៀបនឹងអក្សរដែរស្ថិតនៅជុំវិញវា។ ២. វាយអត្ថបទរបស់លោកអ្នក ៣. វាយ ដើម្បីបិទ font tag សូមមើលឧទាហរណ៏ <html>
    <ttile>font test</title> <head>
    </head>
    <body>
    <font color="blue" size=5>
    The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font><br><br>
    <font face="luceda Handwriting"color="#FFCC00" size=2>The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.The font element allows you to control the font family, size, and color of the font used for section of text. The element has been deprecated since it function is more appropriately handled through the use of style sheets.</font>
    </body>
    </html>    មើលរូប