Website 101
Website 101
Yani Ivanov
Student Assistant / Web Administrator
Information Technology for Environmental Research Area of the Hawai`i NSF EPSCoR Program
Covered Topics
Covered Topics
•
•
Introduction to HTML
Introduction to HTML
–– What is it and how it worksWhat is it and how it works –
– Main HTML tagsMain HTML tags
•
•
How to Use Macromedia Dreamweaver
How to Use Macromedia Dreamweaver
–– Creating a simple web page using Creating a simple web page using DreamweaverDreamweaver
•
•
Servers, Files and Websites
Servers, Files and Websites
–– Local and server filesLocal and server files –
– Transferring files to/from a web server using SSHTransferring files to/from a web server using SSH –
Announcements
Announcements
•
•
(Optional) Practice session after the presentation
(Optional) Practice session after the presentation
•
•
Dreamweaver more in depth session tomorrow
Dreamweaver more in depth session tomorrow
–
–
3.15pm Thursday, June 30, same room
3.15pm Thursday, June 30, same room
•
•
Reserve Dreamweaver time on our lab PC
Reserve Dreamweaver time on our lab PC
–
–
Email to
Email to
[email protected]
[email protected]
to reserve time
to reserve time
•
•
Presentation available online at:
Presentation available online at:
http://www.uhh.hawaii.edu/~sdalhelp/help.php
HTML?
HTML?
•
•
What is HTML?
What is HTML?
–
–
Abbreviation for Hypertext Markup Language
Abbreviation for Hypertext Markup Language
–
–
Platform independent styles that define the
Platform independent styles that define the
various components of a web document
various components of a web document
•
•
Why HTML?
Why HTML?
•
How does HTML work?
How does HTML work?
•
•
HTML files are plain text files containing markup tags
HTML files are plain text files containing markup tags
•
•
Markup tags tell web browsers how to display the page
Markup tags tell web browsers how to display the page
(page formatting and layout)
(page formatting and layout)
•
•
Text enclosed in opening and closing HTML tags is
Text enclosed in opening and closing HTML tags is
affected by those tags
affected by those tags
•
•
HTML files can be created using a simple text editor or
HTML files can be created using a simple text editor or
WYSIWYG applications/editors
WYSIWYG applications/editors
•
From HTML Source Code to a Web Page
From HTML Source Code to a Web Page
•
•
HTML files contain HTML source code that is
HTML files contain HTML source code that is
used by browsers to format web page contents
used by browsers to format web page contents
•
•
HTML files have .html or .htm extension
HTML files have .html or .htm extension
•
•
HTML source code is read by web browsers and
HTML source code is read by web browsers and
transformed to formatted pages (rendering)
transformed to formatted pages (rendering)
•
•
The HTML file that contains a site’s first (home)
The HTML file that contains a site’s first (home)
page is usually named index.html
HTML Editors
HTML Editors
•
•
Simplest editors:
Simplest editors:
–
–
Notepad in Windows
Notepad in Windows
–
–
Emacs
Emacs
or vi in UNIX
or vi in UNIX
–
–
SimpleText for Macintosh
SimpleText for Macintosh
•
•
Alternatives:
Alternatives:
–
–
Macromedia Dreamweaver
Macromedia Dreamweaver
–
–
Microsoft FrontPage
Microsoft FrontPage
–
–
Macromedia Contribute
Macromedia Contribute
–
Basic HTML Tags
Basic HTML Tags
•
•
HTML tags have the form:
HTML tags have the form:
<html> … </html> <html> … </html> <strong> … </strong> <strong> … </strong> <p> … </p> <p> … </p> –
– Usually come in pairs: opening and closingUsually come in pairs: opening and closing –
– Not case sensitiveNot case sensitive –
– Usually created from intuitive abbreviationsUsually created from intuitive abbreviations –
– Can be nestedCan be nested
HTML Code:
HTML Code: <P><P>Hey, I can use Hey, I can use <i><i>italicsitalics</i></i> in HTML.in HTML.</P></P>
Browser View:
Sample HTML Code
Sample HTML Code
<html> <html> <head> <head> <title><title>My First Web PageMy First Web Page</title></title> </head>
</head>
<body> <body> <h1>
<h1>This Is My First Web PageThis Is My First Web Page</h1></h1> <p>
<p>The first paragraph comes here.The first paragraph comes here.
<
<strong>strong>And this text is boldAnd this text is bold..</strong></strong> </p> </p> </body> </body> </html> </html> Try it out: Try it out: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic
Basic HTML Tags
Basic HTML Tags
•
•
Heading: Heading: <h1><h1>……</h1></h1> ; ; <h6><h6>……</h6></h6>•
•
Paragraph: Paragraph: <p><p>……</p></p>•
•
Line Break: Line Break: <br /><br />•
•
Bold: Bold: <strong><strong>……</strong></strong> ; ; <b><b>……</b></b>•
•
Italic: Italic: <i><i>……</i></i>•
•
Underline: Underline: <u><u>……</u></u>•
•
Alignment:Alignment: <left><left>……</left></left> <center><center>……</center></center> <right>
<right>……</right></right>
•
•
Comment: Comment: <!<!---- …… ---->> •Web Page Background
Web Page Background
•
•
Solid color background
Solid color background
<body bgcolor=“
<body bgcolor=“blueblue"> "> …… </body></body> <body bgcolor=“
<body bgcolor=“whitewhite"> "> …… </body></body> <body bgcolor="
<body bgcolor="#00BBDD#00BBDD"> "> …… </body></body>
•
•
Image background
Image background
<body background="
<body background="img.gifimg.gif"> "> …… </body></body> <body background="
HTML Links
HTML Links
•
•
Web pages have links to other pages or
Web pages have links to other pages or
sites (hyperlinks)
sites (hyperlinks)
<a href=“
<a href=“……”> ”> … … </a> </a> <a href=“
<a href=“www.yahoo.comwww.yahoo.com”>”>Yahoo WebsiteYahoo Website</a></a>
•
•
Opening a link in a new browser window
Opening a link in a new browser window
<a href=“
<a href=“……” target=“_blank”> ” target=“_blank”> … … </a> </a> <a href=“
<a href=“www.yahoo.comwww.yahoo.com” target=“_blank”>” target=“_blank”>Yahoo WebsiteYahoo Website</a></a>
•
Images
Images
•
•
Images are represented by a link to a file:
Images are represented by a link to a file:
<img src=“
<img src=“images/images/myimagemyimage.jpg.jpg”>”>
•
•
Image attributes
Image attributes
–
–
Height
Height
–
–
Width
Width
–
–
Border
Border
–
–
Alternate text (tooltip)
Alternate text (tooltip)
<img src=“<img src=“images/images/myimagemyimage.jpg.jpg” width=“” width=“100100” heigth=“” heigth=“150150” ” border=“
Tables
Tables
•
•
Used for presenting data, as well as page layout
Used for presenting data, as well as page layout
•
•
Defined by the
Defined by the
<table>
<table>
…
…
</table>
</table>
tags
tags
•
•
Consist of table rows, defined by
Consist of table rows, defined by
<
<
tr
tr
>
>
…
…
</
</
tr
tr
>
>
•
•
Rows consist of data cells, defined by
Rows consist of data cells, defined by
<td>
<td>
…
…
</td>
</td>
•
•
Data cells can contain text, images, tables, etc…
Data cells can contain text, images, tables, etc…
•
•
The trick:
The trick:
–– The number of data cells in every single table row has to be theThe number of data cells in every single table row has to be the same for the whole table.
same for the whole table.
–
Tables: Example
Tables: Example
<table width="
<table width="200200" border="" border="11" " cellspacingcellspacing="="00" " cellpaddingcellpadding=“=“55">"> <
<trtr>> <td>
<td>This is the first rowThis is the first row</td> <td></td> <td>Still first rowStill first row</td></td> </
</trtr>> <
<trtr>> <td>
<td>This is the second rowThis is the second row</td> <td></td> <td>Still second rowStill second row</td></td> </
</trtr>> <
<trtr>> <td
<td colspancolspan="2">="2">This is the third row, only 1 cell hereThis is the third row, only 1 cell here</td></td> </
</trtr>> </table>
Viewing HTML Web Pages
Viewing HTML Web Pages
•
•
HTML files on your computer can be
HTML files on your computer can be
opened using a web browser
opened using a web browser
•
•
Often used to preview a website before
Often used to preview a website before
posting it to the web
posting it to the web
•
•
Open your browser, select File
Open your browser, select File
-
-
> Open,
> Open,
navigate to the desired html file
Macromedia
What is it?
What is it?
•
•
Application for beginning and advanced web
Application for beginning and advanced web
development
development
•
•
Provides support for many different web
Provides support for many different web
technologies like:
technologies like:
–
–
HTML
HTML
–
–
Different client and server scripting languages
Different client and server scripting languages
–
–
Cascading
Cascading
Stylesheets
Stylesheets
(CSS)
(CSS)
–
Why
Why
Dreamweaver
Dreamweaver
?
?
•
•
Gives significant power in web development
Gives significant power in web development
•
•
Provides great flexibility
Provides great flexibility
•
•
Numerous helpful features
Numerous helpful features
–– Code viewCode view –
– Layout viewLayout view –
– File managerFile manager –
– Code generatorCode generator –
– Tag inspector, design help, code helpTag inspector, design help, code help
•
•
Most importantly:
Most importantly:
––
You don’t have to know much HTML to start creating impressive
You don’t have to know much HTML to start creating impressive
web pages
Setting Up a Site in
Setting Up a Site in
Dreamweaver
Dreamweaver
•
•
Click Site from the menu list and select Manage SitesClick Site from the menu list and select Manage Sites•
•
In the Manage Sites window click New… and select Site from the dIn the Manage Sites window click New… and select Site from the droprop- -down menudown menu
•
•
In the Site Definition window click on the Basic tab and follow In the Site Definition window click on the Basic tab and follow the wizard the wizard selecting the followingselecting the following
1.
1. Type a name for your siteType a name for your site
2.
2. Not using server technologyNot using server technology
3.
3. Edit files locally; Browse to the location where you want your Edit files locally; Browse to the location where you want your website website files to be stored on your PC
files to be stored on your PC
4.
4. No connection to a remote serverNo connection to a remote server
5.
5. Click Next, verify your selections, then click Done, and Done agClick Next, verify your selections, then click Done, and Done againain
•
•
You just created a new site on your machine and now you can starYou just created a new site on your machine and now you can start t usingLet’s Try It Out
Uploading Files to a Web Server
SSH Secure Shell
SSH Secure Shell
•
•
Secure file transfer manager
Secure file transfer manager
•
•
Transfers file between a local machine and a
Transfers file between a local machine and a
web server
web server
•
•
Easy drag
Easy drag
-
-
and
and
-
-
drop file management
drop file management
•
•
Download from:
Download from:
http://www.
Getting Started with SSH
Getting Started with SSH
•
•
Start the SSH File Transfer Client
Start the SSH File Transfer Client
•
•
Click “Quick Connect”
Click “Quick Connect”
–
–
An error message might show up, click OK
An error message might show up, click OK
•
•
In the connection window enter the
In the connection window enter the
Host Name
Host Name
and
and
User Name
User Name
:
:
•
Connecting to UH Servers
Connecting to UH Servers
•
•
Host Name:
Host Name:
–
–
UH server:
UH server:
uhunix2.its.
uhunix2.its.
hawaii
hawaii
.
.
edu
edu
–
–
UHH server:
UHH server:
www.
www.
uhh
uhh
.
.
hawaii
hawaii
.
.
edu
edu
•
•
User Name:
User Name:
–
–
Your UH account name:
Your UH account name:
accountname
Finding the Correct Folders
Finding the Correct Folders
•
•
Local Machine
Local Machine
–
–
Windows
Windows
-
-
like navigation
like navigation
•
•
Web Server
Web Server
–
–
Navigate to the public_html folder
Navigate to the public_html folder
–
–
public_html contains the files and directories
public_html contains the files and directories
for your website
Let’s Try It Out
Useful Tips
Useful Tips
•
•
Indent your source code. Much easier to read, easier to find codIndent your source code. Much easier to read, easier to find code errorse errors–
– Indentation helps a lot especially when there are nested tags (eIndentation helps a lot especially when there are nested tags (e.g. tables).g. tables)
•
•
Use white space in your source code. Not recognized by the browsUse white space in your source code. Not recognized by the browsers; code ers; code is easier to read is easier to read <html> <html> <head> <head><title>My First Web Page</title>
<title>My First Web Page</title>
</head>
</head>
<body>
<body>
<h1>This Is My First Web Page</h1>
<h1>This Is My First Web Page</h1>
<p>The first paragraph comes here.
<p>The first paragraph comes here.
<strong>And this text is bold.</strong>
<strong>And this text is bold.</strong>
</p> </p> </body> </body> </html> </html>
Useful Tips
Useful Tips
(Continued)
(Continued)
•
•
When you insert an opening HTML tag, insert the closing one righWhen you insert an opening HTML tag, insert the closing one right away, t away, then come back and fill in the contents inthen come back and fill in the contents in--betweenbetween –
– If the page looks distorted or contents is missing or misplaced,If the page looks distorted or contents is missing or misplaced, check check your tag pairs. Make sure every opening tag has a matching closi
your tag pairs. Make sure every opening tag has a matching closing one ng one at the right place.
at the right place.
•
•
Keep an upKeep an up--toto--date copy of the website files on your local machinedate copy of the website files on your local machine•
•
If you are involved in maintaining a web site with or for the UnIf you are involved in maintaining a web site with or for the University, iversity, please be advised that you are required by federal law to ensureplease be advised that you are required by federal law to ensure your site your site meets accessibility guidelines
meets accessibility guidelines
http://www.webaim.org/standards/508/checklist
http://www.webaim.org/standards/508/checklist
•
A copy of this presentation is available at:http://www.uhh.hawaii.edu/~sdalhelp/tutorials.
HTML Online Resources
HTML Online Resources
•
• A beginner’s Guide to HTML:A beginner’s Guide to HTML: http://archive.
http://archive.ncsancsa..uiucuiuc..eduedu/General/Internet/WWW//General/Internet/WWW/HTMLPrimerAllHTMLPrimerAll.html.html
•
• Practice your HTML at: Practice your HTML at:
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic
•
• HTML tag reference: HTML tag reference: http://www.w3schools.com/html/html_reference.asphttp://www.w3schools.com/html/html_reference.asp
•
• Macromedia Macromedia DreamweaverDreamweaver::
http://www.macromedia.com/software/
http://www.macromedia.com/software/dreamweaverdreamweaver
•
• Download SSH Secure Shell:Download SSH Secure Shell:
http://www.hawaii.edu/help/software/pc/ssh.html http://www.hawaii.edu/help/software/pc/ssh.html
•
• CSS CSS –– Cascading Cascading StylesheetsStylesheets::
http://www.w3schools.com/css/default.asp http://www.w3schools.com/css/default.asp
Dreamweaver
Dreamweaver
Available
Available
•
•
Dreamweaver Dreamweaver is available for use on one of our computers in room is available for use on one of our computers in room K274A. Please eK274A. Please e--mail us at mail us at [email protected]@hawaii.edu if you would like if you would like access to Macromedia
Questions?
Questions?
More questions, e