diff --git a/writer.go b/writer.go
index <HASH>..<HASH> 100644
--- a/writer.go
+++ b/writer.go
@@ -5,17 +5,20 @@ import (
 	"io"
 )
 
+// A Writer represents a formatted HTML source codes writer.
 type Writer struct {
 	writer      io.Writer
 	lastElement string
 	bf          *bytes.Buffer
 }
 
+// SetLastElement set the lastElement to the Writer.
 func (wr *Writer) SetLastElement(lastElement string) *Writer {
 	wr.lastElement = lastElement
 	return wr
 }
 
+// Write writes the parameter.
 func (wr *Writer) Write(p []byte) (n int, err error) {
 	wr.bf.Write(p)
 	if bytes.HasSuffix(p, []byte(wr.lastElement)) {
@@ -24,6 +27,7 @@ func (wr *Writer) Write(p []byte) (n int, err error) {
 	return 0, nil
 }
 
+// NewWriter generates a Writer and returns it.
 func NewWriter(wr io.Writer) *Writer {
 	return &Writer{writer: wr, lastElement: defaultLastElement, bf: &bytes.Buffer{}}
 }
Added comments on writer.go.