Html Assignment
1:-what are inline elements and block elements in HTML and the difference between them? Name a few inline elements and block elements.
Ans: -Inline elements:- A line break is not used to begin an inline element.
An Inline element only uses the space that is required. An Inline element can not contain a block-level element.
Block-level element:-
A Block-level element always begins on a new line and browsers add a margin (a space) before and after the element by default. A Block-level element always occupies the entire available width.
Examples of Block level elements:- <p>,<ol>,<ul>,<dl>,<div> etc.
Examples of Block level elements:-<a>,<em>,<i>,<span>,<strong> etc.
2:- how to work with images in HTML and explain in detail <img/> tag important attributes?
Ans:- The HTML<img> tag is used to embed an image in a web page. Images are a common element of web design. the image tag has two attributes that are 1-src:- it is used to specify the path of images.
2:-alt:-it is used to specify the alternative text for the images.
3;-how to create a LIST in HTML?
Ans:- we can create a list by using <ol> tag. Each item starts with the <li> tag.
<ol> stands for an ordered list.
Example;-
<ol>
<li>Kumar</li>
<li>Sunil</li>
</ol>
An unordered list starts with <ul> tag. Each item starts with the <li> tag.
Example;-
<ul>
<li>Kumar</li>
<li>Sunil</li>
</ul>
It gives the data in bullet point form.
Html also supports Description lists.
The <dl> tag defines the description list.
4:-how do interlink web pages and navigate people to another website?
Ans:- Linking in HTML is done with the anchor tag, the<A> tag. The “A” in the tag is followed by “HREF”.
For example:-
<A HREF=”https://google.com/”\> Google Search Engine</A>