Web Application Class XI Unit 2 Notes
Web Application Class XI Unit 2 Notes
UNIT - 2
WEBSITE DEVELOPMENT USING HTML AND CSS
What is Website?
A website is a collection of web pages which contains the information about the
particular organization or institution or any product. It contains the related content
that is identified by a common domain name and published on any one web server.
Few examples of such websites are bing.com, studykeeda.in, wikipedia.org, google.com,
amazon.com etc.
Visit Us www.studykeeda.in
Q: What is Notepad and where do I get it?
A: Notepad is the default Windows text editor. On most Windows systems, click your
Start
button and choose Programs then Accessories. Its icon is a little blue notebook.
Select (in the preferences window) Plain text instead of Rich text and
then select Ignore rich text commands in HTML files. This is very important because if
you don’t do this HTML codes probably won’t work.
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
This is my first homepage.
<b>This text is bold</b>
</body>
</html>
Visit Us www.studykeeda.in
Ans : Headings are defined with the <h1> to <h6> tags. <h1> defines the largest heading
while <h6> defines the smallest.
<h1>………………..</h1>
<h2>………………..</h2>
<h3>………………..</h3>
<h4>………………..</h4>
<h5>………………..</h5>
<h6>………………..</h6>
Paragraphs
Paragraphs are defined with the <p> tag. Think of a paragraph as a block of text.
You can use the align attribute with a paragraph tag as well.
Line Breaks
The <br> tag is used when you want to start a new line, but don’t want to start a new
paragraph. The <br> tag forces a line break wherever you place it. It is similar to
single spacing in a document.
Note:- The <br> tag has no closing tag.
Horizontal Rule
The <hr> element is used for horizontal rules that act as dividers between sections,
like this:
The horizontal rule does not have a closing tag. It takes attributes such as align and
width.
Visit Us www.studykeeda.in
Important Full Forms
W3C =>World Wide Web Consortium
CSS => Cascading Style Sheets
HTML => Hyper Text Markup Language
HTTP => Hyper Text Transfer Protocol
Current version of HTML is HTML5
Current Version of CSS is CSS3
6: Explain the procedure to view source code in Mozilla Firefox, Google Chrome
&Internet Explorer?
Ans: To view the source code for this page, in your browser window, select View and
then select Source.
Visit Us www.studykeeda.in
8: What do you mean by an anchor tag?
Ans: The <a> anchor tag to create a link to another document or web page.
There are two types of linking in HTML- Internal and External.
Internal Linking
A webpage is linked within the same web page. It is done by using an absolute path or
relative path of a link. The internal link name is followed by the hash sign(#).By
assigning an
id to refer section of the webpage, which is referred to as an internal link to the same
page.
Syntax:
<a name= “#Text” ></a>
<a hreaf=”#Text”></a>
External Linking
The Anchor Tag and the “href” Attribute
An anchor can point to any resource on the Web: an HTML page, an image, a sound
file, a movie, etc.
The syntax of creating an anchor:
<a href=“url”>Text to be displayed</a>
9: How do you insert an image and create a table in the HTML page?
Ans: We used tag for insert the image in web page are
<img src=”image_name.jpg”>
Tag for create the table are
<table width=”50%” border=”1” cellpadding=”2”>
<thead>
<th>Name</th>
<th>Mobile</th>
</thead>
<tr>
<td>Preeti</td>
<td>9250566452</td>
</tr>
</table>
Visit Us www.studykeeda.in
(a) Word processors like Microsoft word should be avoided.
(b) The <body> tells the web browser how to display the page
(c) <code>is the tag used for defining the Sample computer code
(d) Acronym for HTTP Hyper Text Transfer Protocol.
(e) Acronym for HTML Hyper Text Markup Language.
Practical Work:
Coding
<html>
<head><title> My page </title></Head><body>
<H1><U>ADMISSSION ENQUIRY FORM </u></h1>
<form method=”post” action= "maoilto:[email protected]"><b>Name
</b><Input type=”text” name="st_name"><br>
<b>Gender </b>
<input type=”radio” name="gender" value="Male"> Male
<input type=”radio” name="gender" value="Female"> Female <Br>
Visit Us www.studykeeda.in
<b>E- mail </B><Input type=Text Name ="email"><br>
SELECT SUBJECTS: <BR>
<input type=”checkbox” value="Science"> Science <Input type=”checkbox”
value="Commerce"> Commerce <Input type=”checkbox” value="Arts"> Arts
<br>
Comment<Br>
<textarea name="comment" Rows=5 cols=50></textarea><br>
<input type=”submit” value ="Send">
<input type=”reset” value ="Clear">
</form>
</body>
</html>
Section 2 CSS
2. What are the ways in which you can use CSS in your HTML document?
Ans: We can use CSS in three ways in your HTML document:
External Style Sheet – Define style sheet rules in a separate .css file and
Visit Us www.studykeeda.in
then include that file in your HTML document using HTML <link> tag.
Internal Style Sheet – Define style sheet rules in header section of the HTML
document using <style> tag.
Inline Style Sheet – Define style sheet rules directly along with the HTML
elements using style attribute. Let’s see all the three cases one by one with
the help of suitable examples.
Visit Us www.studykeeda.in
</style>
</head>
<body>
<p class=“red”>This is red</p>
<p class=“thick”>This is thick</p>
<p class=“green”>This is green</p>
<p class=“thick green”>This is thick and green</p>
</body>
</html>
Visit Us www.studykeeda.in
Ans:
External Style Sheet – Define style sheet rules in a separate .css file and
then include that file in your HTML document using HTML <link> tag.
Internal Style Sheet – Define style sheet rules in header section of the HTML
document using <style> tag.
Inline Style Sheet – Define style sheet rules directly along with the HTML
elements using style attribute.
Visit Us www.studykeeda.in
input[type=“text”]{
color: #000000;
}
Visit Us www.studykeeda.in
defined in this file will be applied only when above two rules are not
applicable.
Visit Us www.studykeeda.in