Design and Build Websites
In order to teach you about creating web pages,
this book is divided into three sections:
HTML :HTML is used to create web pages. You will see that you start by writing down the words you want to appear on your page.
CSS :CSS uses rules to enable you to control the styling and layout of web pages.fall into one of two categories:
Presentation:It’s about how to control things like the color of text, the fonts you want to use…etc.
Layout: How to control where the different elements are positioned on the screen
Practical :It’s some helpful information that will assist you in building better websites.
Before starting we need to know the differents ways that you can access to web:
a web server which hosts the website.Comments in HTML:If you add a comment to your code it will not be visible in the user’s browser, you can add the text between these characters .
<p id="pullquote">
it’s used so that in CSS the element with a unique identity allows you to style it differently than any other instance of the same element on the page.
Class Attribute:It is used as an a way to identify several elements as being different from the other elements.
For example, you might have some paragraphs of text that contain information that is more important than others and want to distinguish these elements
using this <p class="important">
Examples of block elements are <h1>, <p>, <ul>, and <li>.
<h1>Hiroshi Sugimoto</h1>
<p>The dates for the ORIGIN OF ART exhibition are as follows:</p>
<ul>
` <li>`
` Science: 21 Nov - 20 Feb 2010/11`
` </li>`
</ul>
Examples of inline elements are , , , and
.
-Grouping Text & Elements In a Block <div>:Used to group a set of elements together in one block-level box.
For example, you might create a <div> element to contain all of the elements for the header of your site (the logo and the navigation)
<div id="header">
<img src="images/logo.gif" alt="Anish Kapoor" />
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="biography.html">Biography</a></li>
<li><a href="works.html">Works</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div><!-- end of header -->
<p id="pullquote">
it’s used so that in CSS the element with a unique identity allows you to style it differently than any other instance of the same element on the page.
For example, you might have some paragraphs of text that contain information that is more important than others and want to distinguish these elements
using this <p class="important">
Examples of block elements are <h1>, <p>, <ul>, and <li>.
<h1>Hiroshi Sugimoto</h1>
<p>The dates for the ORIGIN OF ART exhibition are as follows:</p>
<ul> <li>Science: 21 Nov - 20 Feb 2010/11</li> </ul>
Examples of inline elements are , , , and
.
For example, you might create a <div> element to contain all of the elements for the header of your site (the logo and the navigation)
<div id="header">
<img src="images/logo.gif" alt="Anish Kapoor" />
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="biography.html">Biography</a></li>
<li><a href="works.html">Works</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div><!-- end of header -->
<span> element acts like an inline equivalent of the <div> element. It is used to either:
The most common reason whypeople use elements is so that they can control the appearance of the content of these elements using CSS.
<span class="gallery">Tate Modern</span>
<iframe
width="450"
height="350"
src="http://maps.google.co.uk/maps?q=moma+new+york
&output=embed">
</iframe>
src:The src attribute specifies the URL of the page to show in the frame. height:The height attribute specifies the height of the iframe in pixels. width:The width attribute specifies the width of the iframe in pixels scrolling:The scrolling attribute will not be supported in HTML5 frameborder:The frameborder attribute will not be supported in HTML5.
Information About Your Pages
The element lives inside the <head> element and contains information about that web page.And it is not visible to users.
For example:
<head>
<title>Information About Your Pages</title>
<meta name="description"
content="An Essay on Installation Art" />
<meta name="keywords"
content="installation, art, opinion" />
<meta name="robots"
content="nofollow" />
<meta http-equiv="author"
content="Jon Duckett" />
<meta http-equiv="pragma"
content="no-cache" />
<meta http-equiv="expires"
content="Fri, 04 Apr 2014 23:59:59 GMT" />
</head>
<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="description" content="Telephone, email
and directions for The Art Bookshop, London, UK" />
<title>Contact The Art Bookshop, London UK</title>
</head>
<body>
<div id="header">
<h1>The Art Book Shop</h1>
<ul>
<li><a href="index.html">home</a></li>
<li><a href="index.html">new publications</a>
</li>
<li class="current-page">
<a href="index.html">contact</a></li>
</ul>
</div><!-- end header -->
<div id="content">
<p>Charing Cross Road, London, WC2, UK</p>
<p><span class="contact">Telephone</span>
0207 946 0946</p>
<p><span class="contact">Email</span>
<a href="mailto:books@example.com">
books@example.com</a></p>
<iframe width="425" height="275" frameborder="0"
scrolling="no" marginheight="0" marginwidth="0"
src="http://maps.google.co.uk/maps?f=q&
source=s_q&hl=en&geocode=&
q=charing+cross+road+london&output=embed">
</iframe>
</div><!-- end content -->
<p>© The Art Bookshop</p>
</body>
</html>
References:
@Jon Duckett/HTML & CSS