Web Design/Inline CSS

< Web Design
Web Design Inline CSS
This page is part of the Web Design project.


Example 1

Type the code below into your code editor and save the file as inlinecss.html


<html>
<head>
<title>Inline Styles</title>
</head>

<body>

<p>This text does not have any style applied to it.</p>

<h1 style="color: red">

<p style = "font-size: 20pt">This text has the font-size style applied to it, making it 20pt.
</p>

<p style = "font-size: 20pt; color: #0000ff">
This text has the font-size and color styles applied to it, making it 20pt. and blue.</p>

</body>
</html>

Above text adapted from: Garrett, J, (2007), “Develop Cascading Style Sheets (CSS): Week One”.

This article is issued from Wikiversity - version of the Tuesday, August 18, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.