HTML Introduction 2 HTML Hyper Text Markup Language

  • Slides: 12
Download presentation
HTML Introduction 2 -

HTML Introduction 2 -

HTML - Hyper. Text Markup Language not a programming language q structure text into

HTML - Hyper. Text Markup Language not a programming language q structure text into title, body, paragraphs, lists, links, or other elements q q a language that instructs web browsers to properly render text, images, … Lecture 6 2 -2

HTML Documents plain-text files that can be created using any text editor (e. g.

HTML Documents plain-text files that can be created using any text editor (e. g. , Notepad) q. html or. htm extension q q constructed by HTML elements o An element: is a distinct object in the document, e. g. paragraph, heading, page title, etc. o The whole html document is also considered an “element” Lecture 6 2 -3

HTML Documents creation (step by step) q Step 1: open “Notepad” in your computer

HTML Documents creation (step by step) q Step 1: open “Notepad” in your computer o Start -> All Programs -> Accessories -> Notepad q Step 2: write your html code in the notepad Lecture 6 (copy-paste from next slide) 2 -4

Sample HTML code <html> <head> <TITLE>Lastname, Firstname</TITLE> </head> <body> <H 1>Welcome to My Homepage.

Sample HTML code <html> <head> <TITLE>Lastname, Firstname</TITLE> </head> <body> <H 1>Welcome to My Homepage. </H 1> </body> </html> We will have a close look at the code later! Lecture 6 2 -5

HTML Documents creation (step by step) q Step 3: save the file in your

HTML Documents creation (step by step) q Step 3: save the file in your computer… o File -> Save As… Lecture 6 2 -6

HTML Documents creation (step by step) q Step 3 contd. : save the file

HTML Documents creation (step by step) q Step 3 contd. : save the file as. html or. htm file o Choose “All Files” in the field “save as type: ” o Type “sample. htm” in the field “File name: ” q You may replace sample with any other name you want o Click on “Save” button o Now, double-click on the saved file to open it up as a web browsing page Lecture 6 2 -7

Editing a saved HTML Document (step by step) q Right click on the “sample.

Editing a saved HTML Document (step by step) q Right click on the “sample. htm” file and open with Notepad o Edit/Modify… o Click on “File -> Save” button o Now, double-click on the saved file to open it up as a web browsing page Lecture 6 2 -8

In-class fun! q Create an html document with title: “Welcome to <first name> <last

In-class fun! q Create an html document with title: “Welcome to <first name> <last name>’s webpage!” q q and execute the html file using your web browser! Remember to always backup the in-class files in your usb drive or email before logging off from the class. o After logging off, all the files stored in the computer Temp folder will be erased. Lecture 6 2 -9

How to view your HTML files over the Internet q q q HTML files

How to view your HTML files over the Internet q q q HTML files need to be uploaded to a web server to view them over the Internet E. g. , JJ web server There are many free web servers o http: //www. tripod. lycos. com/ o http: //bravenet. com/ o and many more… q q For this class, you may create an account with any such web servers for the practice purpose Let’s take an example: http: //www. tripod. lycos. com/ Lecture 6

How to upload files… q Sign in using your username and password o You

How to upload files… q Sign in using your username and password o You will be taken to the control panel q Click on the “File Manager” Tab o Here you can upload your files to the web server q One at a time q Eight at a time q Or zip the entire folder q After successful uploading, you can view your webpage/website over the Internet o http: //username. tripod. com/ o Example: http: //math-279. tripod. com/ Lecture 6

One particular thing to remember! q q Starting page! Web servers by default take

One particular thing to remember! q q Starting page! Web servers by default take one particular file as the homepage of your website o index. htm or index. html o Try to be uniform with your naming convention throughout this class q The html page that you want to load as the homepage of you website o Name it as index. htm Lecture 6