By Daniel Marszalek


2019-03-14 20:17:57 8 Comments

In my HTML I have link

<link type="txt/css" href="./style.css" rel="stylesheet" />

but this is not working.

But when I link,

<link href="./style.css" rel="stylesheet" />

Then this works

Why is that?

1 comments

@AKX 2019-03-14 20:20:54

The correct type is text/css, not txt/css.

Browsers default to guessing text/css, but if you explicitly tell them that your CSS is of type txt/css, which they don't know how to handle, they won't read the CSS.

Related Questions

Sponsored Content

38 Answered Questions

[SOLVED] How do I vertically center text with CSS?

30 Answered Questions

[SOLVED] Convert HTML + CSS to PDF with PHP?

26 Answered Questions

[SOLVED] Is there a CSS parent selector?

  • 2009-06-18 19:59:36
  • jcuenod
  • 1616118 View
  • 2737 Score
  • 26 Answer
  • Tags:   css css-selectors

19 Answered Questions

[SOLVED] Is it possible to apply CSS to half of a character?

38 Answered Questions

[SOLVED] How to align checkboxes and their labels consistently cross-browsers

16 Answered Questions

[SOLVED] When to use margin vs padding in CSS

  • 2010-02-03 03:20:12
  • Alex Angas
  • 683119 View
  • 2112 Score
  • 16 Answer
  • Tags:   css padding margin

28 Answered Questions

[SOLVED] How do I give text or an image a transparent background using CSS?

  • 2009-04-30 09:00:02
  • Stijn Sanders
  • 1500965 View
  • 2109 Score
  • 28 Answer
  • Tags:   html css opacity

33 Answered Questions

[SOLVED] Change an HTML5 input's placeholder color with CSS

20 Answered Questions

[SOLVED] How to disable a link using only CSS?

  • 2010-01-19 04:55:03
  • RSK
  • 1093576 View
  • 789 Score
  • 20 Answer
  • Tags:   html css

26 Answered Questions

[SOLVED] Set cellpadding and cellspacing in CSS?

Sponsored Content