WebTechnology Unit II Notes
WebTechnology Unit II Notes
An HTML element defines the contents to be displayed on the web page along with instructions to
the browser, how to render those contents on the web page.
What is Tag?
● A tag is a special code enclosed in < and > symbols having predefined purpose e.g.
○ Paired tags
● The tags which have opening and closing parts are called as paired tags e.g.
● The tags which have only opening part but no closing part are called as singular tags e.g.
○ <img> tag
○ <br> tag
● It defines the version number of HTML going to be used in current web page
● It helps the web browser to understand the structure of the web page defined in a file called
Document Type Definition (DTD)
<!doctype html>
● The head section contains some sub tags which do not show the content on the web page
e.g.
<title></title> tag
<script></script> tag
<style></style> tag
<meta> tag
<bgsound> tag
<link> tag
<base> tag
● The body section contains some sub tags which display some contents on the web page e.g.
<p></p> tag
<h1></h1> tag
<a></a> tag
<b></b> tag
<i></i> tag
<u></u> tag
<font></font> tag
<img> tag
<video></video> tag
<form></form> tag
<table></table> tag
● The tags used to show the text as heading as called as heading tags. HTML provides six types
of heading tags.
● The properties applied on the tags to perform advanced actions on the tags are called
attributes.
For example,
All the heading tags have align attribute to align the text as left, right or center
Note: Attributes are written in the opening part of the tag separated by space.
What are various text formatting tags in HTML?
● HTML provides many text formatting tags, some important ones are
o <b></b> to make some text as bold
o <i></i> to make some text as italic
o <u></u> to make some text as underline
o <sup></sup> to make some text as superscript
o <sub></sub> to make some text as subscript
o <p></p> to create some paragraph. It also has align attribute
align=’left | right | center | justify’
o <font></font> to define the font name, color and size using different attributes
face='font name'
color='color name or color code'
size='n'
What is entity?
Sometimes we need to add some special characters and symbols in the web page. Such characters
and symbols are added in HTML page using some pre-defined names and codes that start with & and
closed with semicolon (;) are known as HTML Entities.
● Named entities
● Numbered entities
Some of the named entities are
● space
● > less than sign (<)
● < greater than sign (>)
● © copyright symbol (©)
● α α α
● β β β
● ₹ ₹
A hyperlink is a link to some web page, images, website, email, file etc. It is used to navigate some
web page, website etc., It can also be used to download some file.
HTML provides <a></a> also known as anchor tag to create the hyperlinks with some attributes
● href='url’
● title=’some text’
● target='_blank'
Note: URL stands for Uniform Resource Locator. It is the path to reach some resource like image,
video etc. Here href stands for hyper reference which means reference of the resource which you
want to link. Here target='_blank' opens the given URL in new window or new tab.
What is anchor?
HTML provides <img> tag to insert an image into the webpage using following attributes
● Use <TABLE></TABLE> tag to create a table with sub tags <TR></TR>, <TD></TD>,
<TH></TH>
● Use attributes
○ align
○ border
○ width
● <label></label> tag
○ Used to define the label for an input element
○ Attribute
■ for='element id'
● <input> tag
○ Used to create various types of controls
○ type='text | password | checkbox | radio | file | button | submit | reset | hidden |
date | time | datetime | number | email | url‘
○ placeholder='water mark text‘
○ required
○ autofocus
○ checked
○ size='n'
○ maxlength='n‘
○ value='any value'
● The <textarea></textarea> tag
○ Used to create multiline text
● Attributes
○ rows='n'
○ Cols='n'
● The <select></select> tag
○ Used to create a dropdown list
○ Use <option></option> sub tag to defines the dropdown options
● Attribute
○ value='option value'
What is semantic HTML?
● A semantic element clearly describes its meaning to both the browser and the developer
● To define the layout of the web page, HTML provides various tags
● <div></div>
● <section></section>
● <header></header>
● <footer></footer>
● <main></main>
● <aside></aside>
● <nav></nav>
● <article></article>
● <code></code>
● <mark></mark>
What is CSS?
● CSS provides a big set of pre-defined properties to apply the styling on HTML contents using
key:value pair model.
● Each key:pair is separated by semicolon
○ color:'color name or code'
○ background-color:'color name or code'
○ text-align:'left | right | center | justify‘
○ font-size:'n'
○ font-weight: 'bold'
○ font-family:'font name‘
○ text-transform:'uppercase | lowercase | capitalize'
○ text-decoration:'underline | overline | line-through| none‘
○ display:'none | block | inline'
○ Inline CSS
○ Internal CSS
○ External CSS
● When the CSS codes get applied directly on a tag using STYLE attribute, it is known as inline
CSS
● Use the codes using key:value pair model
● Use semicolon (;) when as separator when using multiple codes
● Just like HTML, CSS is also case insensitive
What is meant by Internal CSS?
● When we apply styling on all or selected set of elements in a web page, it is called as internal
CSS
● Use <style></style> tag to create such styles