CSS |
CSS |
deb1 |
Jun 24 2020, 01:46 AM
Post
#1
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
i know there is one way we can use style sheet which is by linking the CSS document to html document. Also read that there is another way of doing the style sheet which is internal way
by using <style> tag in the html document .... is that correct or wrong? please let me know. |
pandy |
Jun 24 2020, 10:55 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
There are three ways. The two you mentioned and the one you've used before, the style attribute (not recommended other than for a quick fix).
https://htmlhelp.com/reference/css/style-html.html |
deb1 |
Jun 25 2020, 12:45 AM
Post
#3
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
which one you don't recomend?
|
deb1 |
Jun 25 2020, 12:56 AM
Post
#4
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
<!DOCTYPE html>
<html> <head> <style> ul { list-style-type: none; margin: 0; padding: 0; } li a { display: block; width: 60px; background-color: #dddddd; } </style> </head> <body> <ul> <li><a href="#home">Home</a></li> <li><a href="#news">News</a></li> <li><a href="#contact">Contact</a></li> <li><a href="#about">About</a></li> </ul> <p>A background color is added to the links to show the link area.</p> <p>Notice that the whole link area is clickable, not just the text.</p> </body> </html> if i use the <style> like above .... will that be OK for CSS ? |
pandy |
Jun 25 2020, 08:42 AM
Post
#5
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
|
pandy |
Jun 25 2020, 08:43 AM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,716 Joined: 9-August 06 Member No.: 6 |
|
Lo-Fi Version | Time is now: 29th March 2024 - 03:41 AM |