There’s an experimental CSS property called text-stroke, supported on some browsers behind a -webkit prefix.
h1 { -webkit-text-stroke: 2px black; /* width and color */ font-family: sans; color: yellow; }
<h1>Hello World</h1>
Run code snippetExpand snippet
Another possible trick would be to use four shadows, one pixel each on all directions, using property text-shadow
:
h1 { /* 1 pixel black shadow to left, top, right and bottom */ text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; font-family: sans; color: yellow; }
<h1>Hello World</h1>
Run code snippetExpand snippet
But it would get blurred for more than 1 pixel thickness.
Related Posts:
- How to import Google Web Font in CSS file?
- CSS reset – What exactly does it do?
- When to use margin vs padding in CSS [closed]
- SVG center horizontal and vertical line
- Can I change Bootstrap button color?
- Is it bad practice to comment out single lines of CSS with //?
- How to draw a half circle (border, outline only) [closed]
- CSS Circle with border
- Set parent style via child
- What is the proper way to display a logo with CSS?
- Responsive font size in CSS
- How to make a vertical line in HTML
- How do I change the background color with JavaScript?
- Why em instead of px?
- Vertical Align Center in Bootstrap
- Button Center CSS
- Centering a background image, using CSS
- How to change the cursor into a hand when a user hovers over a list item?
- not:first-child selector
- CSS: center element within a element
- what is a parse error and how do I fix it
- Bootstrap NavBar with left, center or right aligned items
- How to make the overflow CSS property work with hidden as value
- How to make a sticky footer in react?
- How to push a footer to the bottom of page when content is short or missing?
- Linking to a pdf file with html
- Can I add background color only for padding?
- Change TD border color with HTML or CSS
- Why adding version number to CSS file path?
- Hide text using css
- Changing the width of Bootstrap popover
- CSS background color not working
- Bootstrap transparent navbar
- How do I install a custom font on an HTML site
- jQuery toggle CSS?
- 100% DIV width is not really 100%
- CSS 3 slide-in from left transition
- CSS selectors ul li a {…} vs ul > li > a {…}
- Bootstrap scrollable panel
- CSS checkbox input styling
- Is there a CSS selector for elements containing certain text?
- Failed to decode downloaded font
- How to place two divs next to each other?
- Background color in input and text fields
- How can I change the Bootstrap default font family using font from Google?
- CSS3 opacity gradient?
- CSS3 background image transition
- Set line height in Html
to make the html looks like a office word when
has different font sizes
- CSS Equivalent of the “if” statement
- font-weight is not working properly?
- How to make div background color transparent in CSS
- Changing code font size on wordpress
- Lucida calligraphy font not working wordpress site in android chrome
- @font-face doesn’t work
- How to add custom fonts in WordPress site
- How to remove google font in WordPress for only single page?
- How to set different font family based on text language?
- Where Do I Find The Astra Default Font Family That All Text Elements Are Inheriting From? [closed]
- Font Awesome 5 Free – far working but fas is not? [closed]
- How to access theme fonts using custom CSS style? [closed]
- How would one set or override a Fallback font for characters in second language?
- I have a wordpress website which uses a really weird font on Opera. What do I need to do to fix it?
- Font .woff files loaded don’t correspond to the displayed styles [closed]
- When changing theme’s font, why does font-size attribute not work? [duplicate]
- Fonts are not applying
- Fonts are parsed in one way but rendered in a different way
- Custom font isn’t active on all PCs
- Disable all Fonts that are Standard in WordPress and replacing them with a custom Font?
- Separate typography controls for titles and meta in a custom block?
- Open source social media icons to download and use on website? [closed]
- How to make a monopoly board using css grid?
- What’s the difference between SCSS and Sass?
- How am I supposed to use index.html?
- Half circle with CSS (border, outline only)
- CSS calc width and height values
- Column order manipulation using col-lg-push and col-lg-pull in Twitter Bootstrap 3
- What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?
- Adding border to SVG image
- What does !important mean in CSS?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Random gradient background color
- How to horizontally center an element
- Center image using text-align center?
- Unblur content inside blurring background div
- How do I make a transparent border with CSS?
- Failed to load resource: the server responded with a status of 404 (Not Found)
- Failed to load resource: the server responded with a status of 404 (Not Found) css
- How to change CSS using jQuery?
- Set line spacing
- Visual list of all installed fonts with respective pangram phrase?
- See answer keys in Google Form (quiz) source page?
- CSS Background Opacity [duplicate]
- Remove blue underline from link
- Angular: conditional class with *ngClass
- CSS Background Opacity [duplicate]
- iPhone system font
- Outline effect to text
- Customize Bootstrap checkboxes
- Making a
- Converts scss to css [closed]