A place to put your web page files on the Internet I: Drive Google Sites, Wix, Weebly Web hosting service provider with domain name
You can also view HTML webpage files locally in your favorite web browser.
WHAT IS HTML?
HTML = HyperText Markup Language
Tim Berners-Lee, the cool British computer science who created the World Wide Web, was the pioneer of HTML. It became standardized in November 1995 as HTML 2.0.
World Wide Web Consortium (W3C) is the international standards organization for the World Wide Web. W3C maintains the standards for HTML, CSS, XML, among many other languages.
HELLO_WORLD.HTML
<!DOCTYPE html> <html> <head> <title>Hello HTML World</title> </head> <body> <p>Hello world!</p>
</body>
</html>
HELLO_WORLD.HTML
HEADING TAGS
Heading tags are used for titles and subtitles within the content of the webpage. The font size gets smaller as the numbers get bigger. <body> <h1>Headings</h1>
<h2>are</h2>
<h3>great</h3> <h4>for</h4> <h5>titles</h5> <h6>and subtitles</h6> </body>
HEADING TAGS
What is wrong with this picture?
HEADING TAGS
All tags come in pairs!
<p><i>Italic text</i></p>
<p><u>Underlined text</u></p> <p><del>Struckthrough</del></p> <p><sup>Superscript</sup></p>
<p><sub>Subscript</sub></p>
</body>
<tag attribute=value>content</tag>
Empty elements (i.e., elements without content) do not have an end tag and follow this form <tag attribute=value />
USEFUL ATTRIBUTES
Align attribute allows you to align your content left, right or center. The default is always left. CSS is making this attribute less popular.
USEFUL ATTRIBUTES
The title attribute adds a tiny text pop-up to any HTML element. Search engines use this attribute to catalog your webpage as well as increase your search ranking. This attribute is most often used with images.
<body> <h1 title=Hi!>Big Title Heading Tag</h1> </body>
COMMENTS
Comments are a way for you to make notes in your HTML code. They are never shown in the web browser. You can also comment out existing code instead of deleting it. <body> <!- This is a comment. It is not displayed. --> <p>This text is shown in the web browser.</p> </body>
<body> <!- This comment is temporarily removing this code. <p>This text is shown in the web browser.</p> --> </body>
IMAGES
Almost every website uses images, and a website without images is pretty boring. The <img> tag does not have content. It is an empty element. <body> <p>What is the plural of TARDIS?</p> <img src=tardis.jpg /> </body> Images as link/anchor:
Explanation
Image is located in the same directory Image is located in the imgs directory Image is located up a directory
src=../imgs/tardis.jpg
src=http://www.uiuc.edu/ tardis.jpg
UNORDERED LISTS
There are different types of lists in HTML. The unordered list is named so because its items are not numbered. Its items are displayed with bullet points. <body> <h3>Todays Task List</h3> <ul> <li>LIS501 homework</li> <li>LIS506 assignment</li> <li>Exercise</li> <li>Do the cleaning</li> </ul> </body>
ORDERED LISTS
The items of an ordered list are numbered.
<body> <h3>Goals</h3> <ol> <li>Finish school</li> <li>Get a job</li> <li>Make money</li> <li>Get own place</li> </ol> </body>
LIST ATTRIBUTES
For unordered lists, you can specify which type of bullet point you would like by using the type attribute in the ul tag. <ul type=circle> [] </ul> <ul type=square> [] </ul> <ul type=disc> [] </ul> For ordered lists, you can pick a starting number other than 1 by using the start attribute.
TABLES
The HTML element table is composed of rows and columns. This element is a container element, which means it can contain other elements. <table border=1> <tr> <td>Row 1/Cell <td>Row 1/Cell </tr> <tr> <td>Row 2/Cell <td>Row 2/Cell </tr> </table>
1</td> 2</td>
1</td> 2</td>
Note: Do not use tables to structure the entire content of your webpage. This practice is now considered old fashioned.
<DIV> ELEMENT
The <div> element is nothing more than a container. Web developers now use <div> elements to arrange content on webpages instead of <table> elements. This will become important to you once youve learned more CSS. <div id=someDIV name=someDIV title=DIV Element> <!-- any HTML element can go in here --> </div> <div> elements can be nested in one another.
XHTML, which is replacing HTML, is based on the Extensible Markup Language (XML) standards.
What this means for you:
Tags remain the same as in HTML 5.0 There are stricter rules in the coding Everything must be lowercase All tags are closed and nested There are other more technical differences, too.
WHAT IS CSS?
CSS = Cascading Style Sheet CSS files are separate from HTML files, but they are included in the HTML file. It is best practice to use CSS for all formatting in your HTML files. This is the current trend. Some HTML tags are becoming depreciated because of CSS. A few examples: - <font> - Lists: <ul>, <il>, - <table> as used for main content structure - Align attribute and other formatting attributes
Some other helpful resources: - W3C Tutorials http://www.w3schools.com/css - Lynda Tutorials http://go.illinois.edu/lynda