Structure
- HTML is used to create the structure of pages
- There are opening tags and closing tags
- The elements usually are made of a pair of opening and closing tags
- HTML uses elements to form the structure of pages
- Attributes offer additional information about an element and have a name and a value
Extra Markup
- Adding comments by using <!– –>
- The id attribute is used to specify that element from other elements on the page
- The class attribute is used to differentiate several elements from other elements on the page
- Block leve elements will always start on a new line, such as <h1-6>, <p>, <ul>, and <li>
- Inline elements will continue on the same line, such as <a>, <b>, <img>
- The <div> element will group a set of elements together in one block-level
- The <span> element will group a set of elements together inline
- An iframe, inline frame, creates a window for another page, it has attributes like src, height, width, scrolling, frameborder, and seamless
- The <meta> element is inside the <head> and has information about the web page
- Escape characters are used to add special characters
HTML5 Layour
HTML5 introduced several new elements that can help to define the structure of a page.
- Hearders and footers, which can appear at the top or bottom of every page on the site
- The <nav> element contains the major navigational blocks
- The <article> element is used as a container for any section of a page
- The <aside> element can be used either inside an <article> or outside of an <article>
- Teh <section> element puts related content together as a group
- The <hgroup> element groups a set of <h1> to <h6> elements as one single heading
- The <figure> and <\figcaption> elements are used to insert an image
- The <div> element will be used if there is no suitable element to group a set of elements
Process & Design
- Study your target audience
- Use site maps to help you visualize how different pages can be grouped
- Use wireframe to show the hierarchy of the information and potential layout on the page
- Use visual hierarchy to help audience understand the page
- Use size, color, and style effectively to differentiate between information
- Use grouping and similarity to simplify the page for easy navigation and clarity
The ABC of Programming
A: The definition of the script and the way to create one
- The script is a list of instructions that can help computers execute and reach the goal
- The computers can do and only do what you instructed it to do, so write the instructions programmatically
- When writing a script, break down your goal into a list of simple tasks and then figure out the steps to complete that task
B: The ways for computers to fit in the real world
- Creating the models of the world through data
- Using objects to represent physical things
- Setting properties to the object
- Using methods to perform tasks
- Creating events when a user interacts with the computer
- HTML markup is used to create a model of the web page
- Using code to make web pages interactive
C: Tips on how to write a script for a web page
- Keep JavaScript code in its own JavaScript file
- Use the HTML <script> element to load the JavaScript file
- The source code for the page will not be changed by the JavaScript