HTML Basic and Cascade Style Sheet By:  Mr. PHUPHA PUNYAPOTASAKUL ( ภูผา ปัญญาโพธาสกุล )
What’s HTML Hypertext Markup Language Why we need to have markup Represent how content displays Represent various objects Etc.
Elements and Tags Element composes of Start tag Sub element or Text End tag E.g.  <EM>This is emphasized text</EM>   Nested element Overlap? Empty tag E.g.  <br/>
Attributes An element's  attributes  define various properties for the element . Format:  Attribute-name =&quot; Attribute-value &quot;   E.g.  <IMG SRC =&quot; wdglogo . gif &quot;  ALT =&quot; Web Design Group &quot; > An attribute is included in the start tag only
Special Characters some character make browser confuse Replace with escape character Reference http :// htmlhelp . com / reference / html40 / entities / Unicode escape character E.g.  &#169   &quot; “ &amp; & &gt; > &lt; <
Comments Begin a comment with  &quot; <!-- “ end it with  &quot; --> “ and do not use  &quot; -- &quot;  within the comment . E.g. < !--  An example comment  -- >
A Complete HTML 4 Document Compose of DOCTYPE  declaration HTML  element  Head element contains information about the document, such as its title and keywords   Body element contains the actual content of the document
Example < ! DOCTYPE HTML PUBLIC  &quot;-// W3C // DTD HTML 4.01 // EN &quot; &quot; http :// www . w3 . org / TR / html4 / strict . dtd &quot; > <HTML> <HEAD> <TITLE>The document title< / TITLE> < / HEAD> <BODY> <H1>Main heading< / H1> <P>A paragraph . < / P> <P>Another paragraph . < / P> <UL> <LI>A list item . < / LI> <LI>Another list item . < / LI> < / UL> < / BODY> < / HTML>
Basic Tag Heading h1-6 <h1>this is a header</h1> Paragraph <p>this is a paragraph</p> Line break (br) <p>this is a <br> a paragraph</p>
Basic Tag <b> Defines bold text <big> Defines big text < em > Defines emphasized text  <i> Defines italic text <small> Defines small text <strong> Defines strong text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text
HTML Links <a href=“URL”>link</a> External link Relative path ../img/logo.gif Absolute path /img/logo.gif Full path  http://www.example/img/logo.gif Don’t use only  www.example.com Internal link point Link point <a name=“topic1”></a> Link <a href=“thispage.htm#topic1”>
URL Encode href=“test.htm?a=a&b= กง ” Encoded URL test . htm?a = a&b =% E0%B8%81%E0%B8%87 If value have character = or &   href=“test.htm?a=a&b= กง &c=1=2&d=&&” Use escape character = use %3d, & use %26 Full reference http :// www . w3schools . com / html / html_urlencode . asp
HTML Frames Example <frameset cols =&quot; 25%,75% &quot; > <frame src =&quot; frame_a . htm &quot; > <frame src =&quot; frame_b . htm &quot; > < / frameset> Nested Frame <frameset cols =&quot; 25%,75% &quot; > <frame src =&quot; frame_a . htm &quot; > <frameset cols =&quot;* ,100 &quot; >   <frame src =&quot; frame_a . htm &quot; >   <frame src =&quot; frame_b . htm &quot; > < / frameset> < / frameset>
HTML Frames Specify size Percentage – 10% Pixel - 100 Automatic - * Specify Link Target <a href=“..” target=“_blank”>.. _blank: new window _parent: parent frame _self: current frame _top: root frame
HTML Table <table border =&quot; 1 &quot; > <tr> <td>row 1, cell 1< / td> <td>row 1, cell 2< / td> < / tr> <tr> <td>row 2, cell 1< / td> <td>row 2, cell 2< / td> < / tr> < / table>
Attributes Table attributes border=“0” cellspaceing=“5” cellpadding=“3” bgcolor=“#efefef” TD attribute s colspan=“2” rowspan=“2” align=“center” valing=“middle” bgcolor=“#efefef”
HTML Lists Unordered List <ul> <li>Coffee</li> <li>Milk</li> </ul> Ordered List <ol> <li>Coffee</li> <li>Milk</li> </ol>
Image E.g. <img src =&quot; url &quot; > Attributes alt : alternate text border : border size width : image width height : image height What if actual image size is not the same as width or height attribute value? Use image as a link?
Background Some objects may have background E.g. body, table, td bgcolor: specify background color e.g <body bgcolor=“#efefef”.. #efefef rgb ( 0,0,0 )  black background: specify background image e.g. <body background=“logo.gif”.. Absolute path / full path Relative path
HTML Form Form represent a group of inputs <form name=“f1” action=“url”> <input ..> <input ..> <input ..> </form> Content inside form tag can be any HTML elements Submitting form, only value of input object inside the form will be submitted to server
Input type Text box <input type=“text” name=“iname”> Radio button <input type=“radio” name=“iname”> Check box <input type=“checkbox” name=“iname”> Selection <select name=“iname&quot;> <option value=“1&quot;>Fresh Milk</option> <option value=“2&quot;>Coffee</option> </select>
Input Type Password input <input name =&quot; iname &quot;  type =&quot; password &quot;/ > Textarea <textarea name=&quot;iname&quot;></textarea> Hidden field <input type=&quot;hidden&quot; name=&quot;iname&quot;> Button <input type=&quot;submit&quot; name=&quot;iname&quot; value=&quot;Submit&quot;> <input type=“reset&quot; name=&quot;iname&quot; value=&quot;Submit&quot;> <input type=“button&quot; name=&quot;iname&quot; value=&quot;Submit&quot;>
Input Type Image field <input type=&quot;image&quot; name=&quot;iname&quot; src=&quot;logo.gif&quot;> File field <input type=&quot;file&quot; name=&quot;iname&quot;>
Head Element The elements inside the head element should not be displayed by a browser  According to the HTML standard, only a few tags are legal inside the head section .  These are :  <base>, <link>, <meta>, <title>, <style>, and <script>
Head Elements <head> Defines information about the document <title> Defines the document title <base> Defines a base URL for all the links on a page <link> Defines a resource reference <meta> Defines meta information
Meta Elements general information  ( meta - information )  about a document  Content Type <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;  charset=tis-620&quot; /> Keyword for search engine <meta name=&quot;description&quot; content=“ .. &quot;>   <meta name=&quot;keywords&quot; content=“ .. &quot;>   Refresh or redirect every interval time <meta http - equiv =&quot; refresh &quot;  content =&quot; 5 &quot; / >   <meta http - equiv =&quot; refresh &quot;  content =&quot; 5;url=http://www.abc.com &quot; / >
Scripts External script <script type =&quot; text / javascript &quot;  src =&quot; myscript . js &quot; >< / script> Internal script <script type=&quot;text/javascript&quot;> document.write(&quot;Hello World!&quot;)  </script>   To handle older browser <script type =&quot; text / javascript &quot; > <!-- document . write (&quot; Hello World !&quot;) //--> < / script>
Styles External style sheet <head> <link rel =&quot; stylesheet &quot;  type =&quot; text / css &quot;  href =&quot; mystyle . css &quot; > < / head> Internal style sheet <head> <style type=&quot;text/css&quot;>    body {background-color: red} p {margin-left: 20px}  </style> </head>   Inline styles <p style=&quot;color: red; margin-left: 20px&quot;> .. </p>
Common Attributes Common attributes can use with almost all tags except  base, head, html, meta, param, script, style, and title elements   class : The class of the element id   :  A unique id for the element style : An inline style definition  title   :  A text to display in a tool tip
Question & Answer

More Related Content

PPT
HTML Fundamentals
PDF
LAMP_TRAINING_SESSION_3
PPTX
New HTML5/CSS3 techniques
PPT
Html Ppt
PPT
Html Presentation Of Web Page Making
PPT
Html text formatting
PPT
Understanding THML
ODP
Creating Web Sites with HTML and CSS
HTML Fundamentals
LAMP_TRAINING_SESSION_3
New HTML5/CSS3 techniques
Html Ppt
Html Presentation Of Web Page Making
Html text formatting
Understanding THML
Creating Web Sites with HTML and CSS

What's hot (16)

PPT
Html ppt
PPS
Quick Referance to WML
PPT
Html Ppt
PPT
Html ppt
PPTX
HyperText Markup Language - HTML
PPT
Html in a box
PPT
Html part2 (1)
PPTX
Html basic tags
PPTX
WWW and HTTP
PPTX
Lecture 2 introduction to html
ODP
PPT
Html ppt by Fathima faculty Hasanath college for women bangalore
ODP
Html intro
ODP
Open Power Template 2 presentation
PPTX
Introduction to HAML
PPT
Html ppt
Quick Referance to WML
Html Ppt
Html ppt
HyperText Markup Language - HTML
Html in a box
Html part2 (1)
Html basic tags
WWW and HTTP
Lecture 2 introduction to html
Html ppt by Fathima faculty Hasanath college for women bangalore
Html intro
Open Power Template 2 presentation
Introduction to HAML
Ad

Viewers also liked (20)

PDF
One Source Solutions
PPTX
Layer 8 Security - Securing the Nut Between the Keyboard & Screen
PDF
Hot Topics For 2010
PDF
Everyday Life Questionnaire Results 2009
PPTX
Zeiss a snapshot
PPT
International Day in Oriveden Keskuskoulu 2011
PDF
Will Rogers IAAP May Mtg Invitation
PDF
P Gross Portfolio2008
PPT
PPT
MVT Asia Presentation
PPTX
Verkkotyövälineitä kv-viestintään ja hanketyöhön
PDF
10 Forecasts Bangladesh Telco Industry
PDF
The Boardwalk Difference v6.15
PDF
Ibiza Charter Boat: DALLA PIETA 72 HT | THE DOER IBIZA. Bookings: + 34 634 54...
PPT
Polish Cuisine Book
PDF
A protest in respect to my sir
PPT
Prezentacja Gimnazjum Integracyjnego
PDF
Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza
PPTX
NCrafts.IO 2015 - Future of User eXperiences
PPTX
Learning from History
One Source Solutions
Layer 8 Security - Securing the Nut Between the Keyboard & Screen
Hot Topics For 2010
Everyday Life Questionnaire Results 2009
Zeiss a snapshot
International Day in Oriveden Keskuskoulu 2011
Will Rogers IAAP May Mtg Invitation
P Gross Portfolio2008
MVT Asia Presentation
Verkkotyövälineitä kv-viestintään ja hanketyöhön
10 Forecasts Bangladesh Telco Industry
The Boardwalk Difference v6.15
Ibiza Charter Boat: DALLA PIETA 72 HT | THE DOER IBIZA. Bookings: + 34 634 54...
Polish Cuisine Book
A protest in respect to my sir
Prezentacja Gimnazjum Integracyjnego
Can Taltavuit Ibiza. Magnificient Villa for Vacation Rentals in Ibiza
NCrafts.IO 2015 - Future of User eXperiences
Learning from History
Ad

Similar to KMUTNB - Internet Programming 3/7 (20)

PPTX
IPW HTML course
ODP
ODP
PPT
Html Intro2
PPT
ODP
Html intro
PPT
Html ppt
PPT
Html tutorial
PPT
Intro to html
PPT
Intro to html
PPTX
Html tags
PPT
Diva
PPT
Introduction to html
PPT
Introduction to html
PPTX
Html basic
PPT
PPT
Lecture 4
PPT
IPW HTML course
Html Intro2
Html intro
Html ppt
Html tutorial
Intro to html
Intro to html
Html tags
Diva
Introduction to html
Introduction to html
Html basic
Lecture 4

More from phuphax (9)

PDF
GPS Tracking by Tracking.in.th
PPT
KMUTNB - Internet Programming 5/7
PPT
KMUTNB - Internet Programming 7/7
PPT
KMUTNB - Internet Programming 6/7
PPT
KMUTNB - Internet Programming 5/7
PPT
KMUTNB - Internet Programming 4/7
PPT
KMUTNB - Internet Programming 2/7
PPT
KMUTNB - Internet Programming 1/7
PPS
Abzolute Logistic Solution
GPS Tracking by Tracking.in.th
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 7/7
KMUTNB - Internet Programming 6/7
KMUTNB - Internet Programming 5/7
KMUTNB - Internet Programming 4/7
KMUTNB - Internet Programming 2/7
KMUTNB - Internet Programming 1/7
Abzolute Logistic Solution

Recently uploaded (20)

PPTX
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
PPTX
Theoretical for class.pptxgshdhddhdhdhgd
PPTX
4. Diagnosis and treatment planning in RPD.pptx
PPTX
IT infrastructure and emerging technologies
PDF
Health aspects of bilberry: A review on its general benefits
PPTX
Thinking Routines and Learning Engagements.pptx
PPTX
Neurology of Systemic disease all systems
PPTX
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
PDF
Unleashing the Potential of the Cultural and creative industries
PDF
POM_Unit1_Notes.pdf Introduction to Management #mba #bba #bcom #bballb #class...
PDF
Compact First Student's Book Cambridge Official
PDF
Laparoscopic Imaging Systems at World Laparoscopy Hospital
PDF
Disorder of Endocrine system (1).pdfyyhyyyy
PPTX
Neurological complocations of systemic disease
PPTX
Cite It Right: A Compact Illustration of APA 7th Edition.pptx
PPTX
growth and developement.pptxweeeeerrgttyyy
PPTX
operating_systems_presentations_delhi_nc
PDF
anganwadi services for the b.sc nursing and GNM
PPT
hemostasis and its significance, physiology
PDF
FAMILY PLANNING (preventative and social medicine pdf)
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
Theoretical for class.pptxgshdhddhdhdhgd
4. Diagnosis and treatment planning in RPD.pptx
IT infrastructure and emerging technologies
Health aspects of bilberry: A review on its general benefits
Thinking Routines and Learning Engagements.pptx
Neurology of Systemic disease all systems
ENGlishGrade8_Quarter2_WEEK1_LESSON1.pptx
Unleashing the Potential of the Cultural and creative industries
POM_Unit1_Notes.pdf Introduction to Management #mba #bba #bcom #bballb #class...
Compact First Student's Book Cambridge Official
Laparoscopic Imaging Systems at World Laparoscopy Hospital
Disorder of Endocrine system (1).pdfyyhyyyy
Neurological complocations of systemic disease
Cite It Right: A Compact Illustration of APA 7th Edition.pptx
growth and developement.pptxweeeeerrgttyyy
operating_systems_presentations_delhi_nc
anganwadi services for the b.sc nursing and GNM
hemostasis and its significance, physiology
FAMILY PLANNING (preventative and social medicine pdf)

KMUTNB - Internet Programming 3/7

  • 1. HTML Basic and Cascade Style Sheet By: Mr. PHUPHA PUNYAPOTASAKUL ( ภูผา ปัญญาโพธาสกุล )
  • 2. What’s HTML Hypertext Markup Language Why we need to have markup Represent how content displays Represent various objects Etc.
  • 3. Elements and Tags Element composes of Start tag Sub element or Text End tag E.g. <EM>This is emphasized text</EM> Nested element Overlap? Empty tag E.g. <br/>
  • 4. Attributes An element's attributes define various properties for the element . Format: Attribute-name =&quot; Attribute-value &quot; E.g. <IMG SRC =&quot; wdglogo . gif &quot; ALT =&quot; Web Design Group &quot; > An attribute is included in the start tag only
  • 5. Special Characters some character make browser confuse Replace with escape character Reference http :// htmlhelp . com / reference / html40 / entities / Unicode escape character E.g. &#169 &quot; “ &amp; & &gt; > &lt; <
  • 6. Comments Begin a comment with &quot; <!-- “ end it with &quot; --> “ and do not use &quot; -- &quot; within the comment . E.g. < !-- An example comment -- >
  • 7. A Complete HTML 4 Document Compose of DOCTYPE declaration HTML element Head element contains information about the document, such as its title and keywords Body element contains the actual content of the document
  • 8. Example < ! DOCTYPE HTML PUBLIC &quot;-// W3C // DTD HTML 4.01 // EN &quot; &quot; http :// www . w3 . org / TR / html4 / strict . dtd &quot; > <HTML> <HEAD> <TITLE>The document title< / TITLE> < / HEAD> <BODY> <H1>Main heading< / H1> <P>A paragraph . < / P> <P>Another paragraph . < / P> <UL> <LI>A list item . < / LI> <LI>Another list item . < / LI> < / UL> < / BODY> < / HTML>
  • 9. Basic Tag Heading h1-6 <h1>this is a header</h1> Paragraph <p>this is a paragraph</p> Line break (br) <p>this is a <br> a paragraph</p>
  • 10. Basic Tag <b> Defines bold text <big> Defines big text < em > Defines emphasized text  <i> Defines italic text <small> Defines small text <strong> Defines strong text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text
  • 11. HTML Links <a href=“URL”>link</a> External link Relative path ../img/logo.gif Absolute path /img/logo.gif Full path http://www.example/img/logo.gif Don’t use only www.example.com Internal link point Link point <a name=“topic1”></a> Link <a href=“thispage.htm#topic1”>
  • 12. URL Encode href=“test.htm?a=a&b= กง ” Encoded URL test . htm?a = a&b =% E0%B8%81%E0%B8%87 If value have character = or & href=“test.htm?a=a&b= กง &c=1=2&d=&&” Use escape character = use %3d, & use %26 Full reference http :// www . w3schools . com / html / html_urlencode . asp
  • 13. HTML Frames Example <frameset cols =&quot; 25%,75% &quot; > <frame src =&quot; frame_a . htm &quot; > <frame src =&quot; frame_b . htm &quot; > < / frameset> Nested Frame <frameset cols =&quot; 25%,75% &quot; > <frame src =&quot; frame_a . htm &quot; > <frameset cols =&quot;* ,100 &quot; > <frame src =&quot; frame_a . htm &quot; > <frame src =&quot; frame_b . htm &quot; > < / frameset> < / frameset>
  • 14. HTML Frames Specify size Percentage – 10% Pixel - 100 Automatic - * Specify Link Target <a href=“..” target=“_blank”>.. _blank: new window _parent: parent frame _self: current frame _top: root frame
  • 15. HTML Table <table border =&quot; 1 &quot; > <tr> <td>row 1, cell 1< / td> <td>row 1, cell 2< / td> < / tr> <tr> <td>row 2, cell 1< / td> <td>row 2, cell 2< / td> < / tr> < / table>
  • 16. Attributes Table attributes border=“0” cellspaceing=“5” cellpadding=“3” bgcolor=“#efefef” TD attribute s colspan=“2” rowspan=“2” align=“center” valing=“middle” bgcolor=“#efefef”
  • 17. HTML Lists Unordered List <ul> <li>Coffee</li> <li>Milk</li> </ul> Ordered List <ol> <li>Coffee</li> <li>Milk</li> </ol>
  • 18. Image E.g. <img src =&quot; url &quot; > Attributes alt : alternate text border : border size width : image width height : image height What if actual image size is not the same as width or height attribute value? Use image as a link?
  • 19. Background Some objects may have background E.g. body, table, td bgcolor: specify background color e.g <body bgcolor=“#efefef”.. #efefef rgb ( 0,0,0 ) black background: specify background image e.g. <body background=“logo.gif”.. Absolute path / full path Relative path
  • 20. HTML Form Form represent a group of inputs <form name=“f1” action=“url”> <input ..> <input ..> <input ..> </form> Content inside form tag can be any HTML elements Submitting form, only value of input object inside the form will be submitted to server
  • 21. Input type Text box <input type=“text” name=“iname”> Radio button <input type=“radio” name=“iname”> Check box <input type=“checkbox” name=“iname”> Selection <select name=“iname&quot;> <option value=“1&quot;>Fresh Milk</option> <option value=“2&quot;>Coffee</option> </select>
  • 22. Input Type Password input <input name =&quot; iname &quot; type =&quot; password &quot;/ > Textarea <textarea name=&quot;iname&quot;></textarea> Hidden field <input type=&quot;hidden&quot; name=&quot;iname&quot;> Button <input type=&quot;submit&quot; name=&quot;iname&quot; value=&quot;Submit&quot;> <input type=“reset&quot; name=&quot;iname&quot; value=&quot;Submit&quot;> <input type=“button&quot; name=&quot;iname&quot; value=&quot;Submit&quot;>
  • 23. Input Type Image field <input type=&quot;image&quot; name=&quot;iname&quot; src=&quot;logo.gif&quot;> File field <input type=&quot;file&quot; name=&quot;iname&quot;>
  • 24. Head Element The elements inside the head element should not be displayed by a browser According to the HTML standard, only a few tags are legal inside the head section . These are : <base>, <link>, <meta>, <title>, <style>, and <script>
  • 25. Head Elements <head> Defines information about the document <title> Defines the document title <base> Defines a base URL for all the links on a page <link> Defines a resource reference <meta> Defines meta information
  • 26. Meta Elements general information ( meta - information ) about a document Content Type <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=tis-620&quot; /> Keyword for search engine <meta name=&quot;description&quot; content=“ .. &quot;> <meta name=&quot;keywords&quot; content=“ .. &quot;> Refresh or redirect every interval time <meta http - equiv =&quot; refresh &quot; content =&quot; 5 &quot; / > <meta http - equiv =&quot; refresh &quot; content =&quot; 5;url=http://www.abc.com &quot; / >
  • 27. Scripts External script <script type =&quot; text / javascript &quot; src =&quot; myscript . js &quot; >< / script> Internal script <script type=&quot;text/javascript&quot;> document.write(&quot;Hello World!&quot;) </script> To handle older browser <script type =&quot; text / javascript &quot; > <!-- document . write (&quot; Hello World !&quot;) //--> < / script>
  • 28. Styles External style sheet <head> <link rel =&quot; stylesheet &quot; type =&quot; text / css &quot; href =&quot; mystyle . css &quot; > < / head> Internal style sheet <head> <style type=&quot;text/css&quot;> body {background-color: red} p {margin-left: 20px} </style> </head> Inline styles <p style=&quot;color: red; margin-left: 20px&quot;> .. </p>
  • 29. Common Attributes Common attributes can use with almost all tags except base, head, html, meta, param, script, style, and title elements class : The class of the element id : A unique id for the element style : An inline style definition title : A text to display in a tool tip