Website running from /root/website
http://designftw.mit.edu/path/to/resource
URL points to /root/website/path/to/resource
URLs with some parts omitted because they are the same as another URL (usually the current location)
../../../
) would be hard to maintain.
Basically, think of what would allow you the maximum flexibility to move files around without having to modify URLs.//
)Some URLs to try:
../..
/index.html
img/alice.jpg
https://google.com
..
with https://google.com
as the base
/labs/1/img/rocket_arc.jpg
. If a URL
begins with a /
then it is assumed to start at the
document root of your website.
img/rocket_arc.jpg
. If a URL does not begin
with a /
then it is assumed to begin at the current
path.
<p So she was considering
should be
replaced with <p> So she was considering
.
em
tag on Synonym: does not have a back
slash.
id
attribute defines an identifier which must be unique to the whole document.id
attribute is case sensitive.#id
<a href="#site_title">Title</a>
refers to an element with id="site_title"
We can anchor a link to an element on another page by suffixing the link with #id
https://en.wikipedia.org/wiki/HTML#Elements
The browser will scroll the element associated with the anchor into view. In this case the element has the attribute id="Elements"
These types of links are used on Wikipedia in the table of contents to scroll to sections of the document.
input
element.input
.
<label>Name<input type="text"></input></label>
<label><input type="checkbox"></input> Accept Terms.</label>
<label for="username">Name</label>
<input type="text" id="username"></input>
for
attribute on a label
element to reference a form element by it's id.
Each of the inputs used here is semantically incorrect in some way.
In the first input we want time of day, the type should be
time
not date
.
In the second input we have a couple of issues. We probably do not
want to sell anything for a negative price so the min value should
be 0. The main issue for this input though is the step. If we
try to increase the price we get fractions of a cent. In most cases
we probably want to round to the nearest cent. So step
should be changed to .01
. We may also want to remove
the max value.
In the third input we probably do not want a range slider although the min and max values are reasonable for 6 digit zipcodes.
<head>
<link rel="stylesheet" href="https://get.mavo.io/mavo.css"/>
<script src="https://get.mavo.io/mavo.js"></script>
</head>
mv-app
attribute.
<main mv-app="yourAppName">
...
</main>
property
attribute tells Mavo which elements are saved and can be used in expressions.
[5 + 5]
evaluates to 10.[5 + age]
evaluates to 5 + the value of the age
property.[list(1, 2, 3)]
[list(1, 2, 3) + 1] = [list(2, 3, 4)]
[list(1, 2, 3) = list(3, 2, 1)] = [false, true, false]
[list(1, 2, 3) where list(true, false, 1)]
prints out [list(1, (empty), 3)]
[list(1, 2, 3) where list(true, false, true) = false] = [(empty), 2, (empty)]
mv-multiple
attribute indicates to Mavo that an element is repeatable.
<article property="todo" mv-multiple>
<input type="text" property="description"/>
<input type="date" property="due"/>
<input type="number" property="workTime"/>
</article>
python -V
python -m SimpleHTTPServer 8000
python -m http.server 8000
localhost:8000
in your browser