Professional Documents
Culture Documents
web tecnology -unit 1
web tecnology -unit 1
web tecnology -unit 1
Introducing HTML and XHTML, Basic Text Formatting, Presentational Elements, Phrase
Elements, Lists, Editing Text, Core Elements and Attributes, Attribute Groups. Links and
Navigation: Basic Links, Creating Links with the Element, Advanced E- mail Links. Images,
Audio, and Video: Adding Images Using the <img> Element, Using Images as Links Image Maps,
Choosing the Right Image Format, Adding Flash, Video and Audio to your web pages
1. Tags: HTML uses tags to define elements, which are represented by a less-than
symbol (<) followed by the tag name and a greater-than symbol (>). Tags usually
come in pairs, with the opening tag preceding the content and the closing tag
following the content.
2. Elements: HTML elements represent the structure and content of a web page,
such as headings, paragraphs, images, links, forms, tables, and more.
4. Semantic meaning: HTML elements have semantic meaning, which means that
they convey meaning to search engines, screen readers, and other machines,
improving accessibility and search engine optimization (SEO).
3. Head element: <head> (contains metadata, title, and links to external files)
4. Body element: <body> (contains the visible content of the web page)
2. Paragraphs: <p>
3. Links: <a>
4. Images: <img>
5. Lists: <ul>, <ol>, <li>
HTML is a fundamental technology for building websites and web applications, and
is used in conjunction with CSS (Cascading Style Sheets) and JavaScript to create
dynamic and interactive web experiences.
Introduction to XHTML
1. XML syntax: XHTML uses XML syntax, which means tags must be properly
nested, and all tags must be closed.
3. Strict syntax: XHTML has a stricter syntax than HTML, with no room for errors
or omitting closing tags.
5. XML namespace: XHTML uses the XML namespace, which allows developers to
mix XHTML with other XML languages.
Benefits of XHTML
1. Improved syntax: XHTML's strict syntax helps reduce errors and makes code
easier to maintain.
3. Enhanced search engine optimization (SEO): XHTML's clean code and proper
structure can improve search engine rankings.
2. Tags: XHTML requires all tags to be closed, while HTML allows some tags to be
omitted.
1. XHTML 1.0
2. XHTML 1.1
While XHTML was widely used in the early 2000s, it has largely been
replaced by HTML5, which offers more flexibility and features.
Basic text formatting refers to the ways in which you can visually present text to
make it more readable, organized, and visually appealing. Here are some common
basic text formatting techniques:
5. Indentation: Adding space before the first line of a paragraph to create a visual
offset
6. Color: Changing text color to convey meaning, differentiate text, or add visual
interest
8. Lists: Using bullet points or numbered lists to organize and present information
9. Headers: Using headings (H1, H2, H3, etc.) to create a hierarchy of information
10. Text decoration: Adding visual effects like shadows, outlines, or gradients to
text
These basic text formatting techniques can enhance the clarity, readability,
and overall visual appeal of text in various contexts, such as documents, web pages,
presentations, and more.
Basic text formatting in HTML can be achieved using various tags and attributes.
Here are some common examples:
5. Font size:
7. Alignment:
Presentational elements in HTML are tags that control the visual appearance and
layout of content on a web page. These elements were widely used in older versions
of HTML, but many have been deprecated or replaced by CSS styling in HTML5.
Here are some examples of presentational elements:
2. <b>, <i>, <u>, <s>, <strike>: Used for bold, italic, underline, strikethrough, and
strike-through text.
While presentational elements were once commonly used, they have several
limitations and drawbacks, such as:
- Inflexibility
- Limited accessibility
Phrase elements, lists, and editing text are essential concepts in HTML:
Phrase Elements:
Lists:
Editing Text:
These elements help structure and stylize text content, making it more readable
and accessible. By using phrase elements, lists, and editing text elements, you can
create clear and organized content for your website or web application.
Pharse elements
7. <del>: Deleted text, used to indicate text that has been removed.
8. <ins>: Inserted text, used to indicate text that has been added.
These phrase elements help search engines, screen readers, and other machines
understand the meaning and context of text, improving accessibility and search
engine optimization (SEO).
Lists:
- Automatically numbered
Editing Text:
- <textarea>:
- <input type="text">:
- <label>:
- Improves accessibility
Additionally, HTML provides various elements and attributes to edit and manipulate
text, such as:
These elements and attributes help create structured and meaningful content, making
it easier for users and machines to understand and interact with your text.
Core elements:
The core elements in HTML are the basic building blocks of a web page. They
are the essential elements that provide the structure and content of a webpage. Here
are some of the most common core elements:
2. <head>: Contains metadata about the webpage, such as the title, charset,
and links to external style sheets or scripts.
3. <title>: Sets the title of the webpage, displayed in the browser's title bar
and search engine results.
4. <body>: Contains the content of the webpage, such as text, images, and
other elements.
10. <div> and <span>: Generic containers for grouping elements or applying
styles.
These core elements are the foundation of HTML and are used to create the
basic structure and content of a webpage.
Attributes and attributes groups:
Attributes and attribute groups are used in HTML to provide additional
information about an element and its content. Attributes are added to the opening tag
of an element and consist of a name and value, separated by an equals sign (=).
1. Global attributes:
2. Hyperlink attributes:
3. Image attributes:
4. Form attributes:
5. Event attributes:
6. Accessibility attributes:
1. Universal attributes
2. Metadata attributes
3. Hyperlink attributes
4. Image attributes
5. Form attributes
6. Event attributes
7. Accessibility attributes
Using attributes and attribute groups effectively can enhance the functionality,
accessibility, and overall quality of your HTML code.
Simple program in html
Here is a simple HTML program that displays a heading, a paragraph, and a link:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Welcome to My Website</h1>
</body>
</html>
- <!DOCTYPE html>: This is the document type declaration, which tells the
browser that the document is written in HTML5.
- <head>: This element contains metadata about the document, such as the title,
charset, and links to external stylesheets or scripts.
- <title>My First HTML Program</title>: This sets the title of the webpage, which
is displayed in the browser's title bar and search engine results.
Save this code in a file with an .html extension (e.g., myprogram.html) and open it
in a web browser to see the result
HTML provides several elements and attributes for creating links and navigation
menus. Here are some of the most commonly used ones:
Links:
- target attribute: specifies how the linked document should be opened (e.g.,
target="_blank" for a new tab).
Navigation Menus:
- <ul>, <ol>, and <li> elements: used to create unordered, ordered, and list items,
respectively.
- <a> element within <li> elements: used to create links within the navigation
menu.
Example:
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>