You are on page 1of 15

Name : Ali Ejaz

Roll no : 30

Department : BS(CS) 1st

Terminal Assignment.

Submitted to : Mam Maryam

Department : Depatment of IT and Computer sciences

course code:1101

Subject:- Intro to computing

Session:-2019-2023

Date:-06-july-2020

Terminal Assignment
Q.1:-Enlist atleast 10 most commonly used HTML.tags with their
usage.

10 most commonly used HTML.tags are:-


· <a> for link

· <b> to make bold text

· <strong> for bold text with emphasys

· <body> main HTML part

· <br> for break

· <div> it is a division or part of an HTML document

· <h1>... for titles

· <i> to make an italic text

· <img> for images in document

· <ol> is an ordered list, <ul> for an unordered list

· <li> is a list item in bulleted (ordered list)

· <p> for paragraph

· <span> to style part of text

Usage:-
· <A> </A>

In short, this is a tag that helps you make a link to a web page, to your page, social media site,
product within online store,... The main attribute for this HTML tag is the href (Hypertext
Reference) attribute, where you put a link to a website you want to link to. The other attribute is
target, it can be used to open a link in a new window, so that users don’t lose focus on the
current page.

· <B> </B>

If you have a lot of text, then you need to emphasise some words to let the reader know what is
important. And you do that with bold parts of the text.
· <BODY> </BODY>

The body part of an HTML document. In fact, this is an integral part of all HTML documents but
it is just a tag that marks what is the visible content of the page, where the most content is.

· <BR>

With this basic HTML tag we let the browser know, where we want some blank lines or breaks in
the text. As a matter of fact, using a few breaks makes our text breath, this means that it is
easier to read and understand.

· <DIV> </DIV>

An element which is mostly used to group elements and to act as a template for new controls.
The div HTML tag is an element you will use to divide a significant part of an HTML document
from other parts. For examplle, let’s say you have a list of products on your web page, you will
use a div for each product.

· <HEAD> </HEAD>

The head part of an HTML document. Moreover, this is where you have metadata, which is data
about the styling of the document, what kind of JavaScript libraries the document uses, title and
CSS files.

· <I> </I>

If you have a lot of text, then you need to emphasise some words to let the reader know what is
important. Rather, with italics you can present text that is a little tilted to the right.
<IMG>
We use the IMG tag to show images. Considering that images can be within files for your web
page or anywhere online. In addition, the most important attribute is src (source), which tells
where the picture is.

· <LI> </LI>

List item. A tag that is used within an ordered (<OL>) or unordered (<UL>) list. Not to mention,
you can have as many as you like.

· <OL> </OL>

Ordered list. Also includes <LI> List Items, which will be numbered automatically. As a
consequence, this is very useful if you add more list items, because the numbers will always be
in the right order.
· <P> </P>

The paragraph tag groups text into a paragraph :D (That is funny). Hence its purpose is to
separate a part of text or paragraph, this way you make it more readable and organized.

.
<SPAN> </SPAN>
The span tag groups text for which we want to have different styling. A good example would be
if we wanted to have a red word inside a sentence.

______________
______

Q.2:-What is an attribute?enlist atleast 10 commonly used attributes in


html.tags.
Defination:-
Attributes define additional characteristics or properties of the element such as width and
height of an image. Attributes are always specified in the start tag (or opening tag) and usually
consists of name/value pairs like name="value". Attribute values should always be enclosed in
quotation marks.

Also, some attributes are required for certain elements. For instance, an <img> tag must contain
a src and alt attributes. Let's take a look at some examples of the attributes usages:

10 Commonly used attributes in html.tages are:-

· The href Attribute . The <a> tag defines a hyperlink. ...

· The src Attribute . The <img> tag is used to embed an image in an HTML page. ...

· The width and height Attributes . ...

· The alt Attribute . ...

· The style Attribute . ...

· The lang Attribute . ...

· The title Attribute


· The core Attrinutes

· The id Attribute.

· The class attribute.

_______________
_________

Q.03:-Explain div element of html with example.


Defination:-
The < div > tag defines a division or a section in an HTML document. The < div > tag is used as a
container for HTML elements - which is then styled with CSS or manipulated with JavaScript.
The < div > tag is easily styled by using the class or id attribute.

Explanation:-
The div is the most usable tag in web development beacuse it helps us to seperate put data in
the web page and we can create a particular section for particular data or function in webpages

· Div tag is block level tag.

· it is a generic container tag.

· it is used to the group of various tags of html so that sectionscan be created and style can be
applied to them.
As we know div tag is block level tag .As we know div tag is used for grouping html elements together
and is to apply CSS and web layout on them lets see below example without using div tag. we need to
applying CSS for each tag.

The div tag is container tag inside div tag we can put more then one html element and can group
together and can apply CSS for them. div tag can be used for creating a layout of webpages . we can also
create web layout using tables tag but table tags are very complex to modify the layout.

The div tag is very flexible in creating web layouts and easy to modify.The div and span tag are two
common tags when creating pages using html and perform different functionality on them. while div tag
is a block level element and span is inline element .The div tag creates a line break and by default creates
a division between the text that comes after the tag end with </div>.div.tag creates seperate boxes or
containers for all elements inside this tag like text,images,paragraphs.

Supported browser:-
· Google chrome

· Internet Explorer

· Firefox

· Opera

· Safari.

Example:-

Example of the HTML <div> tag:


tag" itemprop="name"
<!DOCTYPE html>
<html>
<head>
<title>The &lt;div&gt; Tag</title>
</head>
<body>
<h1> The &lt;div&gt; Tag </h1>
<div style="background-color:#8ebf42">
<p>We use the &lt;div&gt; tag to group two paragraphs for applying a background to the text, and to add color
to this
<span style="color:#1c87c9">word</span> we place it within &lt;span&gt; tag.</p>
<p> Pay attention, that the &lt;div&gt; tag is a block-level element, so a line break is placed before and after
it.</p>
</div>
</body>
</html>
____________________

___________

Q.2:-What is CSS?Also Explain types of css with example.

Defination:-

Cascading Style Sheets(CSS) is a style sheet language used for describing the presentation of a
document written in a markup language like HTML. CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.

Types of CSS:-
There are the following three types of CSS:
· Inline CSS.

· Internal CSS.

· External CSS.

Explanation:-
· Inline CSS:-

For Inline CSS every style content is in HTML elements. It is used for a limited section. Whenever
our requirements are very small we can use inline CSS.

It will affect only single elements. In HTML we require that various HTML tag's views are
different so then we use inline Cascading Style Sheets.

There is a disadvantage of inline Cascading Style Sheets. It must be specified on every HTML tag.
There is a lot of time consumed by that and it is not the best practice for a good programmer
and the code will be quite large and very complex.

Example:-
Inline styles are defined within the "style" attribute of the relevant element:

<!DOCTYPE html>
<html>
<body>

<h1 style="color:blue;text-align:center;">This is a heading</h1>


<p style="color:red;">This is a paragraph.</p>

</body>
</html>

· Internal CSS:-

In internal CSS the style of CSS is specified in the <head> section. This is internal CSS, it affects
all the elements in the body section. Internal CSS is used in the condition when we want a style
to be used in the complete HTML body. For that, we can use the style in the head tag.

This style performs an action in the entire HTML body.

Example:-
Internal styles are defined within the <style> element, inside the <head> section of an HTML
page:

<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}

h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

· External CSS:-

In External CSS we create a .css file and use it in our HTML page as per our requirements.
Generally, external Cascading Style Sheets are used whenever we have many HTML attributes
and we can use them as required; there is no need to rewrite the CSS style again and again in a
complete body of HTML that inherits the property of the CSS file. There are two ways to create
a CSS file. The first is to write the CSS code in Notepad and save it as a .css file, the second one is
to directly add the style sheet in our Solution Explorer and direct Visual Studio to use it on our
HTML page.

How to create and use an External CSS.

Right-click on your application name in Visual Studio 2012.

Add a style sheet.

Write your CSS code and save it.

Open your HTML page and drag down the style sheet.

Save and RUN.

Example:-
External styles are defined within the <link> element, inside the <head> section of an HTML
page:

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

________________
______
Q.5:-What is javascript?Make a list of languages used for web development and
their pros and cons.
· Defination:-

JavaScript is a programming language commonly used in web development. It was originally


developed by Netscape as a means to add dynamic and interactive elements to websites. While
JavaScript is influenced by Java, the syntax is more similar to C and is based on ECMAScript, a
scripting language developed by Sun Microsystems.

Best programming languages for web development in 2020


· Python

· Java

· Javascript

· PHP

· Go

· Ruby

· C
· Swift

· Rust

· Kotlin

1.) Python:-
The Pros of Python:

· Easy to use and enjoyable to learn

· Supports multiple platforms and systems

· Gives rise to quick development by using less code

· Open source with a huge community

· Has all libraries that you can imagine

· Enables to scale even the most complicated applications with ease

The Cons of Python:

· Python is not native to mobile environment

· We can’t use Python to build a high-graphic 3D game

· Python is not recommended for memory intensive tasks.

· Python is not a good option for multi-processor/multi-core work


2.) Java:-

The pros of Java:

· A good start for studying to think like a developer

· A high-level language with a mild learning curve and simple syntax

· Stability and huge community

· Standard for enterprise computing

· Multithreading

· Automatic memory management

· Platform-independency (Write Once Run Anywhere)

· Shortage of security risks


The cons of Java:

· Lots of new vocabulary to learn

· Poor performance

· Verbose and complex code

3.) Javascript:-

The pros of Javascript:

· Rapid development

· Client-side execution

· User Interface Interactivity

· Make XMLHttpRequest() Object

· User Interface Interactivity

The cons of Javascript:

· Bit of slow execute

· Code always visible

· Stop render

4.) PHP:-
The pros of PHP:

· Open-source

· Very popular for web applications

· Completely compatible cross-platform

· Highly scalable

· Huge community of programmer support

· Easily embedded into HTML


The cons of PHP:

· Learners must have a basic knowledge of HTML

· Runs a bit slowly than other programming languages

· Not adjusted for desktop applications

· The ease of customization makes it harder to detect the errors and more error-prone

5. ) Go
The Pros of Go:

· Go is an open source by nature.

· Go has fast speed.

· Go has good credentials.

· Go keeps bugs away.

· Go has a garbage collector.

· Go is concurrent.

· Go is cross-platform.

The Cons of Go:

· Go lacks 3-party modules.

· Go is less flexible.

· Go has no generics.

· Go differs a lot from C-based languages.

6. ) RUBY
The Pros of RoR:

· A great number of useful libraries and tools

· A huge community that supports programmers

· Time efficiency

· Strong adherence to standards

The Cons of RoR:


· Performance time

· Shortage of flexibility

· Price of mistake

7.) C
The Pros of C:

· Structured programming language

· Building block for other languages

· Portable language

· Easy to study

· Speed-up program

· Low-level of abstraction

· Explore hidden objects

· Built-in function

· User-defined function

The Cons of C:

· No OOP concept

· No code-reuse

· No strict type checking

· No run-time checking

· Data security

· Namespace concept

· High-level construct

· Extending the program issues

8.) Swift

The Pros of Swift:

· Fast speed
· Full stack potential

· Interoperability

· Better scalability

The Cons of Swift:

· Swift is quite new

· Small community

· Almost no support for earlier iOS versions

9.)Rust

The Pros of Rust:

· Decent type system that will enable you to focus on code, rather than hunting bugs

· Awesome at managing resources like memory and db connection

· Smart design

The Cons of Rust

· Hard to learn

· Doesn’t have a lot of open source libs

10.) Kotlin

The Pros of Kotlin:

· Less buggy

· Easily maintainable

· Complies with existing Java code

· Increases team efficiency

The Cons of Kotlin:

· Fluctuating compilation speed

· Still not Java

· Fewer Kotlin experts for hire

____________________
________

You might also like