13
HTML Basics SJT Codes

HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

Embed Size (px)

Citation preview

Page 1: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

HTML  Basics  SJT  Codes  

Page 2: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  You  will:  *  Use  a  text  editor  to  create  an  HTML  document  *  Learn  basic  tags  *  Create  hyperlinks  *  Create  an  email  link  *  Add  images  *  Add  tables  *  Apply  colors  

Objectives    

Page 3: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  Tells  a  computer  how  to  display  a  web  page  *  HTML:  Hyper  Text  Markup  Language  *  Markups  tell  browser  how  to  display  page  *  Must  include  .htm  (old  style)  or  .html  (new  style)  

What  is  HTML  

Page 4: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

Exercise  1  

*  Create  a  ‘HTML’  folder  in  your  documents.  *  Everything  gets  saved  to  this  folder.  *  All  files  are  saved  as  xy_docname.html  where  xy  is  your  initials  and  docname  is  the  assignment  name.  

Page 5: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  Open  a  text  editor  (Wordpad)  and  type:  <html>  <head>  <title>Coding  is  Fun</title>  </head>  <body>  I  am  coding  my  <i>first</i>  web  page  </body>  </html>  

Exercise  1  

Page 6: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  Save  the  file  as  xy_exercise1.html  where  xy  is  your  initials.  *  Example:  jf_exercise1.html  

*  Open  a  browser.  *  Select  Open.  *  Find  your  saved  document.    

Exercise  1  

Page 7: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  What  did  you  just  do?  *  You  made  a  skeleton  document.  *  Minimum  required  information:  <html></html>:  the  start  and  end  of  a  an  html  document  <head></head>:  header  information  <title></title>:  title  of  your  document  <body></body>:  text  of  document  

Exercise  1  

Page 8: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  View  the  source.  *  From  your  browser,  select  View>Source  

*  What  do  you  see?  

Exercise  1  

Page 9: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  Used  to  mark-­‐up  elements  *  Surrounded  by  angle  brackets  <  and  >  *  Written  in  pairs,  <i>  and  </i>  *  First  tag  is  start,  second  is  end  *  Content  goes  between  *  Not  case  sensitive,  <i>  is  the  same  as  <I>  

HTML  Tags  

Page 10: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  This  is  an  HTML  element:  <i>first</i>  

 The  element  begins  with  the  start  tag:  <i>    The  content  is:  first    The  element  ends  with  the  end  tag:  </i>  

*  Purpose  is  to  define  text  as  italicized  

HTML  Elements  

Page 11: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  This  is  also  an  element:  <body>  I  am  coding  my  <i>first</i>  web  page  </body>  

*  Begins  with  <body>  and  ends  with  </body>  

HTML  Elements  

Page 12: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

*  Previous  example  with  <body>  also  contains  other  tags…  <i>  *  When  you  enclose  elements  with  multiple  tags,  the  last  tag  opened  should  be  the  first  one  closed.  

<p><b><em>THIS  IS  WRONG</p></b></em>  <p><b><em>THIS  IS  CORRECT</em></b></p>  

Nested  Tags  

Page 13: HTML%Basics% - WordPress.com · Exercise1 * Create$a$‘HTML’folder$in$ your$documents. * Everythinggetssavedto this$folder. * Allfiles$are$saved$as$ xy_docname.htmlwhere$

Assignment  

*  Edit  your  xy_exercise1.html  to  write  a  paragraph  summarizing  your  experience  with  HTML.  *  You  are  to  only  use  the  tags  we  have  discussed  up  to  now.