{ LearnWebSiteDesign.com }
HTML, XHTML CSS Tutorials and Free Website Templates
Tutorial on How To Include CSS in HTML Documents
There are 3 ways to embed styles in web pages:
- external style sheets
- internal style sheets
- inline styles
Video Tutorials:
View our video tutorials to learn how to create HTML forms, text-fields, password fields, submit buttons and textareas.
External Style Sheets
External style sheets allow you to be able to make changes to the look and layout of multiple web pages by making changes to only one style sheet.
An external style sheet is a text file with a .css extension, for example, style_sheet.css. External style sheets should not contain any HTML code, only CSS rules. An example of a cascading style sheet is shown below:
Each web page that links to the external style sheet must do so using the <link> tag. The <link> tag goes inside the <head> section of HTML documents. The <link> tag is a self enclosing tag which means that the tag must end with an blank space followed by a forward slash (<link />). The tag must also contain the property rel with an attribute of text/css and also the property href with the value being the external style sheet that the web page is linking to.
An example of how this is shown below. The external style sheet that is being linked to in this example has the name of styles.css.
NOTE: Do not leave spaces between the property value and units. For example, margin:5px; will work in all web browsers as they should while margin:5 px; will work in Internet Explorer but will not work in Firefox or Opera.
Internal Style Sheets
Internal style sheets, also called embedded style sheets, is a way to embed CSS rules within HTML documents using the <style> tags. There must be an openning <style> tag and a closing </style> tag. The openning <style&g; tag must include the type attribute with a value of text/css.
The example below shows you how to embed an internal style sheet.
Inline Styles
Inline styles do not offer the same benefits of external style sheets or even embeded style sheets. Inline style sheets allow you to style one HTML element within an HTML document by including the style property within an HTML element.
The code example below shows you how to do this. It will give style the paragraph giving the text the color of red and a font size of 18 pixels.
Tutorials
Templates
References
Sponsors
You can get your website online using Velnet, a leading UK web hosting provider. They provide free template and installation for WordPress blogs. Discuss webmaster related topics at Webmaster Serve, a Webmaster SEO forum
SouthernWebGroup.com provides high quality website design in Atlanta, GA as well as around the world.
Find low cost cheap website hosting and domain registration.
Browser our free no ads web hosting directory and find the free web hosting that's right for you and your budget.
Advertise your web design and web development related products and services here.
- Web Hosting UK
- Web Design Manchester
- Cheap Web Hosting
- free website hosting reviews
- ecommerce design
- Advertise
Recommended
Download free css web hosting templates that are easy to edit at FreeWebHostingTemplates.com.
Friends
- free web hosting templates
- free web hosting templates
- free web hosting reviews
- Web Development
- HD Wallpapers
- best web hosting providers
- Web Hosting Blog
- domain names
- iPage Host Reviews
- Reliable Bluehost Reviews
- Programming Forum
- Alojamento Web
- criar sites
- Free Facebook Banners
- Free No Ads Web Hosting Reviews
- Cheap Web Hosting Reviews
- Free Web Hosting Templates
- Free Premium Wordpress Themes
- Free Premium Wordpress Themes
- Free Joomla Template
- Free Wordpress Themes
- Best Android Apps
- Wordpress Themes Gallery
- Information technology courses
- Free PSD Files