HTMLXHTML Structure Building a basic web page using
HTML/XHTML Structure Building a basic web page using notepad.
Document Structure <!DOCTYPE html PUBLIC "-//W 3 C//DTD XHTML 1. 0 Strict//EN" "http: //www. w 3. org/TR/xhtml 1/DTD/xhtml 1 -strict. dtd"> <html lang = "EN" xml: lang = "EN" dir = "ltr"> <head> <title>Enter The Title Here</title> </head> <body> </html>
Change the Title Tag n When using the template, remember to change the title tag content.
Tags n n n <> and </> Case sensitive Open and closed Empty elements must be closed Multiple tags must be properly nested The cat jumped over the fence. The cat jumped <b>over</b> the fence. The cat jumped over the fence. The cat jumped <b><i> over</i></b>the fence.
Headings n n Bob fell over the chicken. [H 1] Bob fell over the chicken. [H 6] There are six heading sizes H 1 -H 6 <h 1>Bob fell over the chicken. [H 1]</h 1> <h 6>Bob fell over the chicken. [H 6]</h 6>
Changing Colors This is a H 1 heading with color. Example: <h 1><font color=#ff 0000>This is a H 1 heading with color. </font></h 1> n Color codes are available at http: //www. w 3 schools. com/html_colors. asp
Background Color <head> <style type="text/css"> body {background-color: #aa 1133} </style> </head> Enter style type tag between the head tags “Try it” editors http: //www. w 3 schools. com/css/cs s_background. asp
Paragraph and Formatting Used for a block of text. It can be for one sentence or 1000. I don’t recommend a block of text of a thousand sentences. <p>Used for a block of text. It can be for one sentence or 1000. I don’t recommend a block of text of a thousand sentences. </p> This is BOLD. This is <b>BOLD</b>. This is italics. This is <i>italics</i>. Bob and Tom are funny. <font size=-1>Bob</font> and <font size=+3>Tom</font> are funny.
Horizontal Rule __________ <hr /> __________ <hr size=7 /> ______ <hr width=50 /> _______ <hr width=70% /> _______ <hr size=7 width=70% />
Line Breaks n n HTML will word wrap unless you use line breaks. No closing Tag First sentence. Second sentence. Third sentence. Fourth sentence. First sentence. Second sentence. Third sentence. Fourth sentence.
Align Attribute Align left align=left Align center align=center Align right align=right Example: Go Colts! <H 1 align=right>Go Colts!</H 1>
Center This is centered. <center>This is centered </center> The center tag can be used for one item or for a whole section.
Unordered List n n n Monitor Keyboard CPU Speakers Mouse <ul> <li>Monitor <li>Keyboard <li>CPU <li>Speakers <li>Mouse </ul>
Ordered list 1. 2. 3. 4. 5. Monitor Keyboard CPU Speakers Mouse <ol> <li>Monitor <li>Keyboard <li>CPU <li>Speakers <li>Mouse </ol>
Pictures n n n Use. jpeg Make sure image is saved in your. html folder. <img src=“filename“ /> <img src=“german shepherd. jpeg“ />
Hyperlinks Yahoo <a href="http: //www. yahoo. com/">Yahoo</a>
Getting Started n n n Create a folder called your_name website Start notepad (Start →Accessories→Notepad) ¨ Click File → Save As ¨ Rename it your_name. html ¨ Save it in the your_name website folder Save your image in your_name website folder Open your browser ¨ File → Open → your_name. html → Open Keep your browser open as you work on your web page When you edit your. html, save it then go to your browser and click refresh. You will see the changes you made.
Final Project n n Create a REAL Family holiday recipe webpage (any holiday you like). Your website should include the minimum following format and structural elements (you may need to add more for aesthetic purposes): ¨ ¨ ¨ ¨ ¨ Title Two different heading sizes A horizontal rule and a line break Formatting to include bold, italics, and two different font sizes Web link to a website related to your primary ingredient A picture of the finished product One ordered and one unordered list A short description using <p></p> tags Colored background and some colored text.
Final Project The following criteria will influence the grading of your project. n Your project: n ¨ must contain all required format and structural elements plus content. ¨ must be done in notepad saved as an html. If you use a web editor like Front. Page or Word you will get a ZERO. ¨ should be visually pleasing and organized. ¨ should work. Your web link should go to a real working website. Your image should appear on your website.
Submitting your work. n n n When complete, zip the contents of website folder and place the zip file into the drop box. To zip your work (in XP) ¨ Highlight folder contents ¨ Right click ¨ Send to ¨ Compressed folder The zipped file will be created in your website folder. Submit your zipped file to the drop box.
Helpful Links n n n http: //www. htmlgoodies. com/ http: //www. htmlhelp. com/reference/html 40/olist. html http: //werbach. com/barebones. html http: //www. w 3 schools. com/html/default. asp http: //www. w 3 schools. com/html_colors. asp
- Slides: 21