0 Overview - Web Programming
Classroom Programming
Other Languages
page was last updated: Sep 15, 2017 21:42
forum
sorry ): this page is incomplete. feel free to ask me directly for any help ^_^
HTML LA3

This page is just basic info. If you ever need some examples of what you can or cant do, just visit a page and view it's source. This may be difficult on many modern sites due to their heavy use of javascript to generate everything (try inspect instead which shows the resulting html). In that case, all/almost all of the web pages I write are mostly plain html/css/some tiny amounts of javascript.

Demo of all of the common ones.

head

Not shown at all. Put all scripts, metadata, pre-page stuff here.

<meta charset="utf-8" />
Sets the page to unicode.

<meta name="Keywords" content="cheese" />
Keywords for search engines or SEOs.

<link href="/style.css" rel="stylesheet" type="text/css">
Links a style sheet to be used. (CSS)

<link rel="icon" type="image/x-icon" href="/favicon.ico">
The icon to be used for bookmarks/favorites or tabs.

<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
This allows the browser to resize the page if necessary. Espicially helpful for mobile.

<title>The Title</title>
This sets the title of the page that you see in the title bar, tab label, or bookmark.

Attributes

<div id="sdf" style="color: red;"> content</div> ^ ^ ^- attribute value | |- attribute name |- tag

Attributes are pieces of data that go along with the tag. These can contain anything from width, inline style info, javascript, and even arbitrary data. Most of the time this will just contain id if anything for the usual tags. Some tags like img or a, required attributes to work.

body

Basically, everything else. You could technically put more after the body but that's not normal. I'm not going to actually go over all of the possibilities in here. Head to the demo page (link above) for this.

layout

in the old days, tables were used to handle the layout on pages. DON'T DO THIS ANYMORE PLEASE!!! Tables hold DATA. Not everything on the page.