CS 511-Web Engineering
Week 2
Topic 16-18
CS 511-Week 2: Topic 16-18 |
Topic 16:
Common HTML tags:
DOCTYPE:
This tag is used to specify that the document is an HTML document.
Syntax:
<!DOCTYPE html>
Head and Body tags:
In the head tag External files, document title, and metadata are mentioned.
In the body tag contents of the documents are mentioned.
Heading Tag:
There are six types of Headings available in the Heading tag
<h1>.......</h1>
<h2>.......</h2>
<h3>.......</h3>
<h4>.......</h4>
<h5>.......</h5>
<h6>.......</h6>
Paragraphs and Divisions:
The tag that is used for a paragraph is <p>. It is the container for text.
The tag that is used for division is <div>. It is used for division. It is also a container tag.
Inline Text element:
- <a>
- <abbr>
- <br>
- <cite>
- <code>
- <em>
- <mark>
- <small>
- <span>
- <strong>
- <time>
- ........
Block elements:
- <div>
- <h1><h6>
- <hr>
- <li>
- <ol>
- <ul>
- <p>
- <table>
- ......
Images:
The element that is used for displaying images is <img>.
It is compulsory to use the ‘alt’ attribute in the image tag to display text against an image.
Character entities:
Entity |
Description |
|
Nonbreakable space |
< |
< |
> |
> |
© |
© |
™ |
™ |
Links are also called anchors. It is an important part of all web pages.
It has two parts
- Label
- Destination
Relative Referencing:
Relative Link
Type |
Example |
Same directory |
<a href="example.html"> |
Child Directory |
<a href="images/logo.gif"> |
Grandchild/Descendant Directory |
<a href="css/images/background.gif"> |
Parent/Ancestor Directory |
<a href="../about.html"> |
Sibling Directory |
<a href="../images/about.html"> |
Root Reference |
<a href="/images/background.gif"> |
Topic 18:
- Unordered list
- Ordered list
- Description list
<li>About Us</li><li>Home</li><li>Products</li><li>Contact Us</li>
- About Us
- Home
- Products
- Contact Us
For example:
<!DOCTYPE html>
<ol>
<li>Introduction</li>
<li>Background</li>
<li>My Solution</li>
<li>Conclusion</li>
</ol>
Output:
- Introduction
- Background
- My Solution
- Conclusion
For example:
<dl>
<dt>HTML</dt>
<dd>Hyper Text Markup Language</dd>
<dt>CSS</dt>
<dd>Cascading Style Sheet</dd>
</dl>
Output:
HTML
Hyper Text Markup Language
Cascading Style Sheet
Assessment:
- Which of the following application displays the user's requested webpage?
- Domain Name System
- Routing Protocol
- Routing Algorithm
- Web browser
- When a webpage is requested,
- Firstly, HTTP contents are fetched
- Firstly, an empty page is fetched
- Firstly, HTML contents are fetched
- Firstly, IPX contents are fetched
0 Comments