Web pages and HTML
While fancy web pages are often designed using web development software, it
can be very useful to build basic web pages for presentation of information that
is accessible, e.g. to collaborators, via the web.
Structure of an HTML document: <command></command>
structure, <HTML><BODY [bgcolor=]>,
Basic HTML text processing: text will appear continuously in a browser
regardless of how it is entered in the HTML source file, unless there
are command directives: the width of the text will adapt to the width
of the browser. Various text directives:
- <Hn> Headings in different font sizes (1 is largest) </Hn>
- <P> Force a line break with vertical paragraph space
- <BR> Force a line break without extra vertical space
- Force small horizonal space
- <UL>/<OL> Unordered list / ordered (numbered) list (end with </UL> or </OL>
- <LI> : individual list element
- Font commands
- <I> italic </I>
- <B> bold </B>
- <FONT [color=]> general font command
HTML links:
- <A HREF=address> active text </A> : sets up a link
- <A NAME=label> : sets a lable in a HTML file, can be directly skipped to
using address#label format
HTML tables:
- <TABLE [BORDER=]>: start a table
- <TR> : start a new row
- <TD [COLSPAN=]> : start a new column
- </TABLE> : end table
HTML figures:
- <IMG SRC={file} [WIDTH=] [HEIGHT=]> : force size using WIDTH= and/or HEIGHT=, usually only one of these, as this will automatically preserve aspect ratio
- If at all possible, use file format that most browsers know how to display inline: GIF, JPG, PNG
comments in HTML files: <!-- comment -->
All of these can be combined, e.g., a table of figure thumbnails with links
to full size figures:
<TABLE BORDER=2>
<TR> <TD> <A HREF=fig11.jpg> <IMG SRC=fig11.jpg WIDTH=200> </A>
<TR> <TD> <A HREF=fig12.jpg> <IMG SRC=fig12.jpg WIDTH=200> </A>
<TR> <TD> <A HREF=fig21.jpg> <IMG SRC=fig21.jpg WIDTH=200> </A>
<TR> <TD> <A HREF=fig22.jpg> <IMG SRC=fig22.jpg WIDTH=200> </A>
</TABLE>
Frames, CSS, and much much more!
web servers
A web server is a network program that runs on a server machine, and
interprets/delivers web pages as requested. Standard web requests are
http://{machinename/address}/{file|directory}. On the web server,
the {file|directory} is interpreted as a relative path to some document
root directory. If the requested address is a directory, the web server
will look for a file named index.html in that directory and, if it exists,
will use the contents of that file; if it doesn't exist, it will show the
directory listing of the directory.
NMSU web pages
Web server at NMSU uses /home/httpd/html as the document root, and
all users have a directory /home/httpd/html/{username}, so web requests
to http://astronomy.nmsu.edu/{username} will look for files in this
directory. Note that this directory is located on the disk server, so it
is not a great location to put large files; if you want to provide access
to large files, or even whole directories,
located on a disk on your machine, consider the use of symbolic links ...
Department web pages are built using Wordpress. How to modify:
link in
Internal Info on Astronomy web pages (astro/NMSUAstronomy)
You can include a link to a personal web page which you can create using
basic HTML, or any one of a number of website builders.
collaborative web pages
- Google docs/sheets, etc
- wikis : local, allows organizational structure