HTML Notes W3schools
HTML Notes W3schools
W3Schools use lowercase tags because the World Wide Web Consortium (W3C) recommends
lowercase in HTML 4, and demands lowercase tags in XHTML.
Double style quotes are the most common, but single style quotes are also allowed.
Tip: In some rare situations, when the attribute value itself contains quotes, it is necessary to use
single quotes: name='John "ShotGun" Nelson'
However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values
in their HTML 4 recommendation.
Search engines use your headings to index the structure and content of your web pages.
Since users may skim your pages by its headings, it is important to use headings to show the
document structure.
H1 headings should be used as main headings, followed by H2 headings, then the less important H3
headings, and so on.
HTML Comments
<!-- This is a comment -->
Note: There is an exclamation point after the opening bracket, but not before the closing bracket.
Even if <br> works in all browsers, writing <br /> instead is more future proof.
<strong> or <em> means that you want the text to be rendered in a way that the user understands
as "important". Today, all major browsers render strong as bold and em as italics. However, if a
browser one day wants to make a text highlighted with the strong feature, it might be cursive for
example and not bold!
The title attribute is used to show the spelled-out version when holding the mouse pointer over
the acronym or abbreviation.
If your browser supports bi-directional override (bdo), the next line will be written from the right
to the left (rtl):
<bdo dir="rtl">
Here is some Hebrew text
</bdo>
Deleted and inserted text
browsers will strikethrough deleted text and underline inserted text.
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
Or, create a link to the "Useful Tips Section" from another page:
<a href="http://www.w3schools.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
Note: Spaces between words should be replaced by %20 to ensure that the browser will display
the text properly.
<a href="mailto:someone@example.com?Subject=Hello%20again">
Send Mail</a>
<a href="mailto:someone@example.com?
cc=someoneelse@example.com&bcc=andsomeoneelse@example.com&subject=Summer
%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">Send mail!</a>
Tip: It is a good practice to specify both the height and width attributes for an image. If these
attributes are set, the space required for the image is reserved when the page is loaded. However,
without these attributes, the browser does not know the size of the image. The effect will be that the
page layout will change during loading (while the images load).
IMAGE MAP:
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm" />
</map>
HTML Lists
unordered list
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
Ordered List
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>