INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets
Advertisements

Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
Tutorial 4 Formatting Text. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Create a spread heading Indent text Change the line spacing.
Chapter 6 Web Typography
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Week 7 Web Typography. 2 Understanding Type Design Principles.
Let’s do it with Style! Fonts, Colors, and Graphics CSCI 202 Day 1 (Fall 2014) Font/Colors CS
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Web Design & Development Cascading Style Sheets (CSS)
CSS – CASCADING STYLE SHEETS Making your XHTML webpage look good.
Using Cascading Style Sheets CSS Basics. Goals Understand basic syntax of Cascading Style Sheets (CSS) Understand basic syntax of Cascading Style Sheets.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML: PART ONE. Creating an HTML Document  It is a good idea to plan out a web page before you start coding  Draw a planning sketch or create a sample.
+ Text & Font Styles Unit 3 Lesson Different Font Categories Sans Serif – block style fonts Example - Rockwell Easy to read and good to use when.
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Principles of Web Design 6 th Edition Chapter 5 – Web Typography.
Cascading Style Sheet (CSS)
1Computer Sciences Department. And use
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
WORKING WITH CASCADING
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
ITP 104.  Basic HTML using and form  Using Filezilla  public_html ▪ 755 permission  Have a directory name itp104 ▪ 755 permission  classpage.html.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
Chapter 2 Web Page Design Mr. Gironda. Elements of a Web Page These are things that most web pages use.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Cascading Style Sheets Objective: Create an external style sheet, embedded style sheet, and an inline style to change the look and feel of a web site.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
Cascading Style Sheets Web Design Fairport High School.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
CSS Cascading Style Sheets *referenced from
CSCE Chapter 3 (Cascading Style Sheets) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department of Computer.
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Chapter 7.  Change body and link styles  Create a drop-down menu  Change color and font styles in the menu  Create a pop-up effect using CSS  Utilize.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
CSS Layouts CH 13.
Cascading Style Sheets (Formatting)
Second CSS Lecture Applications to XML
Cascading Style Sheets Color and Font Properties
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Cascading Style Sheets
Session IV Chapter 15 - How Work with Fonts and Printing
Presentation transcript:

INTRODUCTION TO HTML5 Styling Text

Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead of going through your document and changing each instance of a tag, you can use the style sheet rule to change the font size for all uses of the tag in your document.  The font-size property accepts a variety of measurement units. Points(pt)Pixels(px)Millimeters(mm)Centimeters(cm) Inches(in)Picas(pc)X-height(ex)Em space(em) xx-smallx-smallsmallmedium largex-largexx-large

Indent Text  You can indent the first line in a paragraph using the text- indent property in a style rule.  You can set the indentation as a specific measurement value or as a percentage of the overall text block width.

Change the Color of Text  You can use the color property to change the color of text in your web page.  You can specify a recognized color name, a hexadecimal color value, or an RGB value.  You can change the text color to make it match the theme of your website.  You can use color to emphasize important content, such as alert text or error message.

Change the Color of Text

 Hexadecimals codes can be used to generate millions of different colors.  The three pairs of digits or letters after the # control the amount of red, green, and blue in the color, respectively. Color NameHexadecimal ValueColor NameHexadecimal Value Aqua#00FFFFNavy# Black#000000Olive# Blue#0000FFPurple# Fuchsia#FF00FFRed#FF0000 Gray#808080Silver#C0C0C0 Green#008000Teal# Lime#00FF00White#FFFFFF Maroon#800000Yellow#FFFF00

Change the Font  You can specify a font by name in the font-family property.  Because not all fonts are available on all computers, you can designate a second or third font choice.  That way, if the computer does not have the first choice installed, the browser tries to display the next choice instead.  For best results, assign multiple font choices and be sure to include a common font, such as Arial, Verdana, Courier, or Times New Roman.

Change the Font

Change Text Alignment  You can control the horizontal positioning of blocks of text in your page using the text-align property.  You can use this technique to align paragraphs, headings, tables, and other elements.  You can align text to the left or right, center the text, or create justified text.  By default, most browsers align text to the left.

Change Text Alignment

Change the Text Case  You can use the text-transform property to change the text case for a tag.  For example, you may want all text to appear in all capital letters.  You can choose from four case value: capitalize, uppercase, lowercase, and none.  Use the capitalize value if you want the first character of each word to appear capitalized.  The none value cancels any case values the text may have inherited from surrounding HTML tags.

Change the Text Case

Control Line Spacing  You can use the line-height property to adjust the spacing, or leading, between lines of text.  Adjusting line spacing can make your web page text easier to read.  The line spacing value can be specified as a multiple of the height of the element’s font.  It can also be specified as an absolute value or a percentage.  Be careful when applying small values because this can result in overlapping lines.  Line spacing cannot have a negative value.

Control Line Spacing

 The above example uses a value of 2.0 to make the spacing two times the current font height.  You can also set a percentage or an absolute value, such as 10px, for the spacing.

Control Line Spacing

Control Letter Spacing  You can control the spacing between characters, or kerning, using the letter-spacing property.  Letter spacing changes the appearance of your text by increasing or condensing the space between letters.  You can specify letter spacing in points (pt), pixels (px), millimeters (mm), centimeters (cm), inches (in), picas (pc), x-height (ex), or em space (em).  Negative values condense the space between letters, with high negative values causing letters to overlap.

Control Letter Spacing

Add Background Colors  You can use the background-color property to change the color that appear behind the context on a page.  For example, you can change the background behind text to a fluorescent color to make it appear as if the text has been highlighted with a marker.  You can specify the color by name, hexadecimal color value.  To add a background color to just a few words of a paragraph, you can apply the property using the tag and a CSS class.  To add a background color to an entire page, you can apply the property to the tag.

Add Background Colors

Add Background Colors to a Page  Add a style sheet for the page to the tag.

Add Background Colors to a Page  You can use the background property to apply a background color.  The difference between the background and background-color properties is that you can use background to specify additional style information such as an image to display in the background.

Style a Bulleted List  You can add style rules to bulleted lists on your pages to change the shapes of the bullets or remove the bullets.  You can also change how the list items are formatted so that they appear in a horizontal line across the page instead of as a vertical list.  These CSS techniques are often used when creating navigation links on a page.  Navigation links are commonly defined as a list of unordered links using the tag.

Style a Bulleted List  Define a CSS class for the and tags.  Available bullet types are disc, circle, square, and none.

Style a Bulleted List

 You can create your own custom bullets in an image editor, save them as images, and apply them to your bulleted lists.  This style replaces the default list bullets with the image.  The web browser looks for the image in the same directory as the style sheet.  You can add images/ to the beginning of the image file name to have the browser look in an images subfolder.