Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
More


SVG Text
SVG Text

SVG Text is used to draw text on web page, it uses <text> element to draw text.

Syntax

<text x="value" y="value">
Text here...
</text>


You can define one or more than one SVG text in a document.


Example

SVG Text
Rotate

Rotate attribute is used to rotate text in different directions defined by numbers value, number value can be any numbers or list of numbers defined in rotate attribute.

Syntax

<text rotate="numbers" x="value" y="value"></text>


You can define one or more than one numbers in rotate attribute.


Example

SVG Rotate Text
Length

Text length attribute is used to define spaces between text letters. Text length attribute takes number as a value.

Syntax

<text textlength="number" x="value" y="value"></text>


You can define one or more than one numbers in rotate attribute.


Example

SVG Text length

You can use SVG text any where within an HTML document.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Use <svg> element to draw svg text on webpage
  • svg text should be "My SVG Text"
  • Give width and height of 200 200 respectivelly
  • color should be deeppink

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

My SVG Text

SVG Code Generators

Try our SVG generators to practice and generate SVG code in real time.