HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL



Similar documents
Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Outline of CSS: Cascading Style Sheets

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

ITNP43: HTML Lecture 4

Using Style Sheets for Consistency

Style & Layout in the web: CSS and Bootstrap

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

JJY s Joomla 1.5 Template Design Tutorial:

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Design and Development ACS Chapter 9. Page Structure

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CIS 467/602-01: Data Visualization

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

CST 150 Web Design I CSS Review - In-Class Lab

8 STEPS TO CODE KILLER RESPONSIVE S

Advanced Web Design. Zac Van Note.

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

Level 1 - Clients and Markup

Introduction to Adobe Dreamweaver CC

Create Webpages using HTML and CSS

Website Planning Checklist

Web Development 1 A4 Project Description Web Architecture

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

CSS for Page Layout. Key Concepts

A send-a-friend application with ASP Smart Mailer

CSS - Cascading Style Sheets

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Cascading Style Sheets (CSS)

Web Authoring CSS. Module Descriptor

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

CSS Techniques: Scrolling gradient over a fixed background

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Web Development I & II*

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

ICE: HTML, CSS, and Validation

How to Properly Compose HTML Code : 1

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Creating the Surf Shop website Part3 REVISED

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Selectors in Action LESSON 3

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

{color:blue; font-size: 12px;}

Web layout guidelines for daughter sites of Scotland s Environment

Contents. Downloading the Data Files Centering Page Elements... 6

Designing HTML s for Use in the Advanced Editor

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Website Login Integration

HTML TIPS FOR DESIGNING

How to code, test, and validate a web page

Create Your own Company s Design Theme

Web Design & Development - Tutorial 04

Responsive Web Design: Media Types/Media Queries/Fluid Images

GUIDE TO CODE KILLER RESPONSIVE S

Dreamweaver CS5. Module 1: Website Development

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 2

Creating a Resume Webpage with

Web Publishing Basics 2

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

This document will describe how you can create your own, fully responsive. drag and drop template to use in the creator.

Campaign Guidelines and Best Practices

Building a Horizontal Menu in Dreamweaver CS3 Using Spry R. Berdan

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Introduction to Web Design Curriculum Sample

COMMONWEALTH OF PENNSYLVANIA DEPARTMENT S OF Human Services, INSURANCE, AND AGING

WEB DEVELOPMENT IA & IB (893 & 894)

Further web design: Cascading Style Sheets Practical workbook

Using an external style sheet with Dreamweaver (CS6)

FETAC Certificate in Multimedia Production. IBaT College Swords. FETAC Certificate in Multimedia Production Web Authoring Dreamweaver 3

Positioning Container Elements

Slicing and Coding the Navigation Background in CSS

CHAPTER 10. When you complete this chapter, you will be able to:

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Responsive Design

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

White Paper Using PHP Site Assistant to create sites for mobile devices

HTML Tables. IT 3203 Introduction to Web Development

Using Adobe Dreamweaver CS4 (10.0)

Script Handbook for Interactive Scientific Website Building

Web Design and Development Program (WDD)

Chapter 8 More on Links, Layout, and Mobile Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Adolfo G. Nasol The Bethel Educational Support and Technology Inc.

Introduction to Web Development

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

IAS Web Development using Dreamweaver CS4

Interactive Data Visualization for the Web Scott Murray

How To Use Dreamweaver With Your Computer Or Your Computer (Or Your Computer) Or Your Phone Or Tablet (Or A Computer)

Creating A Webpage Using HTML & CSS

Principles of Web Design 6 th Edition. Chapter 12 Responsive Web Design

Chapter 1 Introduction to web development and PHP

SkaDate 9 Custom Template Creation Manual

Creating Web Pages with Dreamweaver CS 6 and CSS

You can use percentages for both page elements and text. Ems are used for text,

The Essential Guide to HTML Design

Transcription:

HTML CSS Basic Structure

HTML [Hypertext Markup Language] is the code read by a browser and defines the overall page structure. The HTML file or web page [.html] is made up of a head and a body. The head of the document contains the page title, meta tags, links to CSS, Javascript and other items referenced within the page. The body may be seen as the extents of the browser window itself and contains all of the elements that make up the contents of the page. head content title keywords description css favicon <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/tr/ xhtml1/dtd/xhtml1-transitional.dtd > <html xmlns= http://www.w3.org/1999/xhtml > <head> <meta http-equiv= Content-Type content= text/html; charset=utf-8 /> <title>box Model</title> <meta name= keywords content= Barbara Ambach, HTML Tutorials, CSS Tutorials, Digital Port folio Design, Web Design, Graphic Design, Architecture, College of Architecture and Planning, University of Colorado Denver /> <meta name= description content= Introductions to HTML, CSS, Dreamweaver, FTP and Flash Integration for students preparing Web-Based Portfolios in Architecture and Graphic Design /> <link href= main.css rel= stylesheet type= text/css /> <link rel= icon href= http://www.barbaraambach.com/favicon.ico > </head> The HTML Structure is a series of nested elements similar to a Box of Chocolates. The box is the wrapper for all of the chocolates. Each chocolate has an individual container or div. Each div contains a series of elements and/ or classes, such as; milk or dark chocolate, filling, nuts and fruit. html body wrapper header main Nav left Sidebar main Content break bar footer <body> <div id= wrapper > <div id= header > <p>the header may contain text and images at the top of the page.</p> <div id= mainnav > <p>the mainnav includes primary links to other primary pages.</p> <div id= leftsidebar > <p>the leftsidebar may contain secondary navigation, images and text.</p> <div id= maincontent > <p>the maincontent may contain images, text and navigation.</p> <div id= breakbar > <p>the breakbar may be used to separate a series of floats from other inline content.</p> <div id= footer > <p>the footer may contain other navigation and copyright information.</p> </body> </html>

CSS Structure [Cascading Style Sheet] CSS [Cascading Style Sheet] defines the look of the content within the HTML DIV Tags and Classes. The CSS is linked to the HTML file [Format - Attach Style Sheet - browse for.css file] @charset UTF-8 ; /* CSS Document */ Commented Code /* Color values: #fff - white #333 - dark grey #666 - medium grey #999 - light grey #9CF - light blue #F06 - pink */ Commented code is grey and begins with a /* and ends with a */ A generic comment may be added or a rule may be temporarily commented-out so that it is not read or rendered by the browser. HTML Default Tag HTML Default Tag Resets DIV Tag begins with # body { margin: 0px; padding: 0px; text-align: center; background-color: #FFF; margin-top: 30px; h1, h2, h3, h4, h5, h6, p, pre, blockquote, ul, ol, dl, address, img { margin: 0px; padding: 0px; #wrapper { margin: 0 auto; padding: 0px; background-color: #fff; width: 960px; box-shadow: 3px 3px 3px #666; CSS Resets remove the HTML browser defaults for margins, padding and many other attributes that you may wish to have more control over by overwriting them with your own CSS Rules. These Resets avoid conflicts between the browser s default values and the CSS Rules you write. Class begins with. (period).copyright { font-family: Coda, sans-serif; font-size: 10px; color: #CCC; text-align: center;

for DIV Tags and Classes are written in the CSS [Cascading Style Sheet]. DIV or ID Tags: A DIV or ID Tag will have a CSS Rule beginning with a #... i.e.: #wrapper, #header, #sidebar, #maincontent, #footer. Each DIV or ID may be used only once in the document and is used for primary structural elements [or DIVISIONS within the page]. Each DIV must be added to the page structure by INSERTING a DIV Tag in the appropriage place in the Source Code: At Insertion Point = wherever the cursor is placed within the source code... Wrap Around Selection = wraps the div around previously selected content in the source code... After Start of Tag = after the start tag of a previously placed div... <div>... </div After Tag = after the closing tag of a previously placed div... <div>... Classes: A Class will have a CSS Rule beginning with a. (period)... i.e.:.title,.img,.block, thumb, etc. etc. Each Class may be applied to multiple elements in the document to add more specific style attributes. They may be used to define the specific look of various types of text, colors, images, etc. within a div.

An element [div or class] may be given margins, padding and borders determining the amount of area it takes up on the page. All of these add to the overall pixel dimensions that the element will occupy. MARGIN - pushes the exterior edges of the box away from other elements. PADDING - pushes elements within a box away from its interior edges. ELEMENT CONTENTS BORDER - creates a line around edges of the box. 40 px 2 px 20 px 300px 20 2 40 contents px px px margin border padding 424px padding border margin

Elements may be added to the page with INLINE structure or with FLOATS. INLINE Elements are placed within normal document flow. This page structure maintains the vertical organization of elements as they are added to the page one after the other. FLOATED Elements are removed from normal document flow. This page structure allows elements to float above the page and, as a result, other elements move up to take the place of where they used to be. Floated elements may be placed next to one another horizontally. Elements may be floated left or right. Elements Floated left align to the furthest left position possible. Elements Floated right align to the furthest right position possible. Clearing Floats: A CSS Rule of clear: left; or clear: right; keeps the next element from floating on that side of a previously floated element. A CSS Rule of clear: both; returns the element back to normal document flow and pushes the next Element below the previously floated Elements. A Class of.clear with a CSS Rule of clear: both; may be added to an element to force no other elements to float next to it or below it.