a) What is html atribute?
HTML attribute is a special tag or property that provides
additional information about an HTML element. Attributes are
added to the opening tag of an element and are used to modify
the default behavior or appearance of the element.
For example, the "src" attribute is used to specify the source of an
image element, and the "href" attribute is used to specify the URL
of a link. Attributes can also be used to add custom data or
functionality to an element, such as with the "data-" attribute.
In short, HTML attributes provide extra information or
functionality to HTML elements, and are added to the opening tag
of the element.
b) Write some html tag with description.
1. <html>: The <html> tag is the root element of an HTML document. It is used
to define the beginning and end of the document, and contains all other
HTML elements.
2. <head> : The <head> tag is used to define the header section of an HTML
document. It contains meta data such as the page title, links to CSS
stylesheets and JavaScript files, and other important information about the
document.
3. <body> : The <body> tag defines the main content of an HTML document. It
contains all the content that is displayed on the webpage, such as text,
images, and multimedia.
4. <div> : The <div> tag is used to define a section or division of an HTML
document. It is often used as a container for other HTML elements, and can
be styled with CSS to change its appearance.
5. <p>: The <p> tag is used to define a paragraph of text. It is one of the most
commonly used HTML tags, and is used to structure textual content on a
webpage.
6. <a> : The <a> tag is used to create a hyperlink to another webpage or
resource. It can be used to link to other webpages, email addresses, files,
and more.
7. <img> : The <img> tag is used to embed images in an HTML document. It
requires a source attribute that specifies the URL of the image file, and can
also be styled with CSS to change its size and appearance.
8. <ul> : The <ul> tag is used to create an unordered list of items. It is often
used to create navigation menus or lists of related items.
9. <ol> : The <ol> tag is used to create an ordered list of items. It is similar to
the <ul> tag, but the items in the list are numbered.
10. <h1> - <h6> : The <h1> to <h6> tags are used to create headings of
different sizes. They range in size from the largest, <h1>, to the smallest,
<h6>, and are used to structure content on a webpage.
c) What is html? Write down an example of basic html document.
HTML (Hypertext Markup Language) is a standard markup language
used for creating web pages and applications. It provides a structured
way to define the content and layout of a web page, including text,
images, links, and other multimedia elements. HTML is often used in
conjunction with other web technologies such as CSS and JavaScript.
Here is an example of a basic HTML document:
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Document</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML document.</p>
</body>
</html>
This HTML document consists of the following elements:
<!DOCTYPE html>: This declaration specifies that the document is
an HTML5 document.
<html>: This element encloses the entire HTML document.
<head>: This element contains metadata about the document,
such as the document title.
<title>: This element specifies the title of the document, which
appears in the browser's title bar.
<body>: This element contains the visible content of the
document.
<h1>: This element defines a heading level 1.
<p>: This element defines a paragraph of text.
When viewed in a web browser, this HTML document would display the
following content:
My First HTML Document
Hello, World!
This is my first HTML document.