COMP 101 Review.

Slides:



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

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
FORMATTING IN CONTEXT. FOLLOW UPS ANCHOR POINTS MUST BE UNIQUE  If you have more than one, how does it know where to go?  They can be repeated across.
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.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Need to define two things: › The destination › Something to click on to get there  Tag is click here  Can be text, special character or image (next.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Design, Formatting, CSS, & Colors 27 February, 2011.
4.01 Cascading Style Sheets
INFSCI  Start with a template base structure  Think about how to structure your document using headers, paragraphs, divs, unordered lists, imgs.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Doman’s Sections Information in this presentation includes text and images from
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Developing Web Applications with HTML and CSS “Selectors and Properties”
IS1825 Multimedia Development for Internet Applications Lecture 12: IDs, Classes and Internal CSS Rob Gleasure
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.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets
Cascading Style Sheet.
More CSS.
HTML Basics.
4.01 Cascading Style Sheets
( Cascading style sheet )
Semester - Review.
Google fonts CSS box model
Unit 3 - Review.
Cascading Style Sheets
Display Property.
Cascading Style Sheets
Box model.
Cascading Style Sheets (Layout)
Intro to CSS CS 1150 Fall 2016.
Links. Links Links Need to define two things: The destination Something to click on to get there Tag is click here Can be text, special.
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
Cascading Style Sheets
CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
6 Layout.
Intro to CSS CS 1150 Spring 2017.
Google Fonts Selective Formatting
CSS Box Model.
Links.
DynamicHTML Cascading Style Sheet Internet Technology.
More CSS.
محمد احمدی نیا CSS محمد احمدی نیا
DynamicHTML Cascading Style Sheet Internet Technology.
Web Development & Design Foundations with HTML5
Links.
Box Model.
Web Development & Design Foundations with HTML5
CSS and Class Tools.
4.01 Cascading Style Sheets
Web Programming and Design
Introduction to Styling
CGS 3066: Web Programming and Design Fall 2019 CSS Extra
Presentation transcript:

COMP 101 Review

Topics page structure validation file structures box model centering lists links selective formatting colors

Page structure

Page <!DOCTYPE html> <html lang=“en”> <head></head> <body></body> </html>

Head <head> <title></title> <meta> <link> <!– CSS and google fonts --> </head>

Body <body> <header></header> <main></main> <footer></footer> </body>

validation

Validation error = something wrong Validater tries to fix Adds tags that aren’t closed If tag in wrong context, will create context <p> in head <ul> in p Complains if not told everything Language Character set

File Structures

Need to organize information Folders contain files To find a specific file, need to identify the folder it is in Folders can hold files or other folders Think of the path as a set of google map directions: takes you step by step Always starts you where you are Analogies Finding a room A person’s name Folder/folder/file.ext (only files have extensions)

Box model

Box Model Margin – clears an area around the border. Does not have a background color – it is transparent Border – a border that goes around the padding and content. Affected by the background color of the box. Padding – clears an area around the content. Affected by background color of the box Content – the content of the box, where text appears. Don’t forget to give the border some sort of style! <div> this is a div with some text <br/> In fact, this text has two lines <div> div { width:220px; padding:10px; border:5px solid gray; margin:0px; }

Chrome Inspect

Centering

Two Categories Centers text within the CONTENT space TEXT-ALIGN DISPLAY: BLOCK Centers text within the CONTENT space Centers the whole box, not the content within Needs a width BLOCK: you specify the width TABLE: computer computes Tell browser to balance the margins MARGIN-LEFT: AUTO NARGIN-RIGHT: AUTO

lists

List options Ordered or unordered Bullets or no bullets Bullets inside box or outside of it Vertical or horizontal Whole list Position Width Alignment of text in each list item

links

Links Need to define two things: The destination Something to click on to get there Tag is <a href=…>click here</a> Can be text, special character or image (next week) Can change the text format

href formats summary To reference Use Another file in the same folder file.ext A file in a subfolder subfolder/file.ext index.html in a subfolder subfolder A file in a containing folder ../file.ext Anchor point on this page (need an id) #anchor The top of this page # Anchor point other page same folder file.ext#anchor An external page (target=“_blank”) http://www.complete.url

Link Pseudo-classes Link states a:link -- a normal, unvisited link a:visited -- a link the user has visited a:hover -- a link when the user mouses over it a:active -- a link the moment it is clicked Note: CSS order important hover must come after link & visited active must come after hover LoVe HAte a:link { color: green; } a:visited { color: black;

Selective formatting

Selecting one of several definitions for the same tag Name the context in the css by using a space header p { text-align: center; } footer p { text-align: right; Any div with the class of center can look like this.

Class for one element Name the declaration set for a specific selector (tag) HTML: class=“name” CSS: tag.name div.intro{ text-align: center; } <div class=“intro”> </div> Any div with the class of center can look like this.

Class for many elements HTML: class=“name” CSS: .name Particularly useful for maintaining consistency .intro{ text-align: center; color: red; } <h1 class=“intro”>Header 1</h1> <h2 class=“intro”>Header 2</h2>

Using class and pseudo p.intro:first-letter { color: red; } a.highlight:hover { color: red; }

colors

Color Defintions Names RGB(red, green, blue) Each is a decimal value 0-255 #RRGGBB Each is a hexadecimal value 00-FF