410 likes | 542 Views
How the Web Works. Multimedia Storytelling Spring 2014. The Internet vs. the World Wide Web. The Internet is a network of networks, connecting millions of computers together globally
E N D
How the Web Works Multimedia StorytellingSpring 2014
The Internet vs. the World Wide Web • The Internet is a network of networks, connecting millions of computers together globally • As long as two computers are connected to the Internet, they can communicate via e-mail, instant messaging services, file transfer (FTP) etc. • The World Wide Web is one way of accessing information over the medium of the Internet
How the Web works • User opens a web browser, types in a URL or a set of keywords using HTTP (hypertext transfer protocol) • Web browser initiates contact with a web server, translates HTTP into a set of numbers that a web server can understand, which requests the information • Server delivers the information to the web browser • Web browser decodes and renders the information for the user’s computer or device
Web servers • Computer that stores and distributes information over the Internet • Delivers requested content to clients • Most common server type is a hosting server • Used to host websites • Public folder on WWW that contains all of a site’s content
Web browsers • The tool used to access information over the Internet, published on the World Wide Web • Searches for and finds information on web servers • Retrieves information and brings it back to the user • Renders the information for display on computers and devices
Web pages vs. websites • Web pages are HTML documents on the Internet, and any related style, script, and graphics files, often hyperlinked to other documents on the Web • Websites are a collection of interconnected web pages, located on the same server, on the Internet
Main components of web pages • HTML • CSS (Cascading Style Sheets) • Interactive scripts (JS, PHP, etc.) • Audiovisual content
HTML: An overview • Predominant markup language for all web pages that all browsers read to understand the site • Considered the building blocks of a web page, and define the structure of the document • Made up of tags that surround plain text, telling the browser how to display elements on a web page • These tags have selectors that are referenced in the CSS, which defines how the tags are styled
HTML Structure: Common tags • <html> • <head> • <title> • <link> • <body> • <div> • <p> • <br> • <h1> - <h6> • <a> • <img> • <source> Click here for a complete list of tags
HTML Structure: Tags overview • Characters surrounding plain text that give plain text meaning • Composed of the name of the element, surrounded by angle brackets • Tags are always surrounded by angle brackets • Opening tags: < > + Closing tags: </> • Tags mostly come in pairs (i.e. <head> </head>) • Opening tag turns action on, closing tag turns it off • Tags can be nested inside of other tags • Inner tag must be closed before the outer tag • Tags have optional attributes that further tell the browser what to do, i.e. alignment, width, etc.
CSS: An overview • Language that describes the presentation of a website • You can control styles for elements throughout an entire website through one line of code • Similar to the style sheets that newspapers and magazines use in InDesign • Define colors, fonts, positioning, etc.
HTML + CSS = BFFs • While HTML controls the structure of a web page, CSS controls the style/presentation • By separating structure & presentation, you can change how a page looks without affecting the underlying structure
How HTML + CSS interact • HTML document links to an outside CSS document, which when downloaded tells the browser how the HTML should look
With CSS, you can format… • Backgrounds (images, colors) • Fonts (family, size, style) • Paragraphs (alignment, indentation, letter spacing, word spacing, line height) • Margins & padding • Borders (style, size, color) • Color (text) • Positioning (relative, absolute) • Floating (left, right)
CSS syntax • Selector: References which element needs to be styled • Declaration: The formatting instructions • Always enclosed in curly brackets • Can contain multiple styles • Property: The item that needs to be styled • Font family, font size, etc. • Value: The style applied to that item • Helvetica, 12px, etc.
CSS Selectors • There are different types of selectors • ID selector • Class selector • Type selector
The box model explained • Margin: Pushes the box away from other boxes. The margin does not have a background color, it’s transparent. • Border: A border that goes around the padding and content, between the margin and padding. • Padding: Pushes the border of the box away from the box’s content. • Content: The inside of the box, where text, images & media appear.
Interactive scripting: An overview • Interactive scripting allows for dynamic web content • JS allows users to control the content that appears in their browser • Slideshows • Interactive data visualizations • PHP allows the server to change the content that appears in the browser, typically based on the specific user that’s logged on to a site/application • Social media sites • Shopping carts
Audiovisual content • Images • Audio • Movies • Web pages don’t actually contain audiovisual content, they link to audiovisual content • Heavy audiovisual content slows down sites • Optimize your images to speed up loading time
Getting started • Create a local root folder to house content • Open up a text editor (i.e. Sublime Text) • Create a home page (save to root) • Create a stylesheet (save to root) • Link HTML page to CSS • Build the structure of your page (HTML) • Build the styles for your page (CSS) • Add interactive scripts (if you’d like) • Add content