back to coding

see also:
javascript
css

HTML is the language of a web page, it determines what you have to display. It is used together with css, which is how to display it. Formatting and styles are css. And what it does is determined by javascript, a complete programming language. All three of those together and you can make a web page that looks like or can do anything. This is known as the front end.

There is also a back end which is the web server. There are many ways to transmit or serve a web page to a browser. It can accept form elements and other input too from pages using http or https. There is a protocol called CGI which connects a web server to an external program using environment variables. I'm using that with lua. Lua can use a database like sqlite to save and restore data.

Mozilla Developer Network - https://developer.mozilla.org/en-US/docs/Web/HTML
HTML5 living standard - https://html.spec.whatwg.org/multipage/introduction.html

An interesting out of date tutorial I found https://tilde.club/~cslug/tutorial.htm. Uses some layout tags that are usually done with css now.

HTML is now version 5, which changed to a living standard, meaning they keep version 5 up to date instead of stopping and releasing new versions anymore.

comment:
<!-- comment -->

header to use to make mobile scaling and specify unicode character set:
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

Use <!doctype html> to select standards mode and not quirks mode
Quirks mode is the layout mode that exists to help with backwards compatibility, if you leave that mode it will imitate browsers behavior before they were standardized. If you set it to standards mode it will be more predictable and look the same on different browsers that conform to the standards. A good idea to always remember this.

to link in css:
<link rel="stylesheet" href="reminder.css">

html entities:
less than sign - &lt; <
greater than sign - &gt; >
and sign - &amp; &
single quote - &apos; '
double quote - &quot; "
left smart quote - &ldquo; “
right smart quote - &rdquo; ”
right smart single quote - &rsquo; ’
non breaking space - &nbsp;  
decimal code - &#34; "

simple formatting (use css for most other formatting)
<b> bold </b>
<i> italics <i>
<u> underline <u>

older tags and attributes (pre-HTML 5, use css instead)
<center> centered </center> - should use inline style for that, <div style="text-align: center">centered</div>
centered
align attribute - can be set to left, right, center, justify. use text-align css. Attributes are set on the tags, so something like <p align=right>your text here<p> would be used.

your text here

bgcolor and color attributes - set to a color name or a hex value like #FF0000. use background-color css.
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
border attribute - can be set to 0 to remove or a number for the size. Use css border
height and width attributes - these are still useful especially on images. They are in px.
font tag - set face attribute to set a font. <font face="Verdana" size=4 color=blue>My Text</font> My Text
The size value ranges from 1 to 7, with 3 as the default size.

Now back to normal non obsolete tags

image - <img src="/img/faerie4.jpg">
audio - <audio controls src="/img/Three%20Chain%20Links%20%96%20Die%20Historic%20%2DSynthwave%2D%2Emp3"></audio>
The audio was provided by https://royaltyfreeplanet.com and somewhere on that page it asks to be attributed to use their music so there.

link - <a href="http://kandyneko.com">My web site</a> My web site
<p>Paragraph</p> - it makes a block
line break <br>
<div>Div</div> - div makes it a block
<span>span</span> - set up an inline style that doesn't block.
<pre>Preformatted text</pre>
spaces can show in between these tags and the text is mono spaced. It makes a block.
url
http://kandyneko.com/pages/index.lua#anchor?filename=main&css=1
http:// - protocol
kandyneko.com - site (if you leave off protocol and site, it's the current site)
/pages/ - path (if you don't begin with a / it's relative to the path you are at.)
index.lua - page name (can even omit this if the server assumes a page name like index.html or index.lua)
#anchor - a place in the page marked with <a name="anchor">
?filename=main - field name and value used with get form method
&css=1 - additional field names and values with get form method

special characters should be encoded with hex such as %20 for space

table
<table>
header row
<tr><th>header1</th><th>header2</th></tr>

detail row
<tr><td>detail1</td><td>detail2</td></tr>
<tr><td>detail3</td><td>detail4</td></tr>
</table>

unordered list
<ul>
<li> Point </li>
<li> Point </li>
<li> Point </li>
</ul>

body tag or other tag can have contentEditable attribute set to allow you to edit it

Example (in <code> tags, a style element that does not block)

<!doctype html>
<html>
<head>
<title>Example page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="sortable.js"></script>
<style>
p {
text-indent: 2in;
}
</style>
<body>
<p>Hello, it's my page.</p>
<form name="form_name" action="form-page.lua" method="post">
  <input name="field1"> Thing </input>
  <textarea name="text1" rows=40 cols=80> Some stuff in a text area </textarea>
  <input type="submit" value="Submit"></input>
  <input type="button" id="button1" value="Do Script" onclick="dosomething()" class="my_button"></input>
</form>

</body>
</html>