USEFUL HTML COMMANDS,December 9,2019

Eric Rasmusen, [email protected] This file is now at http://rasmusen.org/a/html-rasmusen.htm. See also my example page at http://rasmusen.org/zg492/webpage.htm. Another, simpler, class sample is at http://www.rasmusen.org/a/html-sample.htm.

This page contains HTML commands that I often need to look up. To see the commands themselves, use VIEW SOURCE. This page is not tidied up.

USING UNICODE FOR CHINESE CHARACTERS
Copy the Chinese characters you want from another page and paste them into the converter box at https://www.branah.com/unicode-converter. If the Unicode-16 is \u82b1, change it to 花, which is ampersand#x82b1. You do NOT need to insert LTmeta charset=utf-16GT at the start of your file.
Or, better: paste into a Word document, then save it as HTML and see what it looks like. To convert from Simplified to Traditional characters and back, go to: https://www.chineseconverter.com/en/convert/simplified-to-traditional

A good article on it all is: https://r12a.github.io/scripts/chinese/

Here is how to make a Mathjax webpage that will do Latex in HTML. See https://tex.stackexchange.com/questions/23804/how-to-incorporate-tex-into-a-website. When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$.
Printing HTML files: To reduce the size to fit into fewer pages, as with recent.html, open up the html file in Internet Explorer. Do PRint Preview and choose to srhink it to 95% or whatever. Be sure to get rid of the header and footer with the Settings too. ADDING SPACE

To put extra vertical space:

That middle thing is a non-breaking space.

Better is this. Note that to use CSS the file must end in *.html, not *htm.

For horizontal space, use a command similar to a blank space. For a one-time paragraph indent, type:



I don't know how to put in negative vertical or horizontal space, though I've searched for that.

TO LET THE VIEWER SELECT A FILE TO CREATE A BUTTON It says "Try IT" on the button. When you click it, it runs the javascript function myFunction. CHECKBOX: I haven't gotten that to work.
FOR LISTS WITH NO BULLET POINTS: USE A STYLE COMMAND I"VE GOT HERE: http://www.mediacollege.com/internet/css/ul-list.html LISTS WITH ITEMS NUMBERS AS WORDS:
Dweeb
young excitable person who may mature into a Nerd or Geek
Hacker
a clever programmer
Nerd
technically bright but socially inept person
--------------------------------------------------------- DELETING SLASHES

This is the text that will get deleted <del datetime="2005-03-28T11:20:0305:00" >This is the text that will get deleted </del >

PAGE BREAKS FOR PRINTING

Here is where page one ends.

Here is where page two starts and ends.
Here is where page three starts.

Here is where page one ends.

<div style="page-break-before:always"/ >

Here is where page two starts and ends.

<div style="page-break-before:always"/>

Here is where page three starts.

COLORED TEXT

<font color= red>Here is some red color </font color=red>

Here is some red color

VIEWING FIREFOX BROWSER IN LARGE FONT The best way to make the font larger when viewing a webpage in Firefox is to hold down the CTRL button and scroll up using the mouse wheel. This is very useful when showing a web page to a class using a projector. (Source: RF in G492)
BLOGGER (NOT HMTL, but I"ll Put it here)
• A page on how to use Haloscan to add incoming and outgoing trackbacks to Blogger blogging software.

INSERTING PDF FILES INTO HTML FILES I finally found this-- I'd cite the link but I didn't note it down. This worked for me-- at least the first part did. The last part is an alernative for readers with browsers that don't support the IFRAME command. <iframe src="http://rasmusen.org/t/images-2008/names.pdf" title="your_title" target="Message" scrolling="auto" width="100%" align="top" frameborder="0" height="620"> <br><!-- Alternate content for non supporting browsers --><br><p align="center">Please click <a href="http://rasmusen.org/t/images-2008/names.pdf">here </a>.</p><br> </iframe>
HIDDEN AREA TOGGLE

<!-- javascript for hidden area toggle added October 9a, 2007 --> <script type="text/javascript"> <!-- function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script>

Image Captions in HTML. "Image captions on Web pages" is good. It said "Sadly enough, there is no markup for image captions in HTML. What comes closest to semantically associating some text content with some image is putting them into a table so that the image is in one cell and the text is either in another cell or in a caption element." Here's an example, elaborated using commands from http://www.case.edu/help/wilbur/ch2.html(try VIEW SOURCE for the code):

FOR IMAGE CAPTIONS: HERE IS THE CODE FOR THE NEXT PICTURE:

<table class="image" align="left"> <tr><td><img src= " http://rasmusen.org/t/images-2008/eggs.JPG" align= left width= "360" hspace="30" ></td></tr> <tr><td class="caption"> Eggs</td></tr> </table>

 Eggs
It is useful to have a way to tell text to go on past the image. That is the next command.
Now we go on.

SYMBOLS

HTML Escape Sequences* To use one of these characters in an HTML document, you must enter its escape sequence instead. The semicolon is optional if you have a blank space after the character, but otherwise you need it to separate off the escape sequence character from the next character, e.g. "x &lt y and x&lt;y and x&lty" becomes "x < y and x<y and x<y"

&lt; the escape sequence for <
&gt; the escape sequence for >
&amp; the escape sequence for &
&quot; the escape sequence for "

&exist &exist &forall &forall; ∈ ∏ ∑ √ ∞ ∫ ∼ ≈ ≠ ≤ ≥ ′ • ∂

"±" "¹" "²" "³" "ℜ" from http://www.w3.org/TR/html401/sgml/entities.html

THE GREEK ALPHABET
A &Alpha &Alpha &alpha &alpha alpha         B &beta beta         &Gamma &gamma gamma         &Delta &delta delta         E &epsilon epsilon        Z &zeta zeta        H & eta eta

&Theta &theta theta        I &iota iota        K &kappa kappa        &Lambda &lambda lambda        M &mu mu        N &nu nu        &Xi &xi xi        &Omicron &omicron omicron

&Pi &pi pi        P &rho rho        &Sigma &sigma sigma        T &tau tau        &Upsilon &upsilon upsilon        &Phi &phi phi        X &chi chi        &Psi &psi psi        &Omega &omega omega

THE HEBREW ALPHABET: אבגדהוז חטיכלמנסעפ צקרשת for tcdsvuzjyhfknbxgpmera, aleph א--- bethב--- gimel ג--- daleth ד--- he ה--- vav ו--- zayin ז--- chet ח---tet ט--- yod י--- kaph כ--- lamed ל--- mem מ---nun נ--- samech ס---ayin ע---pe פ--- tsadi צ---quph ק--- resh ר---shin ש--- tav ת Maybe I'll add the vowels here someday.

A list of symbols is at: http://www.htmlhelp.com/reference/html40/entities/symbols.html

Another way is to use the symbol font: l

"Ultimate Cool Characters" says Combining diacritical marks can be used to add a diacritical mark to a desired character. Type the number code for the desired mark immediately after the character you would like to add it to. For example, typing My name is B̃ob would appear as My name is B~ob. Note that this only works for the characters labeled as combining marks (combining grave, combining acute, combining tilde, combining hook above, and combining dot below).

SEARCH ENGINES: (1) The meta tag below for robots tells the robot to not index the webpage and to not follow any links ou of it. For more details, see http://www.kdwebpagedesign.com/tut_meta.asp. <meta name="robots" content="none"> (2) robots.txt files These files allow web site administrators to exclude visiting search engine robots from sections of their site. It's well suited to excluding large portions of a web server from indexing. For example, you might not want a search engine hitting and running the programs in your cgi directories. This method is not particularly suited to excluding single pages (see robots META tags instead). When a robot visits the site http://website.brown.edu, it first checks for the existence of the file http://website.brown.edu/robots.txt This specially formatted file tells the robot which parts of the site to exclude. There can be only one robots.txt file per website; the file http://website.brown.edu/myportion/robots.txt will not be honored. If you want to allow all robots to spider your site, put the following in your robots.txt file: User-agent: * Disallow: If you want to exclude all robots from your site, put the following in your robots.txt file: User-agent: * Disallow: / The following robots.txt file excludes all robots from the URLs http://website.brown.edu/Logs/, http://website.brown.edu/Documents/Local/, http://website.brown.edu/cgi-local/ and http://website.brown.edu/cgi-bin/. User-agent: * Disallow: /Logs/ Disallow: /Documents/Local/ Disallow: /cgi-local/ Disallow: /cgi-bin/ Note that you need a separate line for each area that you want to exclude from search engine robots. Also note the trailing slash which indicates that the entire directory should be ignored by the search engine robots. See http://www.brown.edu/webmaster/search/robotexclusion.html?vm=r HR> STYLE Put this at the start to make the background color white, the first- choice of font trebuchet-ms, the second choice arial, and to set up two CLASS's, one superscript with small font size and the other red font.

<STYLE type="text/css"> BODY { background-color: white } body { font-family: trebuchet ms, arial} <!-- .verse-num{ vertical-align: super; margin-left: 0em;margin-right: -3pt; font-size:-4} .woc{color:red; } --> </STYLE>

#### this is an unindented paragraph.

dfgsfgsgsfgsf

FOR PUTTING PARAGRAPH INDENTS IN THE ENTIRE DOCUMENT:

<STYLE TYPE="text/css"> <!-- P { text-indent: 2em } -->
<
/STYLE>



TABLES

Presidential Election Data,
Maine 4
Indiana12

LISTS

DL and DT are good for lists with headings. You can, in effect, delete the unnecessary extra vertical space that the ol and ul lists add automatically before and after the list. They are for "definition lists". I combine them with the usual ul li unordered list command below.

January 30. Introduction to Antitrust
For Reference:

LISTS:

for no dots in the list. *none* can be replaced by other kinds of counters.

This will align the paragraph that follows it on the right.

This is the text that will get deleted
To change font size:

These commands can be repeated for additional effect.

Rasmusen homepage will open the page in a new window
EXPANSIONS:
"Getting Carried Away in Auctions as Imperfect Value Discovery" . Bidders have to decide whether and when to incur the cost of estimating their own values in auctions. This can explain why people seem to get carried away, bidding higher than they had planned before the auction and then finding they had paid more than the object was worth to them. Even when [more]

Then have another file, temp1.htm, with something that is an expanded version. The following will open a new window and jump right to the text. "Getting Carried Away in Auctions as Imperfect Value Discovery". Bidders have to decide whether and when to incur the cost of estimating their own values in auctions. This can explain why people seem to get carried away, bidding higher than they had planned before the auction and then finding they had paid more than the object was worth to them. Even when such behavior is rational, ex ante, it may be perceived as irrational if one ignores other situations in which people revise their bid ceilings upwards and are happy when that enables them to win the auction.

UNFORMATTED TEXT

<pre> put the unformatted text here </pre>

	  put the unformatted text here

If you don't want preformatted text to show up as typewriter font, put the following in your stylesheet. pre { display: block } pre, ss, code, kbd, samp { font-family: verdana } pre { white-space: pre }
BULLET POINTS

You will discover &bull;, which means •, which you can also enlarge. Here is the input:

&bull;

<big> &bull; </big> <p>

<big> <big> <big> <big> <big> & bull; </big> </big> </big> </big> </big><p>

Here is what it looks like on the screen: •

As far referencing pages in higher directories, this can be done by using two periods ../ For example if you would like to link to a the directory right above your current one it might look like this: Check out this page For a page two directories up: Check out this page
SUPERCRIPTS AND SUBSCRIPTS:

X<sub>ij</sub>, or X<sup>nt</sup>

Xij, or Xnt

FOOTNOTES

Make a deal with Sears to distribute it.<SUP><A href= "#note1"> 1</A></SUP> Why did this invention come only after almost five million others?<p> Footnotes <p> <A name="note1"></A><B>1</B> Go to the U.S. patent office site and search by patent number. Sears's description of the Pocket Socket can be found by searching for that name at Www.sears.com

Make a deal with Sears to distribute it. 1 Why did this invention come only after almost five million others?

Footnotes

1 Go to the U.S. patent office site and search by patent number. Sears's description of the Pocket Socket can be found by searching for that name at Www.sears.com

<small> <BLOCKQUOTE> block quote goes here. < /BLOCKQUOTE> </small> <a name="backnote2"><A HREF="#note2">saj</a> <a name="note2"><A HREF="#backnote2">(return)</a>

block quote goes here.
saj (return)
For Paragraph Indentation in HTML:



<!-- Here goes a comment. -->

March 9, 2004
G492
Eric Rasmusen, [email protected]

INSERTING PDF INTO HTML

This method didn't really work for me-- the width wouldn't work. BUt here it is, for reference.

Brad DeLong did it at : http://braddelong.posterous.com/delong-the-modern-revival-of-t . The HTML is a mess, but it looks as if he used some application or add-on called SCRIBD, maybe using Java.

Here is my G492 page:
This Is My Web Page for G492 To Illustrate How To Use HTML

Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.

Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.

But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.

I put some horizontal spaces in front of this paragraph, to indent it.               And I put horizontal spaces just before this sentence too. I'll put some vertical spaces after it. <p>

Lots of useful html commands are at http://rasmusen.org/a/html-rasmusen.htm.

You can email me at Erasmuse@Indiana.edu.

I can make font smaller. Or I can make the font bigger. I can make it very big if I want.

Year  Glob  NHem  SHem    -90N  -24N  -24S    -90N  -64N  -44N  -24N
-EQU  -24S
-44S  -64S Year
2001    48    59    36      76    36    36     101    81    64    35
37    43
21    49 2001
2002    56    67    45      79    51    39     124    96    52    48
53    36
32    71 2002
2003    55    69    40      81    53    31     145   100    46    51
55    30
24    54 2003
2004    48    63    33      73    45    29      75    91    60    49
40    35
23    23 2004
2005    62    82    42     100    54    33     217   119    49    53
55    37
19    56 2005
2006    54    74    34      93    45    28     176   104    58    47
43    38
14    26 2006
2007    56    77    35     106    35    37     203   126    60    35
34    36
6   112 2007
2008    44    60    28      85    25    28     148   101    52    23
28    39
3    52 2008



Below is the input for what is above:

<HTML>

<center>
<B> This Is My Web Page for G492 To Illustrate How To Use HTML</B>
</center>

<br>
<br>
<img src= "faith.jpg" height= 540 align=left>

Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.<p>

Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. <u> We are met on a great battle-field of that war. < /u> We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.<p>

But, in a larger sense, we can not dedicate -- we can not consecrate -- we can not hallow -- this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us -- that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion -- that we here highly resolve that these dead shall not have died in vain -- that this nation, under God, shall have a new birth of freedom -- and that government of the people, by the people, for the people, shall not perish from the earth.<p>

<!-- Here goes a comment. It won't show up in the browser. -->

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; I put some horizontal spaces in front of this paragraph, to indent it. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;& nbsp; And I put horizontal spaces just before this sentence too. I'll put some vertical spaces after it. <br>
<br>
<br>
<br>
Lots of useful html commands are at <A HREF="http://rasmusen.org/a/html-rasmusen.htm"> http://rasmusen.org/a/html-rasmusen.htm</A> . < p>

<I> You can email me at <A HREF= "mailto:Erasmuse@Indiana.edu" > Erasmuse@Indiana.edu. </A > </I > <p>

I can make <small> font smaller. </small> Or I can <big> make the font bigger. </big> I can make it < big> < big> <big> < big> very big </big> </big> </big> </big> if I want. <p> <img src= "http://rasmusen.org/t/2009/morel.ap16.backyard.JPG" height= 280 align=right> <p>

<pre>

Year  Glob  NHem  SHem    -90N  -24N  -24S    -90N  -64N  -44N  -24N
-EQU  -24S
-44S  -64S Year
2001    48    59    36      76    36    36     101    81    64    35
37    43
21    49 2001
2002    56    67    45      79    51    39     124    96    52    48
53    36
32    71 2002
2003    55    69    40      81    53    31     145   100    46    51
55    30
24    54 2003
2004    48    63    33      73    45    29      75    91    60    49
40    35
23    23 2004
2005    62    82    42     100    54    33     217   119    49    53
55    37
19    56 2005
2006    54    74    34      93    45    28     176   104    58    47
43    38
14    26 2006
2007    56    77    35     106    35    37     203   126    60    35
34    36
6   112 2007
2008    44    60    28      85    25    28     148   101    52    23
28    39
3    52 2008



</pre>