9jabaze - Entertainment | Webmaster | Browsing Tricks | Games/Apps Hub
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» Find Prettys Girls from your town for night
How to embed CSS in HTML? EmptySun Jul 21, 2024 1:27 pm by Litifyed

» Optimal Сasual Dating - Authentic Damsels
How to embed CSS in HTML? EmptyFri Jun 14, 2024 10:59 pm by Litifyed

» Superlative Сasual Dating - Verified Ladies
How to embed CSS in HTML? EmptyWed Mar 06, 2024 11:12 pm by Litifyed

» Wapkiz 2020 Code: wapkiz register page responsive design Code
How to embed CSS in HTML? EmptyThu Aug 13, 2020 5:15 pm by Hasty06

» 2020Bbnaija : Why I Can’t Be In A Relationship With Ozo – Nengi
How to embed CSS in HTML? EmptyMon Jul 27, 2020 9:44 pm by Adminkunlex

» Can You Have S*x On Your First Date? Check Out What Actress, Debbie Shokoya Has To Say About This
How to embed CSS in HTML? EmptyMon Jul 27, 2020 6:44 am by Adminkunlex

» Nigerian Singer, Seunfunmi Stephen, Recounts How Her Husband Was Killed By Stray Bullet
How to embed CSS in HTML? EmptyMon Jul 27, 2020 6:41 am by Adminkunlex

» Olakunle Churchill Shares Photo Of Himself And Actress Rosy Meurer As He Writes On The Importance Of Loyalty
How to embed CSS in HTML? EmptyMon Jul 27, 2020 6:39 am by Adminkunlex

» Ubi Franklin Reveals What Happened To Him When He Visited A Hospital Amid COVID-19 Pandemic
How to embed CSS in HTML? EmptyMon Jul 27, 2020 6:37 am by Adminkunlex

» Vardy Wins Premier League Golden Boot, Beats Ings, Aubameyang & Sterling
How to embed CSS in HTML? EmptyMon Jul 27, 2020 5:07 am by Adminkunlex

» The Right Way To Preach About Hell - Milton Goh
How to embed CSS in HTML? EmptyMon Jul 27, 2020 5:03 am by Adminkunlex

» “Surgery For What?” – Regina Daniels Shows Off Hot Body After Childbirth (Video)
How to embed CSS in HTML? EmptySun Jul 26, 2020 9:12 pm by Adminkunlex

» I Got Pregnant As A Virgin At 23 – Wathoni
How to embed CSS in HTML? EmptySun Jul 26, 2020 8:24 pm by Adminkunlex

» #Bbnaija2020: Wathoni Kisses Kiddwaya During BBNaija Truth Or Dare Game
How to embed CSS in HTML? EmptySun Jul 26, 2020 8:20 pm by Adminkunlex

» Bbnaija: Kiddywaya Gropes Erica’s Breast While Dancing And She Reacts
How to embed CSS in HTML? EmptySun Jul 26, 2020 8:17 pm by Adminkunlex

» “I Hope To Collaborate With Rihanna & Drake Soon” – Rema
How to embed CSS in HTML? EmptySun Jul 26, 2020 11:54 am by Adminkunlex

» “Girls That Give Threesome With Their Friend Have A Special Place In Heaven” – Naira Marley
How to embed CSS in HTML? EmptySun Jul 26, 2020 11:50 am by Adminkunlex

» “To Be A Boss, You Must Be A Servant” – Frodd Recounts On His Humble Beginnings
How to embed CSS in HTML? EmptySun Jul 26, 2020 11:48 am by Adminkunlex

» “Stop Pressuring Us With Your Beauty”, Actress Queen Nwokoye Begs Ini Edo
How to embed CSS in HTML? EmptySun Jul 26, 2020 11:46 am by Adminkunlex

» You Look Like A Weed Smoker – Lady Fires Adekunle Gold Over New Look
How to embed CSS in HTML? EmptySun Jul 26, 2020 11:43 am by Adminkunlex

The most tagged keywords



How to embed CSS in HTML?

Go down

How to embed CSS in HTML? Empty How to embed CSS in HTML?

Post by Adminkunlex Sun Jan 05, 2020 8:57 am

#CSS can be added to #HTML elements in 3 ways:•

Inline - by using the style attribute in HTML elements.

Internal - by using a <style> element in the <head> section.

External - by using an external CSS file.

Inline Styles:
An inline style may be used to apply a unique style for a single element.
To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.
The example below shows how to change the color and the left margin of a <h1> element:
Program:
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;margin-left:30px;">This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Output:
How to embed CSS in HTML? Main-qimg-00b33e30d945917ec641107dc8c2bd4c

Internal Styles Sheet:
An internal style sheet may be used if one single page has a unique style.
Internal styles are defined within the <style> element, inside the <head> section of an HTML page:
Program:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Output:
How to embed CSS in HTML? Main-qimg-b5dc2dfa0f4d897fbc7510c485ed0cd9

External Styles Sheet:
With an external style sheet, you can change the look of an entire website by changing just one file!
Each page must include a reference to the external style sheet file inside the <link> element. The <link> element goes inside the <head> section:
Program:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Output:
How to embed CSS in HTML? Main-qimg-4ce47727f8dd5e100d4a8315ebd99f90



Source

Adminkunlex
Admin

Posts : 1521
Points : 4576
Reputation : 0
Join date : 2019-06-08
Age : 25
Location : Osun State, Nigeria

https://9jabaze.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum