+ 1

Why are we using a not div. What is different between <div> and <a>. When can we used eaxh

a {   text-decoration: none; } and div {   text-align: justify; }

8th Jan 2022, 1:22 PM
Ayoola Abiodun
Ayoola Abiodun - avatar
3 Respostas
+ 2
<a> is an anchor element to use for creating web pages and linking them with each other by using an attribute "href". Whereas <div> is used as a container in our HTML code, it defines as a division or you can say a section in our HTML code. It is used to group all of the other elements of our web page to maintain it.
8th Jan 2022, 1:57 PM
Krish
Krish - avatar
+ 2
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. Any sort of content can be put inside the <div> tag!  Note: By default, browsers always place a line break before and after the <div> element // The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. By default, links will appear as follows in all browsers: An unvisited link is underlined and blue A visited link is underlined and purple An active link is underlined and red
8th Jan 2022, 1:57 PM
NEZ
NEZ - avatar