LING 408/508: Programming for Linguists

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
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.
Working with Cascading Style Sheets
CS4370/6370 Web Development Cascading Style Sheets (CSS)
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
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)
Using CSS for Page Layout. Types of HTML Elements Block-Level Element –Creates blocks of content e.g. div, h1..h6, p, ul, ol, li, table, form –They start.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
CSS: Cascading Style Sheets. What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
CSS to Know And this is just the beginning. What to What?  Tags = regular HTML  Ids = #id, only one hashtag per page  Class =.class, many as you want.
CSS: Cascading Style Sheets. 2 History HTML tags were originally designed to define the content of a document. The layout of the document was supposed.
Slide 1 of 83 Table Borders To specify table borders in CSS, use the border property. The example below specifies a black border for table, th, and td.
Cascading Style Sheets Example
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
Cascading Style Sheets Billy Toy Cascading Style Sheets Syntax review How to Implement style sheets Background properties Text properties.
CSS Dvijesh Bhatt.
1Computer Sciences Department. And use
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
CSS Introduction Cascading Style Sheets Provides a great deal of control over the presentation of the document HTML indicates both semantics of a document.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
MCS 270 Cascading Style Sheets (CSS) Gustavus Adolphus College.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
CO1552 – Web Application Development Cascading Style Sheets.
CHAPTER 3 CSS & CSS3 อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Floating Elements CS The CSS float property (reference) 2 img.headericon { float: right; width: 130px; } CSS  removed from normal document flow;
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
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.
LING 408/508: Programming for Linguists Lecture 10 September 30 th.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
CSS Fun damentals The Document Hierarchy Element Relationships The Box Model.
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:
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
CSS: Cascading Style Sheets Part II. Style Syntax.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
03 CSS (Cascading StyleSheet) Р.Жавхлан МОНГОЛ УЛСЫН ИХ СУРГУУЛЬ Мэдээллийн технологийн сургууль Интернэт технологийн үндэс 2015 Намар.
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.
CS 120: Introduction to Web Programming Lecture 10: Extra Features and Website Design Part 1 Tarik Booker CS 120 California State University, Los Angeles.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
CSS Layouts: Grouping Elements
Cascading Style Sheets
Cascading Style Sheets (Layout)
Web Systems & Technologies
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Float Property Elements that seem to “float" on the right or left side of either the browser window or another element are often configured using.
Presentation transcript:

LING 408/508: Programming for Linguists Lecture 9 September 23rd

Last Time HTML: webpage content and structure (default style)

Last Time <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>A webpage</title> </head> <body> <h1>A webpage</h1> <table style="border: 1px solid blue"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> </table> <tt><h2>First paragraph</h2></tt> <p> Some text. Some more text. <br> A lot more text is needed to see word-wrap. A <a href="http://google.com">link</a>. <br> <a href="http:google.com"><img width=100 src="https://www.google.com/images/srpr/logo11w.png"></a> </p>

Last Time <p style="font-family: bank gothic;font-size: 60; color:white;background-color:black"> A second paragraph. <ol> <li>First things first. <ul> <li>One</li><li>Two</li> </ul> </li> <li>Second things second.</li> <li>Third things last.</li> </ol> </p> <hr> <address></address> <!-- hhmts start -->Last modified: Thu Sep 18 17:28:57 MST 2014 <!-- hhmts end --> </body> </html>

useful if you apply the same style.css to multiple pages Inline style: <table style="border: 1px solid blue"> <p style="font-family: bank gothic;font-size: 60; color:white;background-color:black"> Cascading Style Sheets (CSS): a language for describing the style of html elements Internal style sheet: <head> <style> table { border: 1px solid blue; } </style> </head> External style sheet: <link rel="stylesheet" type="text/css" href="style.css"> useful if you apply the same style.css to multiple pages

CSS Cascading order (priority: low to high): Default font size: browser default external style sheet internal style sheet inline style general > … > specific Default font size: 1em (different devices) other units: in, cm, mm, ex, pt, px, pc pt = 1/72", pc = 12pt, ex = height of x Jargon: selector { property: value; } CSS comments: /* */ (html: <!-- -->) selectors: html tag e.g. h1, p #id e.g. id="abc" in html tag .class e.g. class="c1" in html tag

CSS Font-family: Generic font families: Links: text-decoration: h1 { font-family: Times, serif } h2 { font-family: Verdana, sans-serif h3 { font-family: Vivaldi, cursive Generic font families: cursive fantasy monospace sans-serif serif Links: html: <a href=http://www.google.com>link</a> a:link { color: #0000cc; text-decoration: none; } a:visited {     color: green; a:hover   {     color: red; a:active  {     color: yellow; text-decoration: none|underline|overline|line-through|initial|inherit (from parent)

CSS CSS selectors: selectors: selector path: div > p div div p property: value; } selectors: html tag e.g. h1, p #id e.g. id="abc" in html tag .class e.g. class="c1" in html tag a:hover a:visited a:link (unvisited) tag:first-child html tag that is the first child of its parent tag:nth-child(N) Nth child of its parent selector path: div > p a paragraph that is immediately dominated by a div. div div p a paragraph that is dominated by a div that is itself is dominated by a div. note: the more specific selector will apply if two or more match #id is most specific * least specific: applies to all html elements

CSS Shapes with div: vertical-align: middle (doesn't work) height: 50px; width: 100px; border: 2px solid black; border-radius: 5px; background: wheat display: block; } display: block full width (by itself) inline-block allow others on line inline shrink wrap none invisible … div { height: 100px; width: 100px; border: 2px solid black; border-radius: 100%; margin-left: 5px; margin-top: 5px; display: inline-block; text-align: center; } vertical-align: middle (doesn't work) applies to tables

CSS Example (css): Example (html): Browser: <style> .outer { height: 100px; width: 100px; border: 2px solid black; border-radius: 100%; margin-left: 5px; margin-top: 5px; display: inline-table; text-align: center; } .inner { display: table-cell; vertical-align: middle; </style> Example (html): <div class="outer"><div class="inner">Box 1</div></div> <div class="outer"><div class="inner">Box 2</div></div> <div class="outer"><div class="inner">Box 3</div></div> Browser: Fix for vertical-align: middle

CSS Boxes have: Example: How to determine sizing: margin border padding (inside content) Example: div {     width: 320px;     padding: 10px;     border: 5px solid gray;     margin: 0; } How to determine sizing: horizontal: width + left padding + right padding + left border + right border + left margin + right margin vertical: height + top padding + bottom padding + top border + bottom border + top margin + bottom margin margin property (# values): margin: top right bottom left margin: top right/left bottom margin: top/bottom right/left margin: all auto (center) value http://www.w3schools.com margin-top, margin-right, margin-left, margin-bottom margins can have negative values

CSS HTML elements can float: Example (css): Example (html): float: none default left float to left right float to right clear: none allow floats left no floats to left right no floats to right both no floats either side Example (css): span { float: left; font-size: 275%; line-height: 85% } Example (html): <p> <span>T</span>his is the very, very first word of this somewhat longish but simple sentence. </p> another method: use the selector p:first-child:first-letter also: play with margin settings

CSS Positioning: Example (html): Example (css): position: static default absolute takes element out of flow, positionrelative to last non-static parent (or html) relative relative to default placement fixed with respect to browser window (scroll) Example (html): <div id="outer"> <div id="inner">Inner Box</div> Outer Box </div> Example (css): #inner { width: 100px; height: 100px; border: 1px solid red; top: 100px; left: 200px; position: absolute; } #outer { width: 200px; height: 200px; border: 1px solid blue; margin-top: 20px; margin-left: 20px;