Professional Documents
Culture Documents
HTML
WEBSITE BASIC STRUCTURE
Syntactic Semantic
<h1> </h1>
<body> </body>
<h2> </h2>
<head> </head>
<h3> </h3>
<div> </div>
<p> </p>
<a> </a>
Opening and closing tags
<ul> </ul>
<ol> </ol>
HTML (INFORMATION STRUCTURE)
Type of document
Example:
<p id=“parrafo” class=“normal”> Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Sed nec tortor eu diam congue
molestie.</p>
Example:
<h1>Super Heroes</h1>
<h2>Mutants</h2>
<h3>Charles Xavier</h3>
<h3>Iceman</h3>
<h2>Aliens</h2>
<h3>Silver Surfer</h3>
<h3>Superman</h3>
Tags - Lists
- <ul><ol>
- Marks the beginning and end of a list of terms
- A list defined by <ul> shows a bullet point at the
beginning of each item
- An ordered list <ol> shows a number following an order
- Each item in the list must be marked with <li> tag
Example:
<h1>Super Heroes</h1>
<ol>
<li>Charles Xavier</li>
<li>Cyclop</li>
<li>Wolverine</li>
</ol>
Tags - Bold
- <b>
- Marks the word or expression that we want to emphasize
Example:
<b> hairy mutants</b>
Tags - Strong
- Strong emphasis
- <strong>
- Marks the word or expression that we want to emphasize
Example:
<strong> very hairy mutants</strong>
Tags - Italics
- <i>
- Marks the word or expression that we want to be
displayed in italics
Example:
<i> hairy mutants</i>
Tags - Emphasis
- Strong emphasis
- <em>
- Marks the word or expression that we want to be
displayed in italics
Example:
<em> very hairy mutants</em>
Tags - Span
- <span>
- Used to group in-line elements
- We can use it to change the style of the selected
expression
Example:
<p id=“parrafo” class=“normal”
<span style=“color:red;”>Lorem </span> ipsum dolor sit
amet, consectetur adipiscing elit. <span
style=“text-decorarion:underline;”> Sed nec tortor eu diam
congue molestie. </span>
</p>
Example:
<a href="http://desdebellaterra.com"> Cool websites</a>
<a href="./any-page.html"> Convidat </a>
Tags - Anchor
<a href=“#paragraph2”>Second</a>
<a href=“#paragraph3”>Third</a>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Sed nec tortor eu diam congue
molestie.</p>
<a name=“paragraph2”>
<p>Vivamus at lorem et tortor posuere imperdiet
volutpat eget metus.</p>
<a name=“paragraph3”>
<p>Sed ultrices bibendum urna, quis suscipit nisl
tincidunt nec. Nunc vitae orci quam.</p>
Tags - Images
- <img> </img>
- HTML can be used to embed images.
- No all image format are displayed by browsers.
Recommended formats: JPG, PNG, GIF, SVG.
- Can be hosted in our served or anywhere.
- Adding an alternative text attribute is considered a
good practice.
Example:
<img src=“http://www.uab.cat/imatge.jpg” alt=“UAB”>
HTML - TAGS
To correctly tag:
- The rules and grammar dictated by the W3C must be
followed
- Apply logic
- http://www.w3c.es/Divulgacion/GuiasReferencia/XHTML1/
EXERCISE: THE KILLER I