Introduction to HTML C151 Multi-User Operating Systems

Preview:

DESCRIPTION

Page Identification The default starting page in the default directory is identified by the user name in that domain. Web address of my user name in the CS domain: /home/yul/public_html/index.html File identified by that address: /home/yul/public_html/index.html Any subdirectory can be accessed by adding its name to the main address: Any other file than the one with the default name is identified by adding the relative path and the file name to the main address:

Citation preview

Introduction to HTML

C151 Multi-User Operating Systems

Web ServerEach user of a server can create a directory

under their home directory (~) and that directory will be used to hold their web pages.

Examples:For CS account, the directory should be called

public_html. For IUSB account (mypage.iusb.edu), the

directory should be called html. A server also defines a default name to be

given to the starting page in any directory.For CS account: index.html For IUSB account: index.html

Page IdentificationThe default starting page in the default directory is

identified by the user name in that domain. Web address of my user name in the CS domain:

http://www.cs.iusb.edu/~yul/http://www.cs.iusb.edu/~yul/File identified by that address:

/home/yul/public_html/index.html/home/yul/public_html/index.htmlAny subdirectory can be accessed by adding its name

to the main address:http://www.cs.iusb.edu/~yul/C151/http://www.cs.iusb.edu/~yul/C151//home/yul/public_html/C151//home/yul/public_html/C151/

Any other file than the one with the default name is identified by adding the relative path and the file name to the main address: http://www.cs.iusb.edu/~yul/c151/Lecture_05.ppt http://www.cs.iusb.edu/~yul/c151/Lecture_05.ppt /home/yul/public_html/C151/Lecture_05.ppt/home/yul/public_html/C151/Lecture_05.ppt

Introduction to HtmlHTML stands for HyperText Markup Language. An html document (page) contains text and some tags

specifying the format and links to images, other pages, and so on.

A tag is applied to the entire text enclosed by <tag> and </tag>.

Comment in HTMLAny text between <!-- and --> is considered a comment and

will not appear on the screen.A document must start with the tag <html> and end with

</html>. It is composed of a header and a body.<html><head> ... </head><body> ... </body></html>

Examples of things found in the head: <title>My web page</title>

Simple Formatting TagsNew line: <br>

The <br> tag is an empty tag which means that it has no end tag.

New paragraph      <p> ……….. </p>

Headings: various titles, text to be displayed in a bigger font and usually bold or italicsheading 1    <h1> ... </h1>heading 2    <h2> ... </h2>etc.

Text Propertiesbold: <b> <b> ... ... </b></b>italics: <i> <i> ... ... </i></i>centered: <center> <center> ... ... </center></center>

Special characters:&amp;&amp; the & character&lt;&lt; the < character&gt;&gt; the > character

Fonts - DivisionsA font tag can be used to set character properties

like font, color, size

<font face="Magneto" size=“12" color=“blue”> … </font>

ListsUnordered lists:

<UL><LI>Monday<LI>Tuesday<LI>Wednesday</UL>

Marked with bullets

Ordered lists:<OL><LI>Monday<LI>Tuesday<LI>Wednesday</OL>

Marked with numbers

TablesDelimited between the tags

<table> ... </table>Each table row is delimited by

<tr> ... </tr>Each table cell is delimited by

<td> ... </td>The table tag can specify some things

about the table format, as<table border=“1” align=“center” bordercolor=“red” >

Links and ImagesA link is a hypertext link to another file, to a

position in a page, or can also provide an email address:

<a href=“http://www.cs.iusb.edu/~yul/”>Liguo Yu </a>

Inserting an image in the page:<img src="cat.jpg">

The image above is in the same directory as the page. It can be an image from an external location.

Recall File PermissionsOwner, group, others

Read, write, execute

Suppose I have a file test.cpptest.cpp in my home directory. Can you copy it to your home directory?This depends on the permission of test.cpptest.cpp

Suppose I have a file index.htmlindex.html in my public_html directory. Can you see it using a web browser?This depends on the permission of file and

folders

File Permissions for Web PagesFiles should be readable for everyone:

chmod 644 file_nameFolders (include home directory) should

be executable for everyone:chmod 711 folder_name

Recommended