Pages

Wednesday, February 8, 2012

HTML Notes Day 2



Syntax means having proper values and quotes for coding. It's similar to having proper sentence structure in essay writing.

Saving an .html document through Text Edit or Notepad should be saved with a hyphen.
This is helpful with search engine optimization (SEO).


A line break tag is: <br  />
It's an empty element. A <br> and a </br> can't be used. The computer will search for the latter but it won't find one. It must be made to look different and that is why the <br /> is used.

The horizontal line: <hr />
This is also an empty element. This will give the heading a horizontal line behind it.
For example:
<h1>About Me</h1>
<hr />

You can add this to the horizontal rule to make it a certain size! 
<hr width="75%" /> 

<em> means emphasis. So the typography will become italicized.


You can power up a tag. There can be left, right and center.
<p align="center">
<tag attribute="value">

The attribute and value get placed into the first tag, not the ending one.
For example:
<p align="center"><em> This page is an overview of my work and interests.<strong> If you have any questions, please contact me at (insert e-mail).</strong>
</p>

Adding more Attributes:
<h1>About Me</h1>
<hr width="200" align="left"
size="10"/>

Line under heading won't be shaded:
<hr no shade width="200" align="center" size="10" />

Comment Tag
<!--insert comment-->
Most useful for when you need to write something like Headings so you know yourself where your heading tags begin. Also very useful when you want to store some codes but don't want to activate them now. So you would start out with the tag and then put a bunch of codes.
<!-- Enter codes-->

Deprecated Tag
W3C World Wide Web Consortium comes up with all the standards.
<center>
...
</center>
The font tag is also a deprecated tag. They come out with there's a better way to do it.
CSS is presentation oriented (font, color) while HTML is structure oriented.
CSS has different instructions:
h1 has {color:blue;}
p
{fontfamily:verdana;}

It's still useful to know the old version such as the font tag that's old because you might use an admin tool or something.

An example with color, font face and size:
<font face="Helvetica" size="6"
color="blue"> Hey Read This </font>
* use common fonts that will show up on standard computers
_____________________________________________________________________________

Sample HTML Coding In-Class Assignment
 
<html>
<head>
<title>About Me - (insert name)
</title>
</head>

<body>

<p> This page is an overview of my work and interests.<strong> If you have any questions, please contact me at (insert e-mail).</strong>
</p>

<h1>About Me</h1>
<p>This is where you would insert a paragraph about yourself.</p>

</body>
</html>

0 comments:

Post a Comment