we know that every (non-empty) tag must be closed
what if one is not closed?
how will a web browser or a mobile browser, or Google, or other tools that read HTML interpret that markup?
<p>… the <a href="http://www.w3.org/">
<abbr title="World Wide Web
Consortium">W3C</a>,
the group that …</p>
- Which one is the correct render ?
… the W3C, the group that …… the W3C, the group that …
HTML Validation will prevent rendering inconsistency errors in different browsers!
a tool that compares our document against the rules of HTML markup and tells us if there are any problems
the best validator to use is http://validator.w3.org/
when two pieces of software are communicating
If both sides uphold their end of this bargain, everything should be transmitted correctly and there should be no errors or miscommunication
CLAIM: considering this principle, all the sentences provided here carry the same information,
do they really do so ?
used to refer to images
so they can be displayed on the page
<img src="http://example.com/vacation.jpg" alt="My vacation" />
Different types of relative addressing
<p>
<a href="nextpage.html">next page</a>
<img src="happy.png" alt="happy face" />
</p>
<p>
<a href="vacations/europe.html">European vacation</a>
<a href="vacations/pictures/eiffel.jpg">
us at the Eiffel Tower
</a>
<img src="vacations/pictures/eiffel.jpg" alt="Eiffel Tower" />
</p>
<p>
<a href="../menu.html">back to the menu</a>
<a href="../../submenu.html">back to the submenu</a>
<img src="../../vacations/pictures/big-ben.jpg" alt="Big Ben" />
</p>
Character | Reference | Description |
---|---|---|
< | < | less-than (usually starts a tag) |
> | > | greater-than (usually ends a tag) |
& | & | ampersand (usually starts a reference) |
" | " | double quote (usually wraps attribute values) |
' | ' | apostrophe/single quote (can wrap attribute values) |
Character | Reference | Description |
---|---|---|
€ | € | Euro sign |
© | © | Copyright symbol |
“ | “ | left double-quote |
” | ” | right double-quote |
… | … | ellipsis |
λ | λ | Greek lowercase lambda |
✓ | ✓ | checkmark |
You can put any of the characters mentioned in
https://dev.w3.org/html5/html-author/charref
inside your HTML code
I was told that <abbr title="A "great" thing">AGT</abbr>
costs >€70. I wonder if it will really be “great”
& if it will be worth it… probably not. 😆
<b> | is for bold which also looks <strong> |
<blockquote> | is of indented quoting |
<br/> | is for line break |
<center> | is for centring on the page |
<h#> | is for heading, from 1 to 6, e.g. h1, h2, h3… |
<hr/> | is for horizontal rule |
<i> | is for italic (same as <em> is for emphasis) |
<p> | is for paragraph |
<pre> | is for pre formatted text |
<q> | is for quoting texted (for citations) |
<tt> | is for typewriter spacing (monospace), not = <pre> |
<u> | is for underline |