HTML Attributes and Tags
HTML Attributes and Tags
Agenda
Page 1
Anatomy of HTML Tags
Attributes
1 Properties associated with eachtag.
3 Syntax: <title>Home</title>
4 <p>tagDefines theparagraph.
<H1> -<H2>
Headings Are Important
1 Search engines use the headings to index the structure and content of your web pages
Users often skim a page by its headings. It is important to use headings to show the
document structure.
<h1> headings should be used for main headings, followed by <h2> headings, then the
less important <h3>, and so on…
Note: Use HTML headings for headings only. Don't use headings to make text BIG or bold.
<pre>
Text in a <pre> element is displayed in a fixed-width font, and the text preserves both
spaces and line breaks.
The text will be displayed exactly as written in the HTML source code.
<pre> </pre
is displayed in a fixed-width font, and it preserves both spaces and line breaks
1. <blockquote>
To define along quotation or block quotation, <blockquote> tags are used.
2. <q>
The HTML <q> tag defines a short quotation.
3. <abbr>
The HTML <abbr> tag defines an abbreviation or an acronym, like "HTML", "CSS",
"Mr.", "Dr.", "ASAP", "ATM".
Marking abbreviations can give useful information to browsers, translation systems and
search-engines.
4. <address>
The HTML <address> tag defines the contact information for the author/owner of a
document or an article.
contact information can be an email address, URL, physical address, phone number,
social media handle, etc.
5. <cite>
The HTML <cite> tag defines the title of a creative work (e.g. a book, a poem, a song, a
movie, a painting, a sculpture, etc.).
6. <bdo>
BDO stands for Bi-Directional Override.
The HTML <bdo> tag is used to override the current text direction.
Page 4
Text Tags
B element displays text in bold <b> and </b>
I element displays text in italics <i> and </i>
SMALL element makes the text appear smaller in browser <small> and </small>
U element underlines a text <u> and </u>
DE element encloses deleted text <del> and </del>
INS element encloses inserted text <ins> and </ins>
STRONG element emphasizes the text <strong> and </strong>
SUB element displays a text as subscript <sub> and </sub>
SUP element displays a text as superscript <sup> and </sup>
Em is used for emphasized text <em> and </em>
dfn issued for definition term<dfn> and </dfn>
1 Syntax: <imgsrc=”url”>
2 Self closingtag.
Page 5
4 <a href=”url”> Name of the link</a>
List Tags
1
4 <ol>.........</ol>
6 To define series of events that take place where order is not important.
7 Example yourhobbies.
8 <ul>.........</ul>
1 <li></li>
Page 6
Nested List
Example 2 :-
Page 7