USING IMAGES This is the bottom of the page. Note the alignment of having text before and after, at the top, in the middle and at the bottom. Code is on.

Slides:



Advertisements
Similar presentations
Working with Images and HTML
Advertisements

CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Very quick intro HTML and CSS. Sample html A Web Title.
Session 4: CSS Positioning Fall 2006 LIS Web Team.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
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.
Computer Science 1611 Internet & Web Creating Webpages with Style Hypertext and the HTML Markup Language (continued)
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
Using images with XHTML Please use speaker notes for additional information!
CSS The Definitive Guide Chapter 8.  Allows one to define borders for  paragraphs  headings  divs  anchors  images  and more.
1 Essential HTML coding By Fadi Safieddine (Week 2)
Images in HTML PowerPoint How images are used in HTML.
Getting Started with HTML Please use speaker notes for additional information!
 Word doc for you to download › Link at the beginning of class › 10 Questions › Answers to be added inline  Post to Sakai when completed › No resubmits.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
Chcslonline.org Text –wrapping around Images. chcslonline.org To wrap text around an image, lets set up a style in our style sheet. open a new notepad.
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
HTML Lesson 3 Hyper Text Markup Language. Assignment Part 2  Set the file name as “FirstName2.htm”  Set the title as “FirstName LastName First Web Site”
Internet Applications Development Lecture 4 L. Obead Alhadreti.
HTML. Adding Background Color The bgcolor attribute lets you change the background color of the Web page. Located in the body tag See common Web Page.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
REEM ALMOTIRI Information Technology Department Majmaah University.
WebD Introduction to CSS By Manik Rastogi.
CSS.
CCT260H - Christopher Evan Jones
The Box Model in CSS Web Design – Sec 4-8
>> Navigation and Layouts in CSS
( Cascading style sheet )
Semester - Review.
The Box Model in CSS Web Design – Sec 4-8
CSS Layouts: Grouping Elements
Unit 3 - Review.
Images in HTML PowerPoint How images are used in HTML
More advanced HTML and CSS
Inserting and Working with Images
What is CSS.
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets
Chapter 3 Images.
Chapter 6 More CSS Basics Key Concepts
Web Development & Design Foundations with HTML5 7th Edition
CSS.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Styles and the Box Model
CSS Borders and Margins.
Box model, spacing, borders, backgrounds
Font tag and its attributes
Introduction to HTML II
Basic HTML and Embed Codes
that the browser will center the table.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts
Cascading Style Sheets™ (CSS)
How to work with images and icons Murach's HTML and CSS, 4th Edition
Pertemuan 1b
Attribute of heading, <p> and <hr> tag
Attribute of heading, <p> and <hr> tag
Creating a simple web page
Using tables in HTML Goes in order with Examples at my site.
Note this is the page I link to.
Images in HTML PowerPoint How images are used in HTML
CSc 337 Lecture 5: Grid layout.
Session IV Chapter 15 - How Work with Fonts and Printing
Attribute of heading, <p> and <hr> tag
Introduction to Styling
Images in HTML PowerPoint How images are used in HTML
Presentation transcript:

USING IMAGES This is the bottom of the page. Note the alignment of having text before and after, at the top, in the middle and at the bottom. Code is on the next page.

This shows using CSS to handle the height or the width. Please read about using pt, px , em and percents. I start the research in a few slides. Note the CSS embedded style of vertical-align etc. The alt gives an alternative to those who cannot see the image and is a requirement for validation.

This one used px and the other used pt.

https://kyleschaeffer.com/development/css-font-size-em-vs-px-vs-pt-vs/

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Working with images etc...</title> </head> <body> <p><img src= "CISa.gif" width="257" height="237" alt="CISa image">This is CIS!</p> <p> This is the <img src= "CISa.gif" width="257" height="237" alt="CISa image"> image of CIS I created using Word! </p> This is the picture again <img src= "CISa.gif" width="257" height="237" alt="CISa image"> This is the image aligned to the top <img style="vertical-align: top;" src= "CISa.gif" width="257" height="237" alt="CISa image"> This is the image aligned in the middle <img style="vertical-align: middle;" src= "CISa.gif" width="257" height="237" alt="CISa image"> of the screen. </body> </html> This approach also works and validates. The height and the width are in pixels

Images around code

Pushed the sides in to make a different look.

Note the style is float left or float right to float it to the side and the text starts. Everything in the division has text-align: center;

Here I played with height and width. The recommendation is that instead of doing this, you resize in an app like paint and use the resized image.

I sized the screen to make it fit better I sized the screen to make it fit better. I also skipped on of sizing examples that you should look at

Note that I am using the images as icons to link to another page Note that I am using the images as icons to link to another page. Both of them have embedded style and one sets the border to 2pt and one sets it to none. The alt provides an alternative to people who cannot see the image.

These are centered – because of what I cut off it may not look like it.

Now they look more centered. This CSS code will center the image on the page. Using display with block lets you deal with size. Making the size of the margins the same on the left and right, I center them.

I did not want to center both images so I gave the one I wanted to center a class and specifically a class name of regular. Now up in the css I can put regular with a dot in front of it which means that it is a class. The class is set to center the image and for the first img I say use the class so it gets centered. The other image does not have a class so it is not centered. More about classes another day...

Note the background image and note the fact that CISa Note the background image and note the fact that CISa.gif will bring up bigim5.html because of the <a href link.

Note that one division has a background-image and one had a background-color.

Just to show you it can be done – definitely not to encourage you to do it!