Presentation is loading. Please wait.

Presentation is loading. Please wait.

Links Building a Website Lesson 5. Links There are various ways to use links on a website: Link to other sites Link to other pages on the same site Email.

Similar presentations


Presentation on theme: "Links Building a Website Lesson 5. Links There are various ways to use links on a website: Link to other sites Link to other pages on the same site Email."— Presentation transcript:

1 Links Building a Website Lesson 5

2 Links There are various ways to use links on a website: Link to other sites Link to other pages on the same site Email links Open links in a new window Link to a specific part of another page

3 Linking to Other Sites Links are created using the element, which has an attribute called href The value of the href attribute (what’s inside the “ ”) is the page that you want people to go to when they click that link. The full website (absolute URL) must be typed within the “ ”. Instead of google.com, you must use http://www.google.com Google

4 Linking to Other Pages on the Same Site When you are linking to other pages within the same site, you do not need to specify the domain name in the URL (Uniform Resource Locator). You can use a shorthand known as a relative URL. If all of the pages of the site are in the same folder, you can just use the file name. Home About Movies Contact Home About Movies Contact

5 Email Links To create a link that starts up the user’s email program and addresses an email to a specified email address, you use the element with the href attribute. This time, the value of the href attribute starts with mailto: and is followed by the email address you want the email to be sent to. Email Mrs. Chavez

6 Opening Links in a New Window If you want a link to open in a new window or tab, you can use the target attribute on the opening tag. The value of this attribute should be _blank You Tube (opens in new window) You Tube (opens in new window)

7 Linking to a Specific Part of the Same Page At the top of a long page, you may want to add links to sections on the bottom of your page You may also want to add a link from part way down the page to back up to the top to save users from scrolling all the way up Before you can link to a specific part of the page, you need to identify the points on the page that you will link to To identify points, you must use the id attribute. This can be used on every HTML element. To link to an element with an id attribute, use the element again, but the value of the href attribute starts with # followed by the value of the id attribute you want to link to.

8 Classes I Teach Math Science Coding Math 8 th grade common core standards at Los Nietos Middle School Science 8 th grade California science standards at Los Nietos Middle School Coding Introduction to coding with HTML, Minecraft, and Bootstrap Top Classes I Teach Math Science Coding Math 8 th grade common core standards at Los Nietos Middle School Science 8 th grade California science standards at Los Nietos Middle School Coding Introduction to coding with HTML, Minecraft, and Bootstrap Top

9 Exit Ticket


Download ppt "Links Building a Website Lesson 5. Links There are various ways to use links on a website: Link to other sites Link to other pages on the same site Email."

Similar presentations


Ads by Google