Styling html text without CSS
Add CSS as a style directly to the tag you want to format.
EX.
<p style="width:20px;height:20px;background-color:#ffcc00;">The contents go here</p>
Styling Text without HTML Tag?
Plain text is contained within an element: the body
element:
<body>
Hello, world!
</body>
Because of this, you could style this text by simply styling the body
element:
body {
color: red;
text-decoration: underline;
}
Depending on the context though, CSS3 does provide two pseudo-element selectors which could be used for this: :first-line
and :first-letter
.
To style the "H" you could simply use:
body:first-letter {
font-size: 32px;
}
If there was a <br>
element separating your first line from another line, you could also make use of :first-line
:
<body>
Hello, world!<br>
Second line.
</body>
body:first-line {
font-style: italic;
}
JSFiddle demo.
Can i change the text color of a tag without css?
What you could do is use the old and deprecated font tag. So it would be:
<tr><td><a href="#"><font color="black"> Link 3 </font></a></td></tr>
How do I style a HTML link without CSS?
You can only set the color.
<body link="XXX" alink="YYY" vlink="ZZZ">
XXX being the color used for links, YYY the color when mouse hovers the link and ZZZ the color for already visited links. Color can be given in hex notation just like with stylesheets
#AABBCC
You cannot set whether links are underlined or not, or have a border or not. This is totally up to the browser... unless these devices have some special, secret non-standard HTML.
Related Topics
@Font-Face Doesn't Work in Firefox (But Exact Same Code Works on Another Site)
How to Have 2 Floating Divs Have The Same Height
Set Canvas Element as Background of a Div Element
Change Cursor Over HTML5 Canvas When Dragging The Mouse
Why Is Safari 4/Mac Not Rendering Top and Bottom Margins in This Nested Div
Vertically Centered Loading Spinner Overlay
Svg CSS Rounded Corner Not Working
Where to Add Global CSS in an Angular 2 Application Made with Visual Studio 2017 Angular Template
Susy, Media Queries, and Lt Ie9
How to Position Two Divs Horizontally Within Another Div
How to Overlay a Div Over a Canvas CSS
Problems with Div Vertical Scrollbars on Ipad
HTML 5 Autofocus Messes Up CSS Loading
HTML5 Search Input: No Background Image in Chrome
Svg Attributes Beaten by CSS&Style in Priority