HTML all three parts
HTML all three parts
HTML all three parts
HTML(PART-I)
Ans. Markup Language is a language that a computer system understands and uses to
interpret commands in the HTML script to control the display.
Some examples of markup languages are HTML, SGML, and XML.
1) It is a very easy and simple language. It can be easily understood and modified.
2) It is very easy to make an effective presentation with HTML because it has a lot of
formatting tags.
3) It is a markup language, so it provides a flexible way to design web pages along with the
text.
4) It facilitates programmers to add a link on the web pages (by html anchor tag), so it
enhances the interest of browsing of the user.
3. Explain the terms tags and attributes with the help of an example.
Ans. Attribute: A special keyword used inside an HTML tag to specify additional information
about the tag and customize it. Attribute should always be applied with its name and value.
</body>
Tags: HTML tags are like keywords which define that how browser will format and display
the content. HTML tags contain three main parts: opening tag, content and closing tag.
Example: <html> ……….. </html>
Ans. In HTML comments are used to add notes or explanations within the code that are not
displayed in the web page browser.
Comments are given between <! – – and – ->. Browsers ignore the text between comment
character sequences.
5. What are Cascading Style Sheets? Name the different methods available for
applying Style rules in an HTML document.
Ans. Cascading Style Sheets (CSS) is a stylesheet language used to describe the
presentation of a document written in HTML or XML.
CSS is used to control the style of a web document in a simple and easy way. It provides an
additional feature to HTML. It is generally used with HTML to change the style of web pages
and user interfaces.
There are three methods used for applying Style rules in an HTML document.
● Inline CSS – Inline CSS is used to apply a unique style to a single HTML element.
● Internal CSS – An internal CSS is used to define a style for a single HTML page
● External CSS – An external style sheet is used to define the style for many HTML pages.
Ans: There are differences between Internal CSS and External CSS such as
The internal CSS means inside the head In external CSS, we define the styles in a specific
1 tag. We can include the <style> tag to file(file extension should be .css) and link that to
define the style for the webpage. our web pages using the link tag.
This can be used when a single HTML External CSS contains separate CSS file which
2 document must be styled uniquely. contains only style property with the help of tag
attributes
We can write within the same file i.e the We can write in a separate file than the html code
3 HTML code and CSS code are placed in i.e the HTML file is separate like (index.html) and
the same file. CSS file is separate like (style.css).
HTML(PART-II)
Ans.
1 <ol> stands for “ordered list.” <ul> stands for “unordered list.”
It is used to create lists where the It is used to create lists where the order of
order or sequence of items is items is not important, and the items are
2 important. In most cases, it generates displayed with bullet points by default.
a numbered list, typically starting with You can also change the bullet style using
the number 1. CSS.
</ul>.
3. Define Padding property.
Ans. Padding properties are used to generate space around an element’s content, inside of
any defined borders.
The syntax for padding property for all four sides of a <p> element to 30px is as follows:
p{
padding: 30px
4. What is a description list? Define the different tags used to create a description.
Ans. Description lists are used to associate terms with their relevant descriptions. In simple
terms, this is a list of items, with a description of each item.
Ans. The type attribute is used to tell the browser which type of list marker to apply to a list.
The accepted values include disc, circle, and square.
6. State the use of any two properties that you use to enhance the appearance of a
table.
Ans. The following properties are used to enhance the appearance of a table —
● Border — property, which is used to specify the thickness, type and color of the border.
● Border — collapse, is used to apply separate or single border for each cell.
7. How are images added in an HTML document?
Ans. The images on a web page can be inserted using <img> tag, which is an empty tag.
The most widely used image formats supported by HTML are GIF, JPEG, and PNG.
HTML(PART-III)
1. Why do you include hyperlinks in your web page? Give any two reasons.
Ans. Web page use hyperlinks as a way to navigate online content. Both images and text can
be used to create a hyperlink.
• Hyperlink points to a specific section or element within the same webpage or document.
Ans.
Sl.
Internal Linking External Linking
No.
Internal links are links that reference other External links are any links that point away
1
pages on your site from your domain
It passes SEO authority pages on your site, It passes SEO authority from other site to
2 increasing the “page authority” of specific your site, increasing your “domain
pages. authority”.
Ans. A frame is a sub window inside an active browser. It is possible to have more than two
frames in a Web page, and therefore more than two sub windows can be viewed at the same
time.
The main advantage of frames is that it allows the user to view multiple documents within a
single Web page.
● Checkboxes Controls.
5. Which input control is most useful for questions requiring a simple yes or no
answer?
Ans. This is also a single-line text input but it masks the character as soon as a user enters it.
They are created using HTML <input> tag.
Ans. The input tag is used within <form> element to declare input controls that allow users to
input data. An input field can be of various types depending upon the attribute type.
Ans. Submit button, submits the information which you have entered in the form to the owner
who created the form.
Reset button, resets the information which you have entered, that is the form will become
empty, but reset button works only when you haven’t submitted the form.