Top Banner
Review: HTML Dog Beginner Tutorial Tags through Forms
33

Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Dec 23, 2015

Download

Documents

Earl McDonald
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Review: HTML Dog Beginner Tutorial

Tags through Forms

Page 2: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

Page 3: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

• This element is required for all HTML pages• It must be at the top of every page of every website• We’ll see later on why it is important that this is at the top

of every HTML page, but for now, just take it as a necessary standard.

<!doctype html>

Page 4: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

• HTML Tags need to begin at the beginning of every HTML document and close at the end of every document.

• This tag turns the entire page into an element that tells the browser to read all of that content in the HTML language.

Page 5: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

Page 6: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

• Body Tags encase all visible content on the webpage.

• Anything outside of this tag will not be visible on the webpage.

• Information outside of the <body> tags are considered information about the website needed to make the HTML readable.

Page 7: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

Page 8: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tags

• Body Tags encase all visible content on the webpage.

• Anything outside of this tag will not be visible on the webpage.

• Information outside of the <body> tags are considered information about the website needed to make the HTML readable.

Page 9: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Attributes

• Attributes are sometimes put inside of Tags to add extra information. That information is usually stylistic.

• They look like this:

<tag attribute=“value”> Content </tag>

• For now, just know their formatting and relationship to tags. We’ll work with how to use them later.

Page 10: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Elements

• Tags mark the end and beginning of Elements

ELEMENT:

<tag>

</tag>

content

Page 11: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Elements

• Webpages are made up of multiple elements stacked on top of each other.

<tag1>

</tag1>

content

<tag2>

</tag2>

content

<tag3>

</tag3>

content

Page 12: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Document Header

• The elements within the <head> tags are outside of the <body> tags, which means that they contain information about the HTML page that is not visible when the page is viewed on a browser.

• They are not the same as <h1>, <h2>, <h3>, <h4> header tags.

Page 13: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Page Titles

• The <title> element gives a title to the browser window or browser tab.

• It is essential that you use page titles for the clarity of your sites.

Page 14: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Body Formatting

• If you don’t encase any of your browser information that you type into the <body> tag in any other tags, the standard formatting for your page will be 12pt, Black, Times New Roman with no line breaks.

Page 15: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Paragraph Formatting

• Paragraph tags tell the browser to break the information you have typed into the content section in to separated sections.

Page 16: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Strong and Em

• <strong> tags make their content display bold • <em> tags make their content display italicized

Page 17: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Line Breaks

• Line breaks don’t have any content, so they don’t need a closing tag.

Page 18: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Hierarchical Headings

• Headings give automatic bold formatting and increased font size

• <h1> is the largest heading, and should only be used once on a single page

• <h6> is the smallest possible heading• <h2> thru <h6> can be used multiple times throughout a

document.

Page 19: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Hierarchical Headings

Page 20: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Lists

• There are 3 types of lists: ordered, unordered, and definition lists (we’ll focus on ordered and unordered for now)

• Ordered lists use numbers: <ol> <li> … </li> </ol>• Unordered lists use bullets: <ul> <li> … </li> </ul>

• Each item in a list is called a List Item: <li>…</li>

Page 21: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Lists

Page 22: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links

• The opening and closing tags are: <a> … </a> • These are also called anchor tags

• These tags are not enough to make a link: you need to insert the destination of the link with an attribute

• Here is your first instance of using an attribute…

Page 23: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links

• The opening and closing tags are: <a> … </a> • These are also called anchor tags

• These tags are not enough to make a link: you need to insert the destination of the link with an attribute inside the opening anchor tag.

• This is your first instance of using an attribute…

Page 24: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links

This is the first part of your opening tag needed for a link

This attribute name goes inside the opening tag after the anchor

This attribute value goes inside the opening tag after the anchor

This closes your opening tag with your attribute inside it

This is the content that will be click-able to lead you to the site link

This closes the entire link element

Page 25: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links to other websites

• Your attribute value is the web address for a website that begins with “www” and ends with “.com”

• This is basically just a web address:

<a href=“www.htmldog.com”> HTML Dog </a>

• Looks like: HTML Dog

Page 26: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links within your site

• Your attribute value is the name of the file you have created that you want to link to.

• Generally, all .html files will be in the same root folder, so your link code will look like this:

<a href=“internallink.html”> Internal Link </a>

• You can name these links anything you like.

Page 27: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links within your site

• If the .html file you are linking to is organized in a folder called “subfolder” within your root folder, your link would look like this:

<a href=“subfolder/internallink.html”> Internal Link </a>

Page 28: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links within your page

• You can also add links within your page that jump to locations on your page that are harder to find.

• This is usually used for very content heavy pages.• To use these, first place an “id” attribute in one of the

existing element tags that you want to be able to jump to.

• This attribute looks like this:

<p id=“location”> Location </p>

Page 29: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Links within your page

• Next you need to add a link that takes you to the link you have created.

• These links look like this:

<a href=“#location”> Go to location </a>

Page 30: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Images

This is the first part of your opening tag needed to insert an image

This attribute name goes inside the opening tag after the image tag

This attribute value goes inside the opening tag after the attribute name if you are linking to a web-based image

This is an additional attribute that sets the width of the image

This is an additional attribute that sets the height of the image

This attribute is designed to be readable by computer accessibility devices for the blind

This tag closes your image element

Page 31: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tables

This is the opening tag for a whole table

This is an opening tag for a table row Each row usually has multiple cells

This is the opening tag for a table cell

This is the closing tag for a table cell

This is the closing tag for a table cell

This is the closing tag for a whole table

Page 32: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

Tables

If you imagine a 3x4 table,

which is 12 cells, there

should be four <tr> elements

to define the rows and three

<td> elements within each of

the rows, making a total of

12 td elements.

Page 33: Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.

PRACTICE!

• http://www.htmldog.com/guides/html/beginner/