+ 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; }
4 ответов
+ 3
You can refer here:
https://www.w3schools.com/tags/tag_a.asp
https://www.w3schools.com/tags/tag_div.ASP
+ 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.
+ 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