+ 1

Line items

Sometime i see "a" atribute inside of line items and its like <li>< a href="#"> Top<li> and o dont know what for it is?

31st Jul 2018, 4:34 AM
Tyczkin - avatar
2 Answers
+ 7
<a> tag is used for hyperlink. For example, if you write: <li> <a href="www.google.com"> Click here </a> </li> then it'll take you to Google after clicking the list item.
31st Jul 2018, 4:41 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 5
Hello, Tyczkin ! The <a> tag is one of the important elements of HTML and is designed to create links. Depending on the presence of the name or href attributes, the <a> tag establishes a link or anchor. An anchor is a bookmark inside the page, which you can specify as a link target. When you use a link that points to the anchor, you go to the bookmark inside the web page. To create a link, you need to tell the browser what is the link, and also specify the address of the document to which you want to link. The value of the href attribute is the document address (URL, Universal Resource Locator) to which the transition occurs. The <li> tag defines a single list item. An external <ul> or <ol> tag sets the list type to be marked or numbered. Good luck in programming on SoloLearn! https://www.sololearn.com/learn/HTML/1031/?ref=app https://www.sololearn.com/learn/HTML/1032/?ref=app
31st Jul 2018, 4:59 AM
Alexander Sokolov
Alexander Sokolov - avatar