HTML

Here is aĀ handout of most if not all of the html tags we will cover this semester. Please take a look and see if you have any questions.

HyperText Markup Language, orĀ HTMLĀ is a text language, specifically designed and written for the web. It provides the STRUCTURE of the page you see. In order to style html, we will use CSS or cascading style sheets.

Just to be clear:

HTML = Structure

CSS = Presentation

HTML Tag Structure

The structure of the HTML tag

Screen Shot 2012-09-30 at 7.01.44 PM

RULES TO FOLLOW:

  • All tags are lowercase, and there is anĀ opening tagĀ such as <p> then aclosing tag, that is marked with a back slash </p>
  • HTML is made up of elements (or tags) and attributes of those elements. Attribute tell the browser how to display whatever you have inside the tag.
  • All elements are contained in angle bracketsĀ <>
  • Attributes are included in the tag after a space.

HTML Page Structure

html-structure

Structural Tags

  • TheĀ doctypeĀ tagĀ tells the browser what kind of page it is dealing with
  • TheĀ HTML tagĀ starts the page
  • TheĀ head tagĀ is the outermost part of an HTML document. It contains information about the page that is not displayed on the page
  • TheĀ meta tagĀ contains information for search engines, telling them what the page is about
  • TheĀ title tagĀ is just that, the title that appears at the top of browser window and what first appears on search engine results
  • TheĀ style tagsĀ contained here tell the page how to appear overall.
  • TheĀ body tagsĀ contain everything that will appear on the page for the visitor
  • TheĀ html tagĀ ends the page

Semantic Markup

If you look at the code, you see tags such asĀ <p>Ā andĀ <h1>. These are text tags that tell the text how to fall onto the page. HTML is used to give the page structureā€“later in the semester, we will use CSS to style them. Use the tags provided to create clearly structured pages. Choose the element that most accurately describes the content you are structuring.

<p> </p>Ā is the paragraph tag. All text that is in a paragraph is placed inside these tags.

<h1> </h1>Ā is the tag for the first header style. H1 is reserved for the largest, most important header or title. H2 is smaller, h3 smaller still. There are 6 levels of headings in HTML (h1, h2, h3, h4, h5 and h6).

<strong> </strong>Ā is for bolding text.

Colors

HTML colors are expressed in hexidecimal code.

Here is aĀ list of html color codes.Ā In order to change the color, you need to copy the hex code of the color you need and paste it over the color code already in the file.

Links

Link tags start withĀ <a>Ā and end withĀ </a>

Here are some links:

<a href=ā€mailto:ā€>Contact Me</a>

<a href=ā€http://www.citytech.cuny.edu/ā€ target=ā€_blankā€>My School</a>

Email links look like this

<a href=ā€mailto:lclarke@adgaintroweb.comā€>Contact Me </a>

Plain links look like this

<a href=ā€http://www.citytech.cuny.edu/ā€ target=ā€_blankā€> Some text here </a>

Target refers to which window you want the link to appear in: ā€œ_blankā€ makes the link appear in a new window. If you do not specify a target, the link appears in the same window as your site had been.

Images

Look at this tag:

<img src=ā€images/city_tech_logo_banner.gifā€ width=ā€277ā€³ height=ā€84ā€³ />

imgĀ is the tag that indicates that there is an image being called to the page

srcĀ indicates the path to that image. The path for this image means ā€œinside the folder images, there is a file called city_tech_logo_banner.gif.ā€ You need to include the width and height of the image as well.

Leave a Reply

Your email address will not be published. Required fields are marked *