HTML Hyperlinks, HTML Styles, HTML CSS

0 63

HTML Hyperlinks, HTML Styles, HTML CSS tutorial

in this tutorial you will learn about HTML Hyperlinks, HTML Styles, HTML CSS

HTML Hyperlinks

Every website is a consist on large amount of web pages these all pages are link with each other through linking when a user clicked on required web page it will jump from one page to another page. These tasks can be achieved by creating hyperlinks in HTML. The a (anchor) element is used to create hyperlink in HTML, we can specify text or image as a hyperlink, whenever user move over such content than courser will change into hand.

<a> anchor tag attributes are

Attribute Description
href Specifies the URL of the Web page to be linked or the value of the name attribute.
hreflang Indicates the language of the destination URL.
name Specifies the section of the Web page which is to be linked.

HTML Target Attributes

Target Attribute specify the location of the linked web page will open, when clicked its link. You can assign value to the target attribute.

Value Description
_blank opens your target URL in a new blank window.
_self open your target URL in the same window as that of the current Web page.
_top opens you target URL in the complete area of window.

HTML Hyperlink to an E-mail Address

We can even apply hyperlink to email address as the same way they can be given for web pages, To add an email to a hyperlink the href attribute must be used followed by mailto:email address.

To automatically add subject line in your new email message the ?subject= attribute used after the email address.

HTML Hyperlink to Other files

In HTML you can make hyperlink of others files such as zipped files (.zip), executable files (.exe), documents (.doc), PDF reader files (.pdf), graphical .jpg .gif and so on.

HTML Styles

Every html element has a its own default style like text color black, background white etc. we can change this default styling in html using style attribute, using style attribute not only we can change color also we can give height width positioning, margin, padding etc.

HTML Text Color

Using color property with style attribute we can change text color.

HTML Text Size

Using font-size property with style attribute we can change text size.

HTML Text Alignment

Using text-align property with style attribute we can set horizontal text alignment for element.

HTML Fonts

Using font-family property with style attribute we can set any font for element.
Note <font> tag not supported in new html 5 version.

HTML CSS

CSS cascading style sheet language informs to browser how to present content of the document and how it’s should looks like.in other word html defines content of the webpage where CSS defines how element are to be displayed in browser.
General syntax of CSS consist of three parts and there are selector, property and value.

HTML CSS

Types of CSS Style Sheets

There are three types of CSS style sheets and namely there are inline, internal or embedded, and external style sheets. but the most common and recommended way is keep CSS file separate and add that file link in head element.

CSS inline Style

An inline style placed directly in HTML element by using style attribute ,a web designer can’t reuse inline style at any point of time in webpage anywhere.

CSS internal or embedded

An internal or embedded styles are placed in head element to define a common style for your html elements. These styles can be re-used in the same Web page in which they are placed.

CSS external style sheet

External style sheet always defined in a separate file with extension of .css. External style sheet provides the benefit of reusability of implementing common style rules for multiple HTML pages. External style sheet widely used and recommended way also to reuse the css anywhere in your webpage.

HTML class Attribute

To define a special type of css style to html element class Attribute is used.

HTML id Attribute

To define a special type of css style to one Html element id Attribute is used.

CSS Box Model

To define a border around your element the border property used.

CSS padding

padding property will define space inside table or border.

CSS margin

margin property will define space outside table or border.

Comments

comments

Leave A Reply

Your email address will not be published.